ocamlc -where reports incorrect path remotely #21

Closed
nrlucaroni opened this Issue Mar 19, 2013 · 6 comments

Comments

Projects
None yet
2 participants
@nrlucaroni

Running Windows 8, 64bit, using the ocaml 4.00.1 mingw binary.

I installed from the installer into the default directory (C:\OCaml). Locally ocamlc -where reports the correct path and works fine. But through an SSH session ocaml fails and reports the following,

developer@Noland ~
$ which ocamlc
/cygdrive/c/OCaml/bin/ocamlc

developer@Noland ~
$ ocamlc -where
C:/ocamlmgw/lib

Let me know if you need any further information, I have no idea what to even think about this oddity. Thanks for you hard work!

@protz

This comment has been minimized.

Show comment
Hide comment
@protz

protz Mar 20, 2013

Owner

Hi,

The defautl directory the installer picks is not c:\ocaml, but rather c:\program files\OCaml . Are you positive you used this very installer?

Owner

protz commented Mar 20, 2013

Hi,

The defautl directory the installer picks is not c:\ocaml, but rather c:\program files\OCaml . Are you positive you used this very installer?

@nrlucaroni

This comment has been minimized.

Show comment
Hide comment
@nrlucaroni

nrlucaroni Mar 20, 2013

Yes it's the same install as I interpret it,

$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 *ocaml-4.00.1-i686-mingw64.exe

$wget http://gallium.inria.fr/~protzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 ocaml-4.00.1-i686-mingw64.exe

Yes it's the same install as I interpret it,

$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 *ocaml-4.00.1-i686-mingw64.exe

$wget http://gallium.inria.fr/~protzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 ocaml-4.00.1-i686-mingw64.exe

@protz

This comment has been minimized.

Show comment
Hide comment
@protz

protz Mar 21, 2013

Owner

I suspect you don't have the same PATH variable depending on how you
connect to your machine. Have you tried:

echo $PATH

in both situations?

On Wed 20 Mar 2013 09:45:46 PM CET, Nicholas wrote:

Correction, It defaulted there the /second/ time I installed. The
first time it was probably what you've mentioned, but I changed it
noting issue with spaces in paths previously.

Yes it's the same install as I interpret it,

$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 *ocaml-4.00.1-i686-mingw64.exe

$wget
http://gallium.inria.fr/~protzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
http://gallium.inria.fr/%7Eprotzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 ocaml-4.00.1-i686-mingw64.exe


Reply to this email directly or view it on GitHub
#21 (comment).

Owner

protz commented Mar 21, 2013

I suspect you don't have the same PATH variable depending on how you
connect to your machine. Have you tried:

echo $PATH

in both situations?

On Wed 20 Mar 2013 09:45:46 PM CET, Nicholas wrote:

Correction, It defaulted there the /second/ time I installed. The
first time it was probably what you've mentioned, but I changed it
noting issue with spaces in paths previously.

Yes it's the same install as I interpret it,

$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 *ocaml-4.00.1-i686-mingw64.exe

$wget
http://gallium.inria.fr/~protzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
http://gallium.inria.fr/%7Eprotzenk/caml-installer/ocaml-4.00.1-i686-mingw64.exe
$ md5sum.exe ocaml-4.00.1-i686-mingw64.exe
a99fac6722a74649ab90a1edd433b409 ocaml-4.00.1-i686-mingw64.exe


Reply to this email directly or view it on GitHub
#21 (comment).

@nrlucaroni

This comment has been minimized.

Show comment
Hide comment
@nrlucaroni

nrlucaroni Mar 21, 2013

If I'm understanding what your implying, then "ocamlc -where" searches the PATH for the library directory, not from a compile time constant?

The PATH variables are the same in both situations,

