haxe
haxe copied to clipboard
Issues with building Haxe on windows
There are issues with latest versions of ctypes and camlp5 opam modules.
This issue is created to not forget to fix them and then update dependencies in opam
file.
- [ ] ctypes (needs an update on Haxe side)
- [ ] camlp5 (needs a fix on camlp5 side: https://github.com/camlp5/camlp5/issues/77)
Currently for windows ctypes
should be at version 0.17 and camlp5 at 8.00~alpha.
I have a proposal. Introduce a tag for issues concerned with build process and add link to the building page which will point to label:building
.
Also version (1.7.6) for extlib in the opam file is wrong, 1.7.8 required now.
I have tried to follow the instructions and found that libUV on opam isn't building. I've tried the regular CYGWIN distribution and the special one that comes with the ocaml for windows build. I can't get the latest haxe to compile because I can't get the luv dependency in opam to install.
What is the error?
$ opam install luv
The following actions will be performed:
- install luv 0.5.11
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[luv.0.5.11] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of luv failed at "/home/writt/.opam/default/bin/dune build -p luv -j 15".
#=== ERROR while compiling luv.0.5.11 =========================================#
# context 2.0.7 | cygwin/x86_64 | ocaml-system.4.10.0 | https://opam.ocaml.org#889ba0f6
# path ~/.opam/default/.opam-switch/build/luv.0.5.11
# command ~/.opam/default/bin/dune build -p luv -j 15
# exit-code 1
# env-file ~/.opam/log/luv-44412-05296d.env
# output-file ~/.opam/log/luv-44412-05296d.out
### output ###
# bash src/c/dlluv.so,src/c/libuv.a (exit 1)
# (cd _build/default/src/c && /usr/bin/bash -e -u -o pipefail -c 'cp vendor/libuv/libuv.so.1.0.0 dlluv.so || cp vendor/libuv/libuv.1.dylib dlluv.so || cp vendor/bin/libuv-1.dll dlluv.dll' &> /dev/null
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build luv 0.5.11
+-
- No changes have been performed
nothing helpful I'm afraid. I tried building the latest libuv and it failed on cygwin.
Consolidate compiler generated dependencies of target uv_a
[ 50%] Built target uv_a
Consolidate compiler generated dependencies of target uv
[ 51%] Linking C shared library cyguv-1.dll
/usr/bin/ld: CMakeFiles/uv.dir/src/uv-common.c.o:uv-common.c:(.text+0x74cf): undefined reference to `uv__process_title_cleanup'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/core.c.o:core.c:(.text+0xd): undefined reference to `uv__hrtime'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/core.c.o:core.c:(.text+0x181): undefined reference to `uv__fs_event_close'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/core.c.o:core.c:(.text+0x7c7): undefined reference to `uv__io_poll'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/core.c.o:core.c:(.text+0x86f): undefined reference to `uv__hrtime'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/core.c.o:core.c:(.text+0x1dbb): undefined reference to `uv__platform_invalidate_fd'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/loop.c.o:loop.c:(.text+0x2f9): undefined reference to `uv__platform_loop_init'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/loop.c.o:loop.c:(.text+0x577): undefined reference to `uv__platform_loop_delete'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/loop.c.o:loop.c:(.text+0x60f): undefined reference to `uv__hrtime'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/loop.c.o:loop.c:(.text+0x64f): undefined reference to `uv__io_fork'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/loop.c.o:loop.c:(.text+0x7c9): undefined reference to `uv__platform_loop_delete'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/poll.c.o:poll.c:(.text+0x41): undefined reference to `uv__io_check_fd'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/poll.c.o:poll.c:(.text+0x3ea): undefined reference to `uv__platform_invalidate_fd'
/usr/bin/ld: CMakeFiles/uv.dir/src/unix/thread.c.o:thread.c:(.text+0xb6c): undefined reference to `uv__hrtime'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/uv.dir/build.make:545: cyguv-1.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/uv.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I'm going through this mess again at the moment. What helped with the luv situation is following these instructions: https://github.com/HaxeFoundation/haxe/pull/11182