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

Cannot build Haxe on Alpine Edge #12

Open
anjandev opened this issue Oct 16, 2024 · 1 comment
Open

Cannot build Haxe on Alpine Edge #12

anjandev opened this issue Oct 16, 2024 · 1 comment

Comments

@anjandev
Copy link

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.

@andyli
Copy link
Member

andyli commented Oct 16, 2024

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 APKBUILD's makedepends. That also means if any deps have not been packaged yet, you must package them all before you can package Haxe.

You may find the package source for other Linux distributions more useful (than the Dockerfile here):
Fedora: https://src.fedoraproject.org/rpms/haxe/blob/rawhide/f/haxe.spec
openSUSE: https://build.opensuse.org/projects/devel:languages:ocaml/packages/haxe/files/haxe.spec?expand=1
Debian (its package source format is quite different from others): https://github.com/HaxeFoundation/haxe-debian/tree/master/debian

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

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

No branches or pull requests

2 participants