conda-forge / erlang-feedstock

A conda-smithy repository for erlang.
BSD 3-Clause "New" or "Revised" License
0 stars 11 forks source link

Aarch64 / ppc64le bootstrap #159

Closed danielhollas closed 1 week ago

danielhollas commented 1 month ago

Checklist

Closes #154. Builds on top of #155

conda-forge-webservices[bot] commented 1 month ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

conda-forge-webservices[bot] commented 1 month ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

danielhollas commented 1 month ago

@jakirkham I am little out of my depth here. :anguished: I added the required bootstrap step, and its compilation succeeds, but it fails during make install step

make[2]: Entering directory '$SRC_DIR/erts/start_scripts'
make -w RELEASE_PATH="$PREFIX/../bootstrap/lib/erlang"   release_spec 
make[3]: Entering directory '$SRC_DIR/erts/start_scripts'
 GEN    $SRC_DIR/erts/start_scripts/start_clean.rel
 GEN    $SRC_DIR/erts/start_scripts/start_sasl.rel
 GEN    $SRC_DIR/erts/start_scripts/start_all_example.rel
 GEN    $SRC_DIR/erts/start_scripts/no_dot_erlang.rel
 GEN    $SRC_DIR/erts/start_scripts/start_clean.script
stdlib: No valid version ("6.0") of .app file found. Found file "$SRC_DIR/bootstrap/lib/stdlib/ebin/stdlib.app" with version "5.0.2"

kernel: No valid version ("10.0") of .app file found. Found file "$SRC_DIR/bootstrap/lib/kernel/ebin/kernel.app" with version "9.0.2"

make[3]: *** [Makefile:84: /home/conda/feedstock_root/build_artifacts/erlang_1716247734646/work/erts/start_scripts/start_clean.script] Error 1
make[3]: Leaving directory '$SRC_DIR/erts/start_scripts'

Relatedly, it is not clear to me how to robustly isolate the bootstrap step from the rest of the build, since there is a lot of global state in the environment that is setup for cross-compilation (and installing to $PREFIX), but the bootstrap step must be compiled without the cross-compilation stuff.

jakirkham commented 1 month ago

Let's add ppc64le here to skip it

https://github.com/conda-forge/erlang-feedstock/blob/99e5cb58508cc9344f28027b15222078da86ea20/recipe/meta.yaml#L13

Would rather not hold things up debugging that

Would you be willing to add yourself as a maintainer? 🙂

danielhollas commented 1 month ago

On the latest run I got:

  • /home/conda/feedstock_root/build_artifacts/erlang_1716799052956/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/epmd -kill 2024-05-27T09:09:08.0798261Z Killing not allowed - living nodes in database.

I'll try to insert some sleep to make this more robust.

danielhollas commented 1 month ago

I've finally had a chance to run the build on an actual ARM hardware (Mac M2). I ran the test suite and it mostly passed. There was one issue when compiling the ethread_SUITE tests where I got

/usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg':

