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

libree 3.1.1 make check fails on aarch64 on alpine linux #78

Open
ncopa opened this issue May 16, 2022 · 6 comments
Open

libree 3.1.1 make check fails on aarch64 on alpine linux #78

ncopa opened this issue May 16, 2022 · 6 comments

Comments

@ncopa
Copy link

ncopa commented May 16, 2022

gcc -shared -Wl,-soname,libx.so -o v1/libx.so -Wl,--version-script,v1.map v1.c
gcc -shared -Wl,-soname,libx.so -o v2/libx.so -Wl,--version-script,v2.map v2.c
gcc -o exe_v1 main.c v1/libx.so "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/06_symbol_versions/v2" "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/06_symbol_versions/v1"
gcc -o exe_v2 main.c v2/libx.so "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/06_symbol_versions/v1" "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/06_symbol_versions/v2"
../../libtree exe_v1
exe_v1 
└── libx.so [rpath]
../../libtree exe_v2
exe_v2 
└── libx.so [rpath]
make[1]: Leaving directory '/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/06_symbol_versions'
make[1]: Entering directory '/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath'
echo 'int b(){return 10;}' | gcc -shared -Wl,-soname,libb.so -Wl,--no-as-needed -o libb.so -Wno-implicit-function-declaration -nostdlib -x c -
mkdir dir
echo 'int a(){return 42;}' | gcc -shared -Wl,-soname,liba.so -Wl,--no-as-needed -o dir/liba.so -nostdlib -x c -
echo 'int b(){return a();}' | gcc -shared -Wl,-soname,libb.so -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$ORIGIN' -Wno-implicit-function-declaration -o dir/libb.so -nostdlib dir/liba.so -x c -
echo 'int _start(){return b();}' | gcc -Wl,--no-as-needed -Wl,--disable-new-dtags "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath" libb.so -o exe_rpath -Wno-implicit-function-declaration -nostdlib -x c -
echo 'int _start(){return b();}' | gcc -Wl,--no-as-needed -Wl,--enable-new-dtags "-Wl,-rpath,/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath" libb.so -o exe_runpath -Wno-implicit-function-declaration -nostdlib -x c -
../../libtree exe_rpath
exe_rpath 
└── libb.so [rpath]
LD_LIBRARY_PATH="/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath/dir" ../../libtree exe_rpath
exe_rpath 
└── libb.so [rpath]
../../libtree exe_runpath
exe_runpath 
└── libb.so [runpath]
LD_LIBRARY_PATH="/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath/dir" ../../libtree exe_runpath
exe_runpath 
└── libb.so [LD_LIBRARY_PATH]
    └── liba.so [rpath]
make[1]: Leaving directory '/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/04_rpath_over_env_over_runpath'
make[1]: Entering directory '/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/05_32_bits'
mkdir -p lib32
mkdir -p lib64
echo 'int a(){return 42;}' | gcc -shared -Wl,-soname,libx.so -m32 -o lib32/libx.so -nostdlib -x c -
echo 'int a(){return 42;}' | gcc -shared -Wl,-soname,libx.so -m64 -o lib64/libx.so -nostdlib -x c -
gcc: error: unrecognized command-line option '-m32'
make[1]: *** [Makefile:16: lib32/libx.so] Error 1
make[1]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option '-m64'
make[1]: *** [Makefile:12: lib64/libx.so] Error 1
make[1]: Leaving directory '/home/ncopa/aports/community/libtree/src/libtree-3.1.1/tests/05_32_bits'
make: *** [Makefile:34: check] Error 1
@haampie
Copy link
Owner

haampie commented May 16, 2022

Hm, maybe those should be conditional

@alexmyczko
Copy link

@haampie
Copy link
Owner

haampie commented May 19, 2022

@ismaell / @iluceno do you have a suggestion for a bmake compatible way to test for say -m32 / -m64 flag support? I don't want to add a configure script. If it's not easy then I'll just stick to gmake for make check targets.

@ncopa
Copy link
Author

ncopa commented May 19, 2022

are there any architectures other than x86_64 that supports multilib with -m32/-m64?

@ismaell
Copy link
Contributor

ismaell commented May 21, 2022

I'm not sure it makes sense to test for a flag, shouldn't it just explicitly test all the supported ISAs on all the architectures?

@ismaell
Copy link
Contributor

ismaell commented Aug 22, 2022

I'll try to come up with a solution compatible with cross-compiling tonight.

ismaell added a commit to ismaell/libtree that referenced this issue Aug 23, 2022
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

4 participants