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 on AArch64 Linux #29

Open
tom91136 opened this issue May 27, 2024 · 2 comments
Open

Cannot build on AArch64 Linux #29

tom91136 opened this issue May 27, 2024 · 2 comments

Comments

@tom91136
Copy link

While installing this package on a AArch64 Linux machine, I got the following error at link time:

* installing to library ‘/root/tmp/libdir’
* installing *source* package ‘Rbeast’ ...
** package ‘Rbeast’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c _beastv2_gui_plot.c -o _beastv2_gui_plot.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c _beastv2_gui_winmain.c -o _beastv2_gui_winmain.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_common.c -o abc_common.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_cpu.c -o abc_cpu.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_date.c -o abc_date.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_dir.c -o abc_dir.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_R.c -o abc_ide_util_R.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_common.c -o abc_ide_util_common.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_matlab.c -o abc_ide_util_matlab.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_python.c -o abc_ide_util_python.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ioFlush.c -o abc_ioFlush.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_lzw.c -o abc_lzw.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mat.c -o abc_mat.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math.c -o abc_math.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math_avx.c -o abc_math_avx.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math_avx512.c -o abc_math_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mcmc.c -o abc_mcmc.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mem.c -o abc_mem.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mem_ext.c -o abc_mem_ext.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_pthread.c -o abc_pthread.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_global.c -o abc_rand_pcg_global.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local.c -o abc_rand_pcg_local.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_avx2.c -o abc_rand_pcg_local_avx2.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_avx512.c -o abc_rand_pcg_local_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_generic.c -o abc_rand_pcg_local_generic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_sort.c -o abc_sort.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_svd.c -o abc_svd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_system.c -o abc_system.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_timer.c -o abc_timer.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_tranpose.c -o abc_tranpose.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ts_func.c -o abc_ts_func.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec.c -o abc_vec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_avx2.c -o abc_vec_avx2.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_avx512.c -o abc_vec_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_generic.c -o abc_vec_generic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_win32_demo.c -o abc_win32_demo.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4.c -o beastv2_COREV4.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_bic.c -o beastv2_COREV4_bic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_bic_mthrd.c -o beastv2_COREV4_bic_mthrd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_gui.c -o beastv2_COREV4_gui.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_mthrd.c -o beastv2_COREV4_mthrd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_allocinitmem.c -o beastv2_basis_allocinitmem.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_computexy_q.c -o beastv2_basis_computexy_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_cvtKnotsToBinVec.c -o beastv2_basis_cvtKnotsToBinVec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_genrandbasis.c -o beastv2_basis_genrandbasis.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_gensegment.c -o beastv2_basis_gensegment.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_pickcmptId.c -o beastv2_basis_pickcmptId.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_proposeNew_q.c -o beastv2_basis_proposeNew_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_updateKsKe_prec0123.c -o beastv2_basis_updateKsKe_prec0123.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_updategoodvec.c -o beastv2_basis_updategoodvec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_date.c -o beastv2_date.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_func_q.c -o beastv2_func_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_in_args.c -o beastv2_io_in_args.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_in_readts.c -o beastv2_io_in_readts.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_allocmem_q.c -o beastv2_io_out_allocmem_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_printargs.c -o beastv2_io_out_printargs.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_tsextractprint.c -o beastv2_io_out_tsextractprint.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_write_q.c -o beastv2_io_out_write_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_model_allocinit_q.c -o beastv2_model_allocinit_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_prior_model.c -o beastv2_prior_model.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_prior_precfunc.c -o beastv2_prior_precfunc.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_svdbasis.c -o beastv2_svdbasis.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_xxyy_allocmem_q.c -o beastv2_xxyy_allocmem_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c globalvars.c -o globalvars.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c glue_code.c -o glue_code.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c tetris.c -o tetris.o
gcc -shared -L/root/r/dist/lib -L/usr/local/lib -o Rbeast.so _beastv2_gui_plot.o _beastv2_gui_winmain.o abc_common.o abc_cpu.o abc_date.o abc_dir.o abc_ide_util_R.o abc_ide_util_common.o abc_ide_util_matlab.o abc_ide_util_python.o abc_ioFlush.o abc_lzw.o abc_mat.o abc_math.o abc_math_avx.o abc_math_avx512.o abc_mcmc.o abc_mem.o abc_mem_ext.o abc_pthread.o abc_rand_pcg_global.o abc_rand_pcg_local.o abc_rand_pcg_local_avx2.o abc_rand_pcg_local_avx512.o abc_rand_pcg_local_generic.o abc_sort.o abc_svd.o abc_system.o abc_timer.o abc_tranpose.o abc_ts_func.o abc_vec.o abc_vec_avx2.o abc_vec_avx512.o abc_vec_generic.o abc_win32_demo.o beastv2_COREV4.o beastv2_COREV4_bic.o beastv2_COREV4_bic_mthrd.o beastv2_COREV4_gui.o beastv2_COREV4_mthrd.o beastv2_basis_allocinitmem.o beastv2_basis_computexy_q.o beastv2_basis_cvtKnotsToBinVec.o beastv2_basis_genrandbasis.o beastv2_basis_gensegment.o beastv2_basis_pickcmptId.o beastv2_basis_proposeNew_q.o beastv2_basis_updateKsKe_prec0123.o beastv2_basis_updategoodvec.o beastv2_date.o beastv2_func_q.o beastv2_io_in_args.o beastv2_io_in_readts.o beastv2_io_out_allocmem_q.o beastv2_io_out_printargs.o beastv2_io_out_tsextractprint.o beastv2_io_out_write_q.o beastv2_model_allocinit_q.o beastv2_prior_model.o beastv2_prior_precfunc.o beastv2_svdbasis.o beastv2_xxyy_allocmem_q.o globalvars.o glue_code.o tetris.o -lpthread -lm -L/root/r/dist/lib -lR
installing to /root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘Rbeast’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object ‘/root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs/Rbeast.so’:
  /root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs/Rbeast.so: undefined symbol: __builtin_readcyclecounter
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/root/tmp/libdir/Rbeast’

What happened was that the following function uses the compiler built-in __builtin_readcyclecounter:
https://github.com/zhaokg/Rbeast/blob/master/R/src/abc_timer.h#L101
__builtin_readcyclecounter is not implemented in GCC when targeting AArch64, but Clang does so M1 Mac linked OK.

I propose we handle the cpu_ARM64 case following the patch to a similar issue that resolved it for MariaDB: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=216668&action=diff

Essentially they check if the built-in exists and if not fallback to inline ASM, and since we know it's AArch64, it should be relatively safe.
I'm happy to open a PR to fix this.

@zhaokg
Copy link
Owner

zhaokg commented Jun 5, 2024

Dear Tom,

First, really appreciate your input, which is extremely insightful and helpful. To properly acknowledge you, would you mind opening a PR and fix it? I will merge it so some proper credits can be given to you.

Once again, thanks a lot for sharing your expertise.

Kaiguang

@pat-s
Copy link

pat-s commented Sep 14, 2024

Arriving here as I also encountered this error. Would be cool to get a fix!

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