-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cannot build Haxe on Alpine Edge #12
Comments
I am glad to see you're interested in packaging Haxe. Be aware it can take much more effort and time than one may have expected. Building docker images and packaging for Linux distributions use different approaches. Here in docker-library-haxe we used opam to install OCaml compiler and libraries, but most Linux distributions require packages to use only dependencies from the distribution itself because the whole point of a "distribution" is to have consistency and compatibility across all the packages. That means, instead of using opam, you should specify OCaml and each OCaml libraries in You may find the package source for other Linux distributions more useful (than the Dockerfile here): For library compatibility issues, e.g. mbedtls 3 support, you will have to use patches. You can use the ones used in other distros, e.g. https://github.com/HaxeFoundation/haxe-debian/blob/master/debian/patches/mbedtls3.patch |
I added the patches and it mostly builds on alpine with mbedtls3 except for this error: https://gitlab.alpinelinux.org/anjandev/aports/-/jobs/1578896#L1586 Do you know what Im missing? @andyli |
The error showed that luv 0.5.12 failed to compile. You may try luv's latest version, i.e. 0.5.14 instead. Something like Note that the OPAM luv use its own vendored libuv. Again, I believe the proper way is to use alpine's libuv package instead, but it's all up to the alpine developers to decide whether its acceptable or not. |
As Andy has noted, packaging Haxe (and other OCaml packages in general) is not an easy task. Based on the build log at https://gitlab.alpinelinux.org/anjandev/aports/-/jobs/1599186#L6223 it seems this is bringing back 3 packages (including camlp5) that were deleted from Alpine a while ago due to various issues. While looking through git history, i also noticed that Andy was the previous maintainer of Haxe in Alpine, so maybe Andy can share more details surrounding the previous deletion of Haxe from Alpine. I think the Alpine devs could use an assurance that Haxe will not be added just to be deleted again a few months down the line. From the discussions on I understand that while this may not be usually done in OCaml circles, other languages have popularized the use of lockfiles, and Alpine has sort of grown to rely on this behavior whenever language-specific package managers like OPAM are used during a build, so having deterministic dependency versions could be another prerequisite for a package to be accepted. |
I have done the pinning. Now, I can reproduce https://bugs.gentoo.org/941760 and aantron/luv#159 on alpine: https://gitlab.alpinelinux.org/anjandev/aports/-/jobs/1600571#L6083 |
According to https://gitlab.alpinelinux.org/anjandev/aports/-/jobs/1600571#L6010 you have only pinned My intention in mentioning how Haskell projects are packaged is to point out that perhaps you have to pin all versions (other languages do that with a lockfile) in order to meet the criteria. |
I meant I have done the pinning for the packages other distros have pinned. Arch and gentoo only pin luv and extlib. Yes, I will pin all the packages once I have gotten this package to build on alpine edge. However, that log file's issue is not related to me not pinning all the dependencies. luv 0.5.14 doesnt work with haxe but I need luv 0.5.14 to build with the gcc 14 - the only gcc available on alpine edge. See: aantron/luv#159 As far as I can tell, the latest haxe release cannot build with gcc 14 which is the only gcc that will ship with the next release of alpine. |
Haxe has been merged into alpine edge 🚀🚀🚀🚀 |
Hi,
I am trying to write a package for alpine linux using your docker recipe for alpine 3.20 :
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/69597
Although the package build works on alpine 3.20, it does not work on alpine edge. Moreover, it seems Celeste has some noted some issues you may have in the future:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/69597#note_423099
I need to be able to package haxe in alpine so I can package a project I wrote using haxe.
Please let me know if you have a solution or if I can help test.
The text was updated successfully, but these errors were encountered: