Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does OPAM work on windows? #246

Closed
UnixJunkie opened this issue Oct 16, 2012 · 71 comments
Closed

Does OPAM work on windows? #246

UnixJunkie opened this issue Oct 16, 2012 · 71 comments

Comments

@UnixJunkie
Copy link
Contributor

I really don't know.

@samoht
Copy link
Member

samoht commented Oct 16, 2012

not yet, a 1.0 release targeting osx and linux is planned before end of november. After that, we'll focus on windows with a target release in Q1 2013.

@alainfrisch
Copy link
Contributor

Any news on that front?

If you need some help to beta-test OPAM under Windows, let me know!

@samoht
Copy link
Member

samoht commented Jan 18, 2013

No news for now on, but that's the next big thing to do on my list!

@samoht
Copy link
Member

samoht commented Mar 20, 2013

Actually, OPAM should now compile fine on Cygwin. However this is not tested at all so I suspect some things might break. Cygwin users, please feel free to open the specific issues you face.

@alainfrisch
Copy link
Contributor

Can you provide steps to build OCaml + OPAM under Cygwin? Or even better, provide a binary installer as for Linux. I suspect that Windows users are even more likely to love that than Linux ones.

Is your plan to support the Cygwin port only under Windows? In my opinion, this is the less useful one for Windows developers (as opposed to people wanting to quickly port existing Unix applications to Windows).

@samoht
Copy link
Member

samoht commented Mar 21, 2013

As I said, this is not very well tested, but ocp-build is now supposed to work correctly on windows (so OPAM should build fine). I'll give it a try on friday with a virtual machine and I'll report here if it works.

In a longer term, we indeed plan to have a proper support for windows (ie not based on Cygwin). The agenda for this is not totally clear though, as our first priority is to fully support the future OCaml Platform.

@ttamttam
Copy link
Contributor

This is a XP VM, with wodi32 installed.

I began with a git clone.

admin@testm2m ~/opam
$ CC=i686-w64-mingw32-gcc ./configure
checking for gcc... i686-w64-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking for ocamlc... ocamlc
OCaml version is 4.00.1
OCAMLLIB previously set; preserving it.
OCaml library path is C:/wodi32/opt/wodi32/lib/ocaml/std-lib
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamlbuild... ocamlbuild
checking for camlp4... camlp4
checking for camlp4o... camlp4o
checking for camlp4of... camlp4of
checking for camlp4oof... camlp4oof
checking for camlp4orf... camlp4orf
checking for camlp4prof... camlp4prof
checking for camlp4r... camlp4r
checking for camlp4rf... camlp4rf
checking for gawk... gawk
checking for curl... curl
configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating src/core/opamVersion.ml

Executables will be installed in /usr/local/bin
Manual pages will be installed in /usr/local/share/man

