Bug 64456 - [APR] Autotools configure fails when compiler is clang on Linux
Summary: [APR] Autotools configure fails when compiler is clang on Linux
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.7.0
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 21:07 UTC by Joe Burzinski
Modified: 2020-05-19 22:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.