project-everest / everest

https://project-everest.github.io/
Apache License 2.0
193 stars 29 forks source link

everest installed opam has hardcoded path #33

Closed andreasdotorg closed 7 years ago

andreasdotorg commented 7 years ago

The opam installed by the everest script has D:\cygwin\home\protz hardcoded as the location of the .opam directory. E.g.:

bogk@4DELBOGK \~/everest/FStar $ opam config env CAML_LD_LIBRARY_PATH="D:\cygwin\home\protz\.opam\system\lib\stublibs;C:/ocamlmgw64/lib\stublibs"; export CAML_LD_LIBRARY_PATH; MANPATH="D:\cygwin\home\protz\.opam\system\man;"; export MANPATH; PATH="D:\cygwin\home\protz\.opam\system\bin;C:\Python27;C:\Python27\Scripts;C:\Program Files\Cmake\bin;C:\Users\bogk\everest\FStar\bin;C:\Users\bogk\everest\kremlin;C:\Users\bogk\everest\nuget\bin;C:\Users\bogk\everest\z3-4.5.0-x64-win\bin;C:\PROGRA~2\MICROS~4.0\VC\bin\amd64;C:\PROGRA~2\MICROS~4.0\VC\bin;C:\PROGRA~2\MIA713~1\F#\4.0\FRAMEW~1\v4.0\;C:\Users\bogk\everest\flexdll;C:\Program Files (x86)\flexdll\;C:\ocamlmgw64\bin\;C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin;C:\Users\bogk\everest\flexdll;C:\Program Files (x86)\flexdll\;C:\ocamlmgw64\bin\;C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin;C:\cygwin64\usr\local\bin;C:\cygwin64\bin; ..."; export PATH;

sishtiaq commented 7 years ago

opam, until now, has not been fully supported on Windows. Everest provides a way to build OCaml-dependent repos on a Windows platform, nothing more. I don't think I've done an opam update from inside an everest checkout. And I wouldn't want to!

msprotz commented 7 years ago

ok that's unfortunate... I should've sed-changed this as part of the install script

but do you have the right values in your ~/.bashrc after running the script? I seem to remember that my "hack" bypasses opam config env and directly writes the right values in the bashrc file

andreasdotorg commented 7 years ago

Yes, the values in .bashrc are ok. It's just that I attempted to "opam install merlin", and then things went terribly wrong.

msprotz commented 7 years ago

If you want a functional OPAM on Windows https://github.com/fdopen/opam-repository-mingw is your best bet

msprotz commented 7 years ago

We chatted about this, and moving to the installer above seems like the best bet. I'd happily take in a patch that is capable of downloading the installer above, then launching opam init --switch ... followed by opam install. This would alleviate the need for all the custom logic and snapshot.

msprotz commented 7 years ago

Will be fixed by #49