bneradt commented on issue #7353: URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-996992540
@ancjf : When I add `-static` to my configure line as you suggest, it fails configuration. I don't get as far as you, since you seem to make to to compilation with these flags. Here's how this can be reproduced using our CI's centos 8 docker image: ``` docker pull controller.trafficserver.org/ats/centos:8 docker run -it controller.trafficserver.org/ats/centos:8 /bin/bash # Now, from within the running container: git clone https://github.com/apache/trafficserver.git cd trafficserver/ autoreconf -fi # Repeating your configure line: ./configure CFLAGS="-DBIG_SECURITY_HOLE" CXXFLAGS="-DBIG_SECURITY_HOLE" LDFLAGS="-lpthread -ldl -lz -static" --prefix=/opt/trafficserver-8.1.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether UID '0' is supported by ustar format... yes checking whether GID '0' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking whether to enable maintainer-specific portions of Makefiles... yes checking whether make supports nested variables... (cached) yes checking for chosen layout... TrafficServer checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking whether to enable debugging... no checking whether to enable mime sanity check... no checking whether to enable all asserts, a cheaper debug... no checking whether to code coverage... no checking whether to enable -Werror... no checking whether to enable asan... no checking whether to enable lsan... no checking whether to enable tsan... no checking whether to enable fast SDK APIs... no checking whether to enable CURL... yes checking for a sed that does not truncate output... /usr/bin/sed checking for curl-config... /opt/bin/curl-config checking for curl (7.79.0-DEV) >= 7.19... yes checking whether to enable diags... yes checking whether to enable fips... no checking whether to enable regression tests... yes checking whether to enable expensive unit tests... no checking for java... java Checking whether to build documentation: Will build documentation: no checking whether to enable WCCP v2 support... no checking whether to enable profiler... no checking whether to enable eventfd()... yes checking whether to use POSIX capabilities... auto checking whether to use hwloc library... yes checking whether to enable ccache... no checking whether to enable hardening of the executables... no checking whether to enable TPROXY based transparency... auto checking whether to enable experimental plugins... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBMAGICKCPP... no checking for LIBMAGICKCPP... yes checking whether to install example plugins... no checking whether to install testing tools... no checking whether to allow 32-bit builds... no checking for cc... cc checking whether the C compiler works... no configure: error: in `/root/trafficserver': configure: error: C compiler cannot create executables See `config.log' for more details ``` The config.log has this: ``` compilation terminated. configure:7024: $? = 1 configure:7044: checking whether the C compiler works configure:7066: cc -DBIG_SECURITY_HOLE -lpthread -ldl -lz -static conftest.c >&5 /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -ldl /usr/bin/ld: cannot find -lz /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status configure:7070: $? = 1 configure:7108: result: no ``` Simplifying to ` ./configure LDFLAGS="-static" --prefix=/opt/trafficserver-8.1.0` produces a similar error. I also get the same results if I checkout and repeat these commands from 8.1.x. Perhaps I'm missing some steps you performed to get as far as you did? Can you reproduce your build in the centos:8 docker image as I describe above? Or, alternatively, can you point me to a docker image I can reproduce your results in? Without more information, I'm blocked from reproducing your situation and, subsequently, working on a fix. Thanks, Brian -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
