Closed talex5 closed 8 years ago
The linked scripts probably just forgot the load the initial environment. Try this version: https://github.com/fdopen/ocaml-ci-scripts https://raw.githubusercontent.com/fdopen/ocaml-ci-scripts/master/appveyor.yml https://raw.githubusercontent.com/fdopen/ocaml-ci-scripts/master/appveyor-opam.sh
That fixes it for me - thanks!
Can you make a patch to upstream (to the appveyor scripts)? that looks like a nice fix :-)
However, although ocurl now installs, it doesn't run for me. I tried with 0install, and also with the ocurl examples. I get:
C:/OCaml64/home/User/ocurl.0.7.6/examples/ocurl.exe: error while loading shared libraries: libcurl-4.dll: cannot open shared object file: No such file or directory
What do I need to do to let it find the libraries it needs?
The dlls are inside C:/OCaml64/usr/x86_64-w64-mingw32/sys-root/mingw/bin
. Windows won't find them there by default. You must either add this folder to your PATH or copy the used dlls from there to the folder of your binary.
The cygwin maintainer use this convention to avoid name clashes. There is one curl-config
script at /usr/bin
(for cygwin's version of libcurl), one in /usr/x86_64-w64-mingw32/sys-root/mingw/bin
(64-bit native windows) and one in /usr/i686-w64-mingw32/sys-root/mingw/bin
(32-bit native windows). The dll at /usr/x86_64-w64-mingw32/sys-root/mingw/bin
and /usr/i686-w64-mingw32/sys-root/mingw/bin
usually have identical names.
If your cygwin version has the same word size as your compiled program, cygcheck examples/ocurl.exe
will output a dependency graph and complain about missing dlls. Otherwise, you can use something like x86_64-w64-mingw32-objdump.exe -p examples/ocurl.exe | grep -i 'DLL Name:'
and repeat it recursively for each listed dll. However, it won't work for complex libraries that decide at runtime, which libraries to load (gtk2+, qt, ... ).
Thanks - that fixed it!
I'm trying to use @samoht's Appveyor scripts to build 0install on Windows. All the dependencies install except for ocurl. Any chance of getting that supported? I get:
Thanks!