Summary: | libtool invocations should use --tag=CC | ||
---|---|---|---|
Product: | APR | Reporter: | Michael Osipov <michaelo> |
Component: | APR | Assignee: | Apache Portable Runtime bugs mailinglist <bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | michaelo |
Priority: | P2 | ||
Version: | 1.6.3 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | HP-UX | ||
Bug Depends on: | |||
Bug Blocks: | 62641 |
Description
Michael Osipov
2018-08-20 15:19:32 UTC
Here is a decent patch: https://github.com/apache/apr/pull/12 Repeating my question from the github pull request;
I'm confused by the docs link you provided;
>>Is it really correct to use the CC tag also for --mode=link?
> As far as I understood the documentation -- yes. We are requesting libtool to link C objects with CC (the compiler). See here;
> https://www.gnu.org/software/libtool/manual/html_node/Tags.html
"If it can’t infer a tag, then it defaults to the configuration for the C language."
So, --tag=CC is default behavior already. I'm puzzled precisely what problem this solves?
As far as I remember from having similar troubls long ago, the libtool script runs into the "unable to infer tagged configuration" error, when you compile with compiler or CC which is not a leading substring of what is set as "CC" (or "LTCC"?) in the libtool script itself. So in some sense libtool, when created, records compiler info and refuses to compile if you change the compiler later in an incompatible way (adding flags at the end of CC would be compatible). What I do not know, if custom CC will overwrite libtool builtin CC when you add the --tag flag. To get the piture clear, we would need to know, what the definition of CC and LTCC is in the various libtool scripts involved (platform one, APR one), what CC was used to compile APR and what CC should be used to compile the artefact that fails compilation. (In reply to Rainer Jung from comment #3) > As far as I remember from having similar troubls long ago, the libtool > script runs into the "unable to infer tagged configuration" error, when you > compile with compiler or CC which is not a leading substring of what is set > as "CC" (or "LTCC"?) in the libtool script itself. > > So in some sense libtool, when created, records compiler info and refuses to > compile if you change the compiler later in an incompatible way (adding > flags at the end of CC would be compatible). > > What I do not know, if custom CC will overwrite libtool builtin CC when you > add the --tag flag. > > To get the piture clear, we would need to know, what the definition of CC > and LTCC is in the various libtool scripts involved (platform one, APR one), > what CC was used to compile APR and what CC should be used to compile the > artefact that fails compilation. This is actually the issue I am expriencing on HP-UX with aCC. The libtool generated differs from the libtool on my system. Especially 'available_tags' are empty. LTCC is not set by me, but CC=/opt/aCC/bin/aCC. The CC assumed at time of packaging libapr is a different one used by me and this does not work. I can provide the output of the failures on Monday as soon as I get access to the HP-UX servers at work. (In reply to William A. Rowe Jr. from comment #2) > Repeating my question from the github pull request; > > I'm confused by the docs link you provided; > > >>Is it really correct to use the CC tag also for --mode=link? > > As far as I understood the documentation -- yes. We are requesting libtool to link C objects with CC (the compiler). See here; > > https://www.gnu.org/software/libtool/manual/html_node/Tags.html > > "If it can’t infer a tag, then it defaults to the configuration for the C > language." > > So, --tag=CC is default behavior already. I'm puzzled precisely what problem > this solves? The default configuration applies to the config at the host system build the libapr tarball which does not match my configuration, different OS, CPU arch and compiler. It is not portable if you don't provide the tag for the language. Guys, can we settle this somehow? I don't see any harm by this. I have tested on three OSes. I don't really want to maintain a fork of a portable library (sic). Committed revision 1865343. I tested this on MacOS Mojave and Fedora, and both builds worked fine. I'm assuming both apr v1.7 and apr-util 1.7 will need backports, can you take a look? Do you want me to provide a PR for 1.7.x? If yes, no issue. I will provide one. If 1.6.x is still supported, I will provide it too. Created two backport PRs: Works with APR 1.7.x, APR-Util 1.6.x, Tomcat Native trunk: $ ldd libaprutil.so.6.2 libapr.so.7.0 libtcnative-1.so.2.23 libaprutil.so.6.2: libapr.so.7 => /net/home/osipovmi/opt/lib/hpux32/libapr.so.7 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libapr.so.7.0: librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libtcnative-1.so.2.23: libssl.so.1.0.0 => /usr/lib/hpux32/libssl.so.1.0.0 libcrypto.so.1.0.0 => /usr/lib/hpux32/libcrypto.so.1.0.0 libapr.so.7 => /net/home/osipovmi/opt/lib/hpux32/libapr.so.7 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 Works with APR 1.6.x, APR-Util 1.6.x, Tomcat Native trunk: $ ldd libaprutil.so.6.2 libapr.so.6.6 libtcnative-1.so.2.23 libaprutil.so.6.2: libapr.so.6 => /net/home/osipovmi/opt/lib/hpux32/libapr.so.6 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libapr.so.6.6: librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libtcnative-1.so.2.23: libssl.so.1.0.0 => /usr/lib/hpux32/libssl.so.1.0.0 libcrypto.so.1.0.0 => /usr/lib/hpux32/libcrypto.so.1.0.0 libapr.so.6 => /net/home/osipovmi/opt/lib/hpux32/libapr.so.6 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 librt.so.1 => /usr/lib/hpux32/librt.so.1 libm.so.1 => /usr/lib/hpux32/libm.so.1 libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 libdl.so.1 => /usr/lib/hpux32/libdl.so.1 Looks good to me now! All remaining PRs have been delivered. Backported to apr 1.7 in 1865793 and apr-util 1.7 in 1865794. (In reply to Graham Leggett from comment #11) > Backported to apr 1.7 in 1865793 and apr-util 1.7 in 1865794. Thanks, why not 1.6.x for both? PRs are there. Largely because there is little likelihood of a revised 1.6.x apr-util, and we won't release another 1.6.x apr now that 1.7.0 is out in the wild. (In reply to William A. Rowe Jr. from comment #13) > Largely because there is little likelihood of a revised 1.6.x apr-util, > and we won't release another 1.6.x apr now that 1.7.0 is out in the wild. OK, this means that I need 1.7.x fixed on HP-UX because does compile, regardless if this change. Something has been broken around thread muteces. I need to investigate. |