Remotely -
$echo $PATH
/usr/lib/gcc/i686-w64-mingw32/4.5.3/:/usr/i686-w64-mingw32/sys-root/mingw/lib/:/usr/i686-w64-mingw32/sys-root/mingw/bin/:/usr/i686-w64-mingw32/sys-root/mingw/include/:/usr/bin/:/usr/local/bin:/usr/bin:/cygdrive/c/OCaml/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/Services/IPT:/cygdrive/c/Program Files (x86)/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/Dell/Dell Data Protection/Access/Advanced/Wave/Gemalto/Access Client/v5:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/bin

Locally -
$echo $PATH
/usr/lib/gcc/i686-w64-mingw32/4.5.3/:/usr/i686-w64-mingw32/sys-root/mingw/lib/:/usr/i686-w64-mingw32/sys-root/mingw/bin/:/usr/i686-w64-mingw32/sys-root/mingw/include/:/usr/bin/:/usr/local/bin:/usr/bin:/cygdrive/c/OCaml/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/Services/IPT:/cygdrive/c/Program Files (x86)/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/Dell/Dell Data Protection/Access/Advanced/Wave/Gemalto/Access Client/v5:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/bin

If I'm understanding what your implying, then "ocamlc -where" searches the PATH for the library directory, not from a compile time constant?

The PATH variables are the same in both situations,

Remotely -
$echo $PATH
/usr/lib/gcc/i686-w64-mingw32/4.5.3/:/usr/i686-w64-mingw32/sys-root/mingw/lib/:/usr/i686-w64-mingw32/sys-root/mingw/bin/:/usr/i686-w64-mingw32/sys-root/mingw/include/:/usr/bin/:/usr/local/bin:/usr/bin:/cygdrive/c/OCaml/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/Services/IPT:/cygdrive/c/Program Files (x86)/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/Dell/Dell Data Protection/Access/Advanced/Wave/Gemalto/Access Client/v5:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/bin

Locally -
$echo $PATH
/usr/lib/gcc/i686-w64-mingw32/4.5.3/:/usr/i686-w64-mingw32/sys-root/mingw/lib/:/usr/i686-w64-mingw32/sys-root/mingw/bin/:/usr/i686-w64-mingw32/sys-root/mingw/include/:/usr/bin/:/usr/local/bin:/usr/bin:/cygdrive/c/OCaml/bin:/usr/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/Services/IPT:/cygdrive/c/Program Files (x86)/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/NTRU Cryptosystems/NTRU TCG Software Stack/bin:/cygdrive/c/Program Files/Dell/Dell Data Protection/Access/Advanced/Wave/Gemalto/Access Client/v5:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/bin

@protz

This comment has been minimized.

Show comment
Hide comment
@protz

protz Mar 22, 2013

Owner

Sorry I replied too fast. I think there's an environment variable that the installer sets, something like OCAML_LIBRARY_PATH (using the system preferences panel to find out). ssh'ing into the machine will not get that env variable properly set.

This is needed because when compiled, OCaml does not know where to find its standard library; on unix-like systems, this is determined at compile-time (--prefix switch of the configure script), but on windows, the user is free to pick any destination directory for the installation of ocaml, so ocaml should have a run-time mechanism for determining where it is installed.

Owner

protz commented Mar 22, 2013

Sorry I replied too fast. I think there's an environment variable that the installer sets, something like OCAML_LIBRARY_PATH (using the system preferences panel to find out). ssh'ing into the machine will not get that env variable properly set.

This is needed because when compiled, OCaml does not know where to find its standard library; on unix-like systems, this is determined at compile-time (--prefix switch of the configure script), but on windows, the user is free to pick any destination directory for the installation of ocaml, so ocaml should have a run-time mechanism for determining where it is installed.

@protz protz closed this Mar 22, 2013

@nrlucaroni

This comment has been minimized.

Show comment
Hide comment
@nrlucaroni

nrlucaroni Mar 26, 2013

Yes this is correct, although the variable set in the windows session is OCAMLLIB not OCAML_LIBRARY_PATH. OCAMLFIND_CONF should also be included in that list.

Thanks for your help.

Yes this is correct, although the variable set in the windows session is OCAMLLIB not OCAML_LIBRARY_PATH. OCAMLFIND_CONF should also be included in that list.

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment