Bug 64456

Summary: [APR] Autotools configure fails when compiler is clang on Linux
Product: APR Reporter: Joe Burzinski <tridacnid>
Component: APRAssignee: Apache Portable Runtime bugs mailinglist <bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: 1.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Joe Burzinski 2020-05-19 21:07:31 UTC
I saw that apr had been added to the conan center index so I went to check it out. Sadly, the package refuses to get through the configure stage because of a compiler warning turned error by -Werror.

reported by configure:
...
checking whether int64_t and int use fmt %d... no
checking whether int64_t and long use fmt %ld... no
checking whether int64_t and long long use fmt %lld... no
configure: error: could not determine the string function for int64_t

from config.log:
...
configure:24281: checking whether int64_t and long long use fmt %lld
configure:24313: /software/clang/9.0.0/bin/clang -c -m64 -O3 -s -fPIC -pthread  -Werror -DNDEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE conftest.c >&5
clang-9: error: argument unused during compilation: '-s' [-Werror,-Wunused-command-line-argument]
configure:24313: $? = 1

If the fix isn't too involved a patch could also be submitted to the conan center index to fix 1.7.0.

I'll try digging around a bit but I'm an Autotools novice.
Comment 1 Joe Burzinski 2020-05-19 22:06:48 UTC
Turns out it's user error. I was running Conan with a gcc profile but had manually overridden the CC and CXX env vars to point to my clang compiler. Conan will set -s for a gcc build but not a clang build.

Feel free to close this out.