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

mod_ipv6calc cannot be build with clang / apxs libtool issue #45

Open
pbiering opened this issue Dec 5, 2023 · 1 comment
Open

mod_ipv6calc cannot be build with clang / apxs libtool issue #45

pbiering opened this issue Dec 5, 2023 · 1 comment

Comments

@pbiering
Copy link
Owner

pbiering commented Dec 5, 2023

while libtool honors clang from apxs option call -S CC=clang during --mode compile , it uses unconditional gcc on --mode link

/usr/bin/apxs -S CC=clang -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc   -lm -I../ -I../lib/ -I../databases/lib/ -c -Wl,"-lcrypto -ldb -ldb -lcrypto " -Wc,"-O2 -Wall -g -fPIC -D__EXTENSIONS__ -Wformat -Werror -Werror=format-security -Wsizeof-array-argument -Wparentheses-equality -Wextra -Werror=char-subscripts -Wno-deprecated-declarations -Wdate-time -Wno-ignored-optimization-argument" mod_ipv6calc.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile clang -prefer-pic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS  -fstack-protector-strong  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -DLINUX -D_REENTRANT -D_GNU_SOURCE  -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -O2 -Wall -g -fPIC -D__EXTENSIONS__ -Wformat -Werror -Werror=format-security -Wsizeof-array-argument -Wparentheses-equality -Wextra -Werror=char-subscripts -Wno-deprecated-declarations -Wdate-time -Wno-ignored-optimization-argument -I../ -I../lib/ -I../databases/lib/  -c -o mod_ipv6calc.lo mod_ipv6calc.c && touch mod_ipv6calc.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link clang -Wl,-z,relro -Wl,--as-needed -Wl,-z,now   -Wl,--build-id=sha1   -o mod_ipv6calc.la -lcrypto -ldb -ldb -lcrypto   -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc -lm -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_ipv6calc.lo
.libs/mod_ipv6calc.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

bash trace output of --mode link

bash -x /usr/lib64/apr-1/build/libtool --silent --mode=link clang -Wl,-z,relro -Wl,--as-needed -Wl,-z,now   -Wl,--build-id=sha1   -o mod_ipv6calc.la -lcrypto -ldb -ldb -lcrypto   -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc -lm -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_ipv6calc.lo
...
+ eval 'gcc -shared  -fPIC -DPIC  .libs/mod_ipv6calc.o   -ldb -lcrypto -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc -lm -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -Wl,--build-id=sha1   -Wl,-soname -Wl,mod_ipv6calc.so -o .libs/mod_ipv6calc.so'
++ gcc -shared -fPIC -DPIC .libs/mod_ipv6calc.o -ldb -lcrypto -L../lib/ -L../databases/lib/ -lipv6calc_db_wrapper -lipv6calc -lm -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -Wl,--build-id=sha1 -Wl,-soname -Wl,mod_ipv6calc.so -o .libs/mod_ipv6calc.so
.libs/mod_ipv6calc.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
...

any ideas how to fix this?

@pbiering
Copy link
Owner Author

pbiering commented Dec 9, 2023

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

No branches or pull requests

1 participant