admin@testm2m ~/opam
$ make
make -C ocp-build
make[1] : on entre dans le répertoire « /home/admin/opam/ocp-build »
awk '{ print "external "$1": unit -> unit = "" $1 """ }' primitives > primitives.ml
ocamlc -o ocp-build.run -custom -make-runtime win32_c.c primitives.ml unix.cma -cclib -lunix
cygwin warning:
MS-DOS style path detected: C:/wodi32/opt/wodi32/lib/ocaml/std-lib
Preferred POSIX equivalent is: /opt/wodi32/lib/ocaml/std-lib
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
cat ocp-build.run ocp-build.boot >> ocp-build
chmod +x ocp-build
./ocp-build -help >/dev/null
Fatal error: unknown C primitive unix_waitpid' Makefile:4: recipe for targetocp-build' failed
make[1]: *** [ocp-build] Error 2
make[1] : on quitte le répertoire « /home/admin/opam/ocp-build »
Makefile:43: recipe for target `ocp-build/ocp-build' failed
make: *** [ocp-build/ocp-build] Error 2

@ttamttam
Copy link
Contributor

Some indications about what exactly ocp-build.boot is may help to provide help on this front.

@samoht
Copy link
Member

samoht commented Apr 19, 2013

ocp-build.boot is the bytecode blob obtained by compiled the latest version of typerex (https://github.com/OCamlPro/typerex/tree/typerex2/tools/ocp-build).

I've updated the bytecode blob of ocp-build to its latest version (8c7302e). Unfortunately, I still get the same error. Oh well ...

@ttamttam
Copy link
Contributor

I had a look, but it is too complex for me :-(
The way this ocp-build.boot is generated is commented in some Makefile, but very unclear to me.
Sorry…

@bobot
Copy link
Contributor

bobot commented May 16, 2013

ocp-build.boot have been compiled on an unix system, so even if it's bytecode it can't run on a windows system. A windows bytecode doesn't contain unix_waitpid but win_waitpid. So I think it's impossible to bootstrap ocp-build that way on windows. (I used mingw port for testing it and ocp_build repository).

@samoht
Copy link
Member

samoht commented May 16, 2013

@bobot we are cleaning the bytecode object to not include C call which are not used. So normally unix_waitpid should not be in there ...

@bobot
Copy link
Contributor

bobot commented May 17, 2013

I have seen that you use ocp-bytecode but unix_waitpid appears in the bytecode of ocp-build because it is used inside the unix module (but not by function used by ocp-build). I tried to use remove-primitive.txt (If I understand well unix_waitpid is replaced by exit) and bootstrap work well. But then on windows that complain for unix_fork. Unfortunately fork is used in ocp-build but not available on windows:

./src/ocp-build/buildMisc.ml:148: match fork() with
./src/ocp-build/buildMisc.ml:162: match fork() with

with the following remove-primitive.txt ./ocp-build -help can be run, but it print nothing (exit eearly) and the bootstrap doesn't work on linux :
win32_broadcast_setting_change_ml
win32_delete_registry_value_ml
win32_write_registry_value_ml
win32_read_registry_value_ml
unix_waitpid
unix_fork
unix_wait
unix_getppid
unix_nice
unix_truncate
unix_ftruncate
unix_lstat
unix_isatty
unix_truncate_64
unix_ftruncate_64
unix_lstat_64
unix_fchmod
unix_chown
unix_fchown
unix_umask
unix_set_close_on_exec
unix_clear_close_on_exec
unix_chroot
unix_opendir
unix_readdir
unix_rewinddir
unix_closedir
unix_mkfifo
unix_symlink
unix_readlink
unix_kill
unix_sigprocmask
unix_sigpending
unix_sigsuspend
unix_alarm
unix_getitimer
unix_setitimer
unix_getuid
unix_geteuid
unix_setuid
unix_getgid
unix_getegid
unix_setgid
unix_getgroups
unix_setgroups
unix_initgroups
unix_getlogin
unix_getpwnam
unix_getgrnam
unix_getpwuid
unix_getgrgid
unix_socketpair
unix_tcgetattr
unix_tcsetattr
unix_tcsendbreak
unix_tcdrain
unix_tcflush
unix_tcflow
unix_setsid
unix_getnameinfo
unix_getaddrinfo

PS: can't the bootstrap be easier if ocp-build just generate a big script with all the commands to run?

@vogler
Copy link

vogler commented Mar 26, 2014

Installing the following packages worked fine under Cygwin:

git clone https://github.com/ocaml/opam.git && cd opam
./configure && make && make install && cd ..
opam init -a
eval `opam config env`
opam install ocamlfind camomile batteries cil xml-light

Cygwin packages: git,wget,unzip,make,m4,gcc,gcc4-core,libmpfr4,autoconf,flexdll,libncurses-devel,curl,ocaml,ocaml-compiler-libs,patch

@rdicosmo
Copy link
Contributor

Interesting!

By the way, there is a binary release of the external solver
aspcud 1.9 for Windows also, see
http://sourceforge.net/projects/potassco/files/aspcud/1.9.0/

It would be interesting to know whether the external solver
is detected by opam in a Windows environment (never tested
on my side)

On Wed, Mar 26, 2014 at 10:16:29AM -0700, Ralf Vogler wrote:

Installing the following packages worked fine under Cygwin:

git clone https://github.com/ocaml/opam.git && cd opam
./configure && make && make install && cd ..
opam init -a
eval opam config env
opam install ocamlfind camomile batteries cil xml-light

Cygwin packages:
git,wget,unzip,make,m4,gcc,gcc4-core,libmpfr4,autoconf,flexdll,libncurses-devel,curl,ocaml,ocaml-compiler-libs,patch


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

@vogler
Copy link

vogler commented Mar 26, 2014

Everything in %PATH% will also be found under Cygwin. I had no problems with calling Java and GraphViz. Use cygpath -w for converting paths.

@rdicosmo
Copy link
Contributor

Thanks for the answer... then I expect aspcud to work properly on windows too :-)

On Wed, Mar 26, 2014 at 10:44:05AM -0700, Ralf Vogler wrote:

Everything in %PATH% will also be found under Cygwin. I had no problems with
calling Java and GraphViz. Use cygpath -w for converting paths.


Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments:
MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

@AltGr
Copy link
Member

AltGr commented Mar 28, 2014

Thanks a lot for reporting on this success :)

@braibant
Copy link

I just tried to reproduce this success, and my experience is a mixed bag.

Cygwin packages git,wget,unzip,make,m4,gcc,autoconf,libncurses-devel,curl,ocaml,ocaml-compiler-libs,patch. The packages gcc4-core,libmpfr4 are not listed anymore in the Cygwin installer.

  1. Installed opam verson 1.2.0~beta3. Installed a few package (not relevant here). Unfortunately, cmdliner fails to install.
  2. opam switch 4.02.0+rc1 compiles, but again, I cannot install cmdliner.

The reason cmdliner fails to install seems to be related to dynlink. I will investigate the issue further.
As a side note, opam list fails with

$opam list
# Installed packages for system:
/bin/sh: tput: command not found
Fatal error:
End_of_file

I will try again with opam 1.1 and reports about my experience.

@samoht
Copy link
Member

samoht commented Aug 29, 2014

What was the error with cmdliner?

AltGr added a commit to OCamlPro/opam that referenced this issue Aug 29, 2014
@braibant
Copy link

IIRC, the build system does some #require which was not supported properly. I threw away the VM, but I will need to try again soon and will report what is going on.

@dbuenzli
Copy link
Contributor

It doesn't #require but it #uses. The build script is invoked from the root directory of the distribution. In any case if there's something wrong with this scheme it's the git.ml script that will first be invoked by opam and fail. It #uses config.ml which #uses topkg-ext.ml. All these scripts are in the pkg subdirectory of the distribution and meant to be invoked from the root directory.

@braibant
Copy link

Thanks @dbuenzli . I will probably try again.

This morning, I played again with the installation of OPAM on Windows, using the mingw32 toolchain. The compilation of OPAM and the ext-lib succeed, but the installation fails.

$ make install
OPAMROOT=/tmp/opam-install-install src/opam-installer --prefix /usr/local opam.install
[ERROR] Could not find "C:\\cygwin64\\home\\vagrant\\opam-1.1.2\\src\\opam"
[ERROR] Could not find "C:\\cygwin64\\home\\vagrant\\opam-1.1.2\\src\\opam-admin"
[ERROR] Could not find "C:\\cygwin64\\home\\vagrant\\opam-1.1.2\\src\\opam-installer"
doc/man\opam.1                   => /usr/local\man\man1\opam.1
Creating directory /usr/local\man\man1
Fatal error: exception # opam-version    1.1.2
# os              win32
C:\cygwin64\home\vagrant\opam-1.1.2\src\opam-installer.exe: "create_process" failed on /bin/sh: No such file or directory
Makefile:52: recipe for target 'install' failed
make: *** [install] Error 2

Adding the opam binary to my path does not work either.

$ opam
Fatal error: exception Invalid_argument("Sys.signal: unavailable signal")

My previous attempt was using the Cygwin port of OCaml, which, as far as I understand produces executables which depend on a DLL which is GPL'd.

avsm added a commit to avsm/opam that referenced this issue Oct 1, 2014
This uses the Appveyor CI service (similar to Travis) to build
OPAM on Cygwin on Windows.  It currently installs fine, but then
runs into ocsigen/lwt#84 when installing Lwt.

See ocaml#246
@avsm
Copy link
Member

avsm commented Oct 1, 2014

I've used the Appveyor Windows CI service (similar to Travis) to capture some of these build directions in a script to make it easier to keep working. See #1764

@alainfrisch
Copy link
Contributor

Are there plans to support native Windows ports in OPAM at some point?

After fixing a few minor things in the build system, I managed to compile and install it with the MSVC port. Then "opam init" fails by trying call run "/bin/sh", which, of course, doesn't make sense for a native port. This is perhaps caused by OpamSystem.command_exists.

Is there any point that I try to fix this one and continue with the test, or is it hopeless (e.g. because opam requires fork, signals, etc)?

Generally speaking, it would be great to get some update on the plans for Windows support in opam (first note by @samoht on this ticket indicates a target in Q1 2013!).

(Note that I would find it normal that opam requires a Cygwin environment -- the build system of many packages already do anyway -- but I don't see any deep reason to require opam itself to be a Cygwin executable, i.e. compiled with the Cygwin port of OCaml.)

@dbuenzli
Copy link
Contributor

Are there plans to support native Windows ports in OPAM at some point?

Should be on the 1.3 roadmap. See http://lists.ocaml.org/pipermail/opam-devel/2015-March/001002.html

This is perhaps caused by OpamSystem.command_exists.

@AltGr I'll point again to this code which has been tested on windows (also I notice that you eventually merged ocaml-opam/opam-depext#7 without fixing this, though I don't know if opam-depexts makes sense on windows).

@onionhammer
Copy link

+1 getting this on chocolatey would be great

@maelvls
Copy link
Contributor

maelvls commented Oct 26, 2016

Someone else maintained Opam for windows: http://fdopen.github.io/opam-repository-mingw/installation/

@andyli
Copy link
Contributor

andyli commented May 12, 2017

I'm packaging opam for cygwin, and I believe it will be accepted into the cygwin repo soon. I've tested that it work pretty nicely with the Cygwin OCaml package, but not so well with fdopen's opam repo.

@dra27
Copy link
Member

dra27 commented May 12, 2017

@andyli - fdopen's repository is intended for mingw/msvc ports, not the Cygwin ports of OCaml. Cygwin opam should be fine with the vanilla opam-repository and issues should be posted there.

My roadmap for Cygwin/native opam does include being able to have Cygwin opam installing native compilers and vice versa, but my opinion remains that we shouldn't support it until proper cross-compilation arrives in OCaml (which might be around 4.07.0).

@skaller
Copy link

skaller commented Mar 27, 2018

IMO Cygwin is dead. As of Windows 10, Summer edition, developers can enable WSL and install Ubuntu on Windows, and invoke from CMD.EXE using BASH.EXE. Although not everything works, pretty much everything needed for a compiler or build system does, including gcc. The primary limitation is that Windows tools cannot operate on files in the Ubuntu file system. Both the Linux and Windows tools can operate on files in the (rest of the) Windows file system, however. Linux tools have to be invoked by BASH.EXE to enable WSL. However windows tools including CL.EXE (the C/C++ compiler) can be run there too.

So Opam can be bootstrapped on Windows by installing it outside the Ubuntu filesystem and running it with BASH.EXE. It should work out of the box. Ocaml binaries built that way will be normal Linux binaries. However, with suitable packaging a Windows native Ocaml compiler can be built which will build code for Windows environment and link using MSVC. You can do this right now by hand, so it is just a matter of packaging to get opam to build Ocaml that way.

In turn this means pure ocaml packages, or ones that use only Ocaml's Unix module subset available on Windows, will work out of the box using the Windows Ocaml. Only packages which build C code with gcc will fail: the resulting binaries can be built under Ubuntu but they aren't compatible with MSVC++. So those packages will have to be updated so the C building is adaptive and works on for CL.EXE.

What this means is that you would build and install WIndows native Ocaml programs under Ubuntu on WIndows using Opam and tools which can invoke and use CL.EXE and Windows native ocaml.

In short: MOST of the work is packaging, MOST of Opam's Unix specific stuff will just work out of the box. Supporting Cygwin and MingW type toolchains is a dead end. The main constraint is WIndows 10 Summer Edition is required. WSL is not available on WIndows 7.

@db4
Copy link

db4 commented Mar 27, 2018

The primary limitation is that Windows tools cannot operate on files in the Ubuntu file system

Why not? "Ubuntu file system" is just C:\Users\<user>\Local Settings\lxss directory and of course it is accessible from Win32. One can use wslpath to do WSL<->Windows path conversions. Even WSL and Win32 symlinks are compatible if some conditions are met.

As for everything else I agree that WSL Opam managing native OCaml packages is the right way to go.

@andyli
Copy link
Contributor

andyli commented Mar 27, 2018

IMO Cygwin is dead.

IMO Windows is dead. Why not just install Linux instead of using WSL? (Ok, just kidding)

To be serious, cygwin/mingw and WSL are very different projects and having very different goals. The cygwin/mingw toolchains create native Windows executables; WSL only run Linux executables.
I cannot tell whether cygwin will be abandoned in the future, but judging from its mailing list, it is pretty actively developed/maintained. Many cygwin packages are also even more updated than Debian.

@avsm
Copy link
Member

avsm commented Mar 27, 2018

To be clear: we're going to continue to maintain Cygwin for some time. There is a large userbase depending on it for various purposes, and WSL is very new technology.

@skaller
Copy link

skaller commented Mar 27, 2018

"IMO Windows is dead. Why not just install Linux instead of using WSL? (Ok, just kidding)"

Because all the games I like to play run on Windows.. :)

Seriously, whilst Mingw etc create Windows executables, AFAIK they do not integrate with MSVC++ DLLs. MS has been a C++ shop for decades, indeed at one time they abandoned C altogether, refusing to upgrade their compiler to C11 (they change their minds I think).

This problem isn't unique to Windows: clang and gcc C++ libraries aren't compatible either. Nor, in some details, are the compilers.

I have used Cygwin in the past many times, and it was a life saver. But it was also very painful. On the other hand, being able to apt-get packages and just run stuff from Ubuntu out of the box was pure magic. My project's Linux build just worked first time. No X mind you, but you can install an X server for windows and then X client should work if configured.

Anyhow the question here is how to get opam to work on Windows, and the right way is to rewrite the whole system from scratch in Ocaml using no C, and using only the subset of Unix module that work on both Windows and Unix. Shell dispatches then remain the primary difficulty. Its not clear if it is worth bothering, however. Will JaneSt libraries work on Windows? The thing is, software development is not about building executables, its about building libraries.

Sigh. INRIA just dropped Bignum and I need opam to work on Windows so my clients can easily build my compiler which happens to use OCS Scheme which depends on Bignum. The replacement depends on third party LGPL without linking exemption libraries that the client needs to download not build. I hoped opam might automate this, but it doesn't work on Windows either. My system requires native MSVC Ocaml build because it requires MSVC anyhow. Building Ocaml is enough pain. I am wishing the compiler was written in C++ now.

@XVilka
Copy link
Contributor

XVilka commented Mar 28, 2018

@skaller - no, they didn't change their minds, they support the only subset of C99 and C11 that is required by the C++ standard. The chances are higher to build a spaceship that can travel faster than light than the Microsoft build a fully-featured C compiler. On the other hand, Google realized that waiting is unproductive and invested the time of their engineers improving clang-cl, which is now able to compile Google Chrome.

@db4
Copy link

db4 commented Mar 28, 2018

https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/

@alainfrisch you are right, thanks for pointing this out.

Actually this not a real problem, you can always use symlinks to work around this:

ln -s /mnt/c/Users/user/.opam ~/.opam

The real problem is to make msvs-detect work under WSL. I spent several hours but did not succeed with VS 2017 detection.

@dra27
Copy link
Member

dra27 commented Mar 28, 2018

@db4 - getting msvs-detect to work from WSL should not be too bad, but what are you then going to do with the environment configuration it gives you? It's a lot more work to get OCaml to build using that (it should be easier since Microsoft added the ability to share environment variables between Win32 and LXSS, but it still involves some changes to OCaml)

@db4
Copy link

db4 commented Mar 29, 2018

but what are you then going to do with the environment configuration it gives you?

I would like to completely remove Cygwin dependency for native OCaml tools (even for build) if possible. To forgot about all these noacl in /etc/fstab, CYGWIN=winsymlinks:native etc. To have normal POSIX shell without Cygwin "features" that needs special workarounds. Looks like WSL is (almost?) complete Cygwin replacement, so why not?

Back to the topic. Now I am trying to build the current opam from cygwin shell with

make compiler OCAML_PORT=msvc
make lib-pkg
./configure --prefix c:/local/ocaml
make
make install

The last command fails with

$ ./opam-installer.exe --prefix "c:/local/ocaml" --mandir "c:/local/ocaml/share/man" --libdir "C:\Users\dbely\OPAM-C~1\opam\BOOTST~1\ocaml\lib\ocaml\site-lib" opam-actual.install
_build/install/default/bin\opam.exe => c:\local\ocaml\bin\opam.exe
[ERROR] Failure during install
C:\Users\dbely\opam-cygwin\opam\_build\default\src\tools\opam_installer.exe: "create_process" failed on C:\tools\cygwin\bin: Permission denied

Do you have any idea what could be the problem?

@dra27
Copy link
Member

dra27 commented Mar 29, 2018

Removing the Cygwin dependency is perfectly possible (old branch here) - but it's not a panacea, you simply replace Cygwin-specific problems with WSL-specific ones (but it's much faster, so I think it's certainly worth supporting, but Cygwin will remain the official OCaml build system for some considerable time).

Regarding the build failure, you need at least 5255239 from #3260. But the opam you'll compile at that point won't init...

@dra27
Copy link
Member

dra27 commented Mar 29, 2018

Feel free to open an issue on the msvs-tools tracker for operation from within WSL. I'm happy to work on that, I just don't have time right now.

@db4
Copy link

db4 commented Apr 27, 2018

Regarding the build failure, you need at least 5255239 from #3260. But the opam you'll compile at that point won't init...

Is there any commint/branch that just works and is better than Andreas Hauptmann win32 build (OCaml for Windows)? With his build I have

[WARNING] No external solver found, one of aspucd, packup and mccs is recommended (see
          http://opam.ocaml.org/doc/Install.html#ExternalSolvers for details)

I don't know if it could be ignored or it really cannot use aspcud.exe (note the wrong aspucd spelling in the warning).

Or maybe cygwin OPAM build is still recommended to manage native Win32 OCaml packages?

@dra27
Copy link
Member

dra27 commented Jun 13, 2024

Hopefully this is fixed with a combination of at least #2939, #2940, #3044, #3155, #3242, #3248, #3255, #3260, #3337, #3346, #3347, #3348, #3349, #3350, #3449, #3882, #3893, #3897, #3898, #3899, #3900, #3908, #3911, #4265, #4316, #4326, #4706, #4709, #4710, #4813, #4816, #4817, #4823, #4827, #4835, #4841, #4844, #4861, #4940, #4962, #5119, #5155, #5190, #5203, #5205, #5212, #5216, #5217, #5293, #5348, #5350, #5352, #5356, #5404, #5417, #5435, #5457, #5476, #5541, #5545, #5606, #5636, #5714, #5715, #5718, #5723, #5743, #5793, #5796, #5797, #5808, #5828, #5829, #5830, #5831, #5832, #5837, #5840, #5841, #5842, #5843, #5848, #5862, #5880, #5903, #5921, #5927, #5930, #5935, #5953, #5963, #5964, #5970, #5972, #5977, #5984, #5993, #5995, #5996, #5997, #6000, #6002 and #6003 on the opam side and ocaml/opam-repository#25234, ocaml/opam-repository#25235, ocaml/opam-repository#25440, ocaml/opam-repository#25442, ocaml/opam-repository#25454, ocaml/opam-repository#25512, ocaml/opam-repository#25861, ocaml/opam-repository#26026 and ocaml/opam-repository#26033 on the opam-repository side which is all available with opam 2.2.0~beta3!

@dra27 dra27 closed this as completed Jun 13, 2024
@dra27
Copy link
Member

dra27 commented Jun 13, 2024

To answer the original question:

Does OPAM work on windows?

Yes, it does 🥳

@kit-ty-kate kit-ty-kate added this to the 2.2.0~rc1 milestone Jun 13, 2024
@AltGr
Copy link
Member

AltGr commented Jun 15, 2024

I can't understate how much of an achievement this is... My deepest regards to the team.

Wanted to react with 🤯 but Github doesn't have that option :)

@aryx
Copy link

aryx commented Jun 19, 2024

Thank you so much guys! This is useful! I hate windows but this is useful!

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

No branches or pull requests