ethr_atomics.c:(.text+0x50): undefined reference to `__aarch64_cas16_sync'

I don't have time to debug this further but it might be an issue with the gcc compiler toolchain since I was running the tests in a different Docker image (i.e. not the one that conda build uses).

So I think this PR is ready to go @jakirkham, appologies for the delay. Once we do a release and we do a follow-up release of rabbitmq I will be able to do more testing.

Full log of a failed test suite ``` === Config function: ct_framework:init_per_suite/1 === Group properties: [{suite,ethread_SUITE}] === Config value: [{tc_logfile,"/home/jovyan/erlang/tests/test_server/ct_run.test_server@4c036bb83abf.2024-06-04_07.54.48/tests.system_test.ethread_SUITE.max_threads.logs/run.2024-06-04_07.54.55/ct_framework.init_per_suite.html"}, {tc_group_properties,[{suite,ethread_SUITE}]}, {tc_group_path,[]}, {data_dir,"/home/jovyan/erlang/tests/system_test/ethread_SUITE_data/"}, {priv_dir,"/home/jovyan/erlang/tests/test_server/ct_run.test_server@4c036bb83abf.2024-06-04_07.54.48/tests.system_test.ethread_SUITE.max_threads.logs/run.2024-06-04_07.54.55/log_private/"}] === Current directory is "/home/jovyan/erlang/tests/test_server/ct_run.test_server@4c036bb83abf.2024-06-04_07.54.48" === Started at 2024-06-04 07:54:55 Making "/home/jovyan/erlang/tests/system_test/ethread_SUITE_data/Makefile" gcc -g -O2 -D_THREAD_SAFE -D_REENTRANT -o gccifier ../utils/gccifier.c -lresolv -lm ./gccifier -CC"gcc" -Wall -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_GNU_SOURCE -g -O2 -D_THREAD_SAFE -D_REENTRANT -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LINUX_TCP_H=1 -DHAVE_SANE_LINUX_TCP_H=1 -DHAVE_POLL_H=1 -DHAVE_STRERROR=1 -DHAVE_VSNPRINTF=1 -DHAVE_USLEEP=1 -DHAVE_LIBRESOLV=1 -DHAVE_FINITE=1 -I/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/include/internal -I/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/include/internal -o ethread_tests ethread_tests.c -lerts_internal_r -lresolv -lm -L/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal -lethread -lerts_internal_r -lpthread -lrt ==> gcc "-Wall" "-DUSE_THREADS" "-D_THREAD_SAFE" "-D_REENTRANT" "-DPOSIX_THREADS" "-D_POSIX_THREAD_SAFE_FUNCTIONS" "-D_GNU_SOURCE" "-g" "-O2" "-D_THREAD_SAFE" "-D_REENTRANT" "-DPACKAGE_NAME=""" "-DPACKAGE_TARNAME=""" "-DPACKAGE_VERSION=""" "-DPACKAGE_STRING=""" "-DPACKAGE_BUGREPORT=""" "-DPACKAGE_URL=""" "-DHAVE_LIBM=1" "-DHAVE_STDIO_H=1" "-DHAVE_STDLIB_H=1" "-DHAVE_STRING_H=1" "-DHAVE_INTTYPES_H=1" "-DHAVE_STDINT_H=1" "-DHAVE_STRINGS_H=1" "-DHAVE_SYS_STAT_H=1" "-DHAVE_SYS_TYPES_H=1" "-DHAVE_UNISTD_H=1" "-DSTDC_HEADERS=1" "-DHAVE_LINUX_TCP_H=1" "-DHAVE_SANE_LINUX_TCP_H=1" "-DHAVE_POLL_H=1" "-DHAVE_STRERROR=1" "-DHAVE_VSNPRINTF=1" "-DHAVE_USLEEP=1" "-DHAVE_LIBRESOLV=1" "-DHAVE_FINITE=1" "-I/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/include/internal" "-I/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/include/internal" "-o" "ethread_tests" "ethread_tests.c" "-lerts_internal_r" "-lresolv" "-lm" "-L/home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal" "-lethread" "-lerts_internal_r" "-lpthread" "-lrt" /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg': ethr_atomics.c:(.text+0x50): undefined reference to `__aarch64_cas16_sync' /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg_ddrb': ethr_atomics.c:(.text+0xa0): undefined reference to `__aarch64_cas16_sync' /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg_rb': ethr_atomics.c:(.text+0xf0): undefined reference to `__aarch64_cas16_sync' /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg_wb': ethr_atomics.c:(.text+0x140): undefined reference to `__aarch64_cas16_sync' /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o): in function `ethr_dw_atomic_cmpxchg_acqb': ethr_atomics.c:(.text+0x190): undefined reference to `__aarch64_cas16_sync' /usr/bin/ld: /home/jovyan/.conda/envs/erlang/lib/erlang/erts-15.0/lib/internal/libethread.a(ethr_atomics.o):ethr_atomics.c:(.text+0x1e0): more undefined references to `__aarch64_cas16_sync' follow collect2: error: ld returned 1 exit status make: *** [Makefile:45: ethread_tests] Error 1 *** User 2024-06-04 07:54:55.946 *** [🔗](file:///tmp/erlang/ct_run.test_server@4c036bb83abf.2024-06-04_07.54.48/tests.system_test.ethread_SUITE.max_threads.logs/run.2024-06-04_07.54.55/ct_framework.init_per_suite.html#e-1) ts_install_cth failed! exit:{{make_failed,make},[{ts_make,make,1, [{file,"ts_make.erl"}, {line,34}]}, {ts_lib,make_non_erlang_do, 2, [{file,"ts_lib.erl"}, {line,376}]}, {ts_install_cth, pre_init_per_suite,3, [{file,"ts_install_cth.erl"}, {line,105}]}, {ct_hooks,catch_apply,3, [{file,"ct_hooks.erl"}, {line,1165}]}, {ct_hooks,do_call_generic,4, [{file,"ct_hooks.erl"}, {line,890}]}, {ct_hooks,call,4, [{file,"ct_hooks.erl"}, {line,947}]}, {ct_hooks,call,4, [{file,"ct_hooks.erl"}, {line,951}]}, {ct_hooks,call,4, [{file,"ct_hooks.erl"}, {line,934}]}]} ```
danielhollas commented 4 weeks ago

@conda-forge-admin please rerender

danielhollas commented 1 week ago

@jakirkham friendly ping :-) This is ready from my side, LMK if there is anything else I can do.

jakirkham commented 1 week ago

@conda-forge-admin , please re-render

jakirkham commented 1 week ago

@conda-forge-admin , please re-render

github-actions[bot] commented 1 week ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/erlang-feedstock/actions/runs/9650888839.

github-actions[bot] commented 1 week ago

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

Thus the PR was passing and merged! Have a great day!

jakirkham commented 1 week ago

Thanks Daniel! 🙏

Sorry was afk for some time. Catching up now. Looks good and have merged. Hopefully this helps unblock you 🙂