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

support arm64 builds #13

Open
linuxmaniac opened this issue Mar 11, 2024 · 8 comments
Open

support arm64 builds #13

linuxmaniac opened this issue Mar 11, 2024 · 8 comments

Comments

@linuxmaniac
Copy link
Collaborator

planning to add support for arm64

@linuxmaniac
Copy link
Collaborator Author

@mika what is missing from our side to be able to add arm64 architecture in the builds?

@mika
Copy link
Member

mika commented Mar 11, 2024

@linuxmaniac I'd say setting up arm64 based jenkins slaves? All the building blocks should be there, so I'd say let's look into this together? :)

@linuxmaniac
Copy link
Collaborator Author

I would say we just need to cross-build in the same nodes.

@mika
Copy link
Member

mika commented Mar 11, 2024

Also fine for me, though did you test what build times we'd have? (arm64 via qemu is wayyyy slower than native builds)

@guillemj
Copy link
Contributor

We might only need to use qemu if we want to run arm64 code, such as from the test suite. Otherwise using the gcc crosstoolchains should be enough. We'd need to check whether the kamailio code is cross-buildable though. :)

@linuxmaniac
Copy link
Collaborator Author

Yes, we don't need to run any arm64 code, just build it. And yes, kamailio can be built and executed in arm64.

@linuxmaniac
Copy link
Collaborator Author

Initial phase merged:

@linuxmaniac
Copy link
Collaborator Author

linuxmaniac commented Nov 16, 2024

Initial issues:

/usr/bin/make every-module group_include="kerlang" quiet=verbose
make[1]: Entering directory '/build/kamailio-6.0.0~dev3+bpo12.20241116023637.2810'
/usr/bin/make -C src/ every-module 
make[2]: Entering directory '/build/kamailio-6.0.0~dev3+bpo12.20241116023637.2810/src'
config.mak loaded
Makefile.defs defs skipped
Makefile.defs defs skipped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
Makefile:16: *** Not found Erlang.  Stop.
make[2]: *** [Makefile:508: modules] Error 1
make[2]: Leaving directory '/build/kamailio-6.0.0~dev3+bpo12.20241116023637.2810/src'
make[1]: *** [Makefile:34: every-module] Error 2
make[1]: Leaving directory '/build/kamailio-6.0.0~dev3+bpo12.20241116023637.2810'
make: *** [debian/rules:134: build_erlang] Error 2
make: *** Waiting for unfinished jobs....
gcc -fPIC -DPIC -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/kamailio-6.0.0~dev3+ubuntu18.04.20241116023735.2810=. -fstack-protector-strong -Wformat -Werror=format-security -DVERSION_NODATE   -DNAME='"kamailio"' -DVERSION='"6.0.0-dev3"' -DARCH='"aarch64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 7.5.0"' -D__CPU_aarch64 -D__OS_linux -DVERSIONVAL=6000000 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DNOSMP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT  -DMOD_NAME='"ims_dialog"' -DMOD_NAMEID='ims_dialog' -c dlg_var.c -o dlg_var.o -MMD -MP
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): In function `sha1_block_armv8':
(.text+0x1240): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): In function `poly1305_emit_neon':
(.text+0x9a0): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): In function `sha256_block_data_order':
(.text+0xf88): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): In function `sha512_block_data_order':
(.text+0x10c8): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
../../Makefile.rules:191: recipe for target 'tlsa.so' failed
make[3]: *** [tlsa.so] Error 1
Makefile:508: recipe for target 'modules' failed
make[2]: *** [modules] Error 1
gcc -shared -g -pthread -Wl,-O2 -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_cfg.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_util.o tls_config.o  -lm /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a   -o tlsa.so
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
(.text+0x1240): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_emit_neon':
(.text+0x9a0): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): in function `sha256_block_data_order':
(.text+0xf88): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): in function `sha512_block_data_order':
(.text+0x1108): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make[3]: *** [../../Makefile.rules:191: tlsa.so] Error 1
make[2]: *** [Makefile:508: modules] Error 1
Build timed out (after 240 minutes). Marking the build as failed.
Build was aborted
Build timed out (after 240 minutes). Marking the build as failed.
Build was aborted

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

3 participants