cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-3028318 ] curl 7.21.0 did not use correct ar for 64-bit buid

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 21 Jul 2010 09:14:02 +0000

Bugs item #3028318, was opened at 2010-07-12 11:00
Message generated for change (Comment added) made by kdekker
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3028318&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: compile or build problem
Group: portability problem
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: kdekker (kdekker)
Assigned to: Daniel Stenberg (bagder)
Summary: curl 7.21.0 did not use correct ar for 64-bit buid

Initial Comment:
When starting configure in next form: AR="ar -X 32_64" ./configure to configure cURL, I still get in the output:

 ======== Rebuilding "configure" ========
     16 if [ -z "/vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0" ]; then echo "Cannot call configure directly, call configure32 or configure64"; exit 1; fi
     17 if [ ! -f /vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0/config.status ]; then ( CDPATH= cd /vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21. 0; LDFLAGS="-lm -ldl " CC="xlc_r" CFLAGS="-O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qinlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1 506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qlanglvl=extc99 -q64 -qwarn64 -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1 506-744 -qsuppress=1506-745 " AR="ar -X 32_64" MAKEFLAGS= MFLAGS= ./configure --prefix=/vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0/.. --with-ss l=/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openssl-1.0.0a/.. --disable-shared --disable-ldap --disable-manual --without-zlib --without-libidn --wi thout-libssh2 ); fi;
     18 checking whether to enable maintainer-specific portions of Makefiles... no
     19 checking whether to enable debug build options... no
     20 checking whether to enable compiler optimizer... (assumed) yes
     21 checking whether to enable strict compiler warnings... no
     22 checking whether to enable curl debug memory tracking... no
     23 checking whether to enable c-ares for DNS lookups... no
     24 checking for sed... /usr/bin/sed
     25 checking for grep... /usr/bin/grep
     26 checking for egrep... /usr/bin/grep -E
     27 checking for ar... /usr/bin/ar
     28 checking for a BSD-compatible install... ./install-sh -c
     29 checking whether build environment is sane... yes

(see line 27). cURL 7.18.2 did not suffer from this problem.
As a result, in the phase when the build creates archives for AIX 64-bit, some errors are raised:

libtool: compile: xlc_r -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openss l-1.0.0a/../include -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openssl-1.0.0a/../include/openssl -O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qi nlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qlanglvl=extc99 -q64 -qwarn6 4 -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qthreaded -qnoansialias -qhalt=e -c -M curl_rtmp.c -o curl_rtmp.o
    881 source='openldap.c' object='openldap.lo' libtool=yes DEPDIR=.deps depmode=aix /bin/sh ../depcomp /bin/sh ../libtool --tag=CC --mode=compile xl c_r -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit /openssl-1.0.0a/../include -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openssl-1.0.0a/../include/openssl -O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qinlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qlanglvl=extc99 -q6 4 -qwarn64 -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qthreaded -qnoansialias -qhalt=e -c -o openldap.lo openldap. c
    882 libtool: compile: xlc_r -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openss l-1.0.0a/../include -I/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openssl-1.0.0a/../include/openssl -O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qi nlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qlanglvl=extc99 -q64 -qwarn6 4 -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qthreaded -qnoansialias -qhalt=e -c -M openldap.c -o openldap.o
    883 /bin/sh ../libtool --tag=CC --mode=link xlc_r -O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qinlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qlanglvl=extc99 -q64 -qwarn64 -qsuppress=1506-742 -qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745 -qthreaded -qnoansialias -qhalt=e -lm -ldl -L/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/openssl-1.0.0a/../lib -o libcurl.la -rpath /vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0/../lib -no-undefined -version-info 6:0:2 -lssl -lcrypto file.lo timeval.lo base64. lo hostip.lo progress.lo formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo dict.lo if2ip.lo speedcheck.lo ldap.lo ssluse.lo version.lo getenv.lo e scape.lo mprintf.lo telnet.lo netrc.lo getinfo.lo transfer.lo strequal.lo easy.lo security.lo krb4.lo curl_fnmatch.lo fileinfo.lo ftplistparser.lo wil dcard.lo krb5.lo memdebug.lo http_chunks.lo strtok.lo
connect.lo llist.lo hash.lo
    884 multi.lo content_encoding.lo share.lo http_digest.lo md5.lo curl_rand.lo http_negotiate.lo http_ntlm.lo inet_pton.lo strtoofft.lo strerror.lo hostare s.lo hostasyn.lo hostip4.lo hostip6.lo hostsyn.lo hostthre.lo inet_ntop.lo parsedate.lo select.lo gtls.lo sslgen.lo tftp.lo splay.lo strdup.lo socks. lo ssh.lo nss.lo qssl.lo rawstr.lo curl_addrinfo.lo socks_gssapi.lo socks_sspi.lo curl_sspi.lo slist.lo nonblock.lo curl_memrchr.lo imap.lo pop3.lo sm tp.lo pingpong.lo rtsp.lo curl_threads.lo warnless.lo hmac.lo polarssl.lo curl_rtmp.lo openldap.lo
    885 libtool: link: /usr/bin/ar cru .libs/libcurl.a file.o timeval.o base64.o hostip.o progress.o formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2i p.o speedcheck.o ldap.o ssluse.o version.o getenv.o escape.o mprintf.o telnet.o netrc.o getinfo.o transfer.o strequal.o easy.o security.o krb4.o curl_fn match.o fileinfo.o ftplistparser.o wildcard.o krb5.o memdebug.o http_chunks.o strtok.o connect.o llist.o hash.o multi.o content_encoding.o share.o http_ digest.o md5.o curl_rand.o http_negotiate.o http_ntlm.o inet_pton.o strtoofft.o strerror.o hostares.o hostasyn.o hostip4.o hostip6.o hostsyn.o hostthre. o inet_ntop.o parsedate.o select.o gtls.o sslgen.o tftp.o splay.o strdup.o socks.o ssh.o nss.o qssl.o rawstr.o curl_addrinfo.o socks_gssapi.o socks_sspi .o curl_sspi.o slist.o nonblock.o curl_memrchr.o imap.o pop3.o smtp.o pingpong.o rtsp.o curl_threads.o warnless.o hmac.o polarssl.o curl_rtmp.o openldap .o
    886 ar: 0707-126 file.o is not valid with the current object file mode.
    887 Use the -X option to specify the desired object mode.
    888 ar: 0707-126 timeval.o is not valid with the current object file mode.
    889 Use the -X option to specify the desired object mode.
    890 ar: 0707-126 base64.o is not valid with the current object file mode.
    891 Use the -X option to specify the desired object mode.
    892 ar: 0707-126 hostip.o is not valid with the current object file mode.
    893 Use the -X option to specify the desired object mode.
    894 ar: 0707-126 progress.o is not valid with the current object file mode.
    895 Use the -X option to specify the desired object mode.

The cause is that IBM AIX for 64-bit requires that -X is specified. For ease of use (for both 32-bit and 64-bit) I usually use AR="ar -X 32_64"

For some reason, some things around lines 3092 (checking for ar) in the configure script changed, and results in a libtool where AR is still ar (without required arguments for 64-bit build)

----------------------------------------------------------------------

>Comment By: kdekker (kdekker)
Date: 2010-07-21 11:14

Message:
I can workaround the problem (using AR="/usr/bin/ar -X 32_64"), but it was
just nice if I could provide a relative path to ar, similar to how it
worked in cURL 7.18.2, where I did not have this problem.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-20 22:17

Message:
It doesn't match my output, but even so I don't think it changes much. You
can still alter what ar command and what ar options the configure script
and thus the build uses. What else do you want?

----------------------------------------------------------------------

Comment By: kdekker (kdekker)
Date: 2010-07-19 17:38

Message:
I now picked up configure.ac from the git repository, replaced the 7.21.0
configure, and that worked fine, but only if ar was specified as
/usr/bin/ar -X 32_64. The AR cmd in libtool and Makefile then have -X 32_64
arguments, which can be checked with a grep on 32_64.

But if AR was specified with a relative path (AR="ar -X 32_64"), then the
-X 32_64 arguments disappeared, see: port_BDUX38314.nlbautd4.kdekker grep
"^AR" libtool
AR="/usr/bin/ar"
AR_FLAGS="cru"

The configure command provided was:
======== Rebuilding "configure" ========
        if [ -z "/vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0" ];
then echo "Cannot call configure directly, call configure32 or
configure64"; exit 1; fi
        if [ ! -f
/vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0/config.status ]; then (
CDPATH= cd /vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0;
LDFLAGS="-L/vobs/obj.AIX61/thirdparty/OpenSSL/64bit/lib -lm -ldl "
CC="xlc_r" CFLAGS="-O2 -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro
-qinlglue -qalias=noansi -qarch=pwr4 -qhalt=e -qsuppress=1506-742
-qsuppress=1506-743 -qsuppress=1506-744 -qsuppress=1506-745
-qlanglvl=extc99 -q64 -qwarn64 -qsuppress=1506-742 -qsuppress=1506-743
-qsuppress=1506-744 -qsuppress=1506-745 " AR="ar -X 32_64" MAKEFLAGS=
MFLAGS= ./configure
--prefix=/vobs/obj.AIX61/thirdparty/cURL/64bit/curl-7.21.0/..
--with-ssl=/vobs/obj.AIX61/thirdparty/OpenSSL/64bit --disable-shared
--disable-ldap --disable-manual --without-zlib --without-libidn
--without-libssh2 ); fi;

If you like, I can attach config.log.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-15 23:04

Message:
Again it works for me:

$ AR="myownfunkyar --moo" ./configure
(lots of output)

$ grep '^AR =' Makefile
AR = myownfunkyar --moo

... and if you want to replace the 'cru' flags that my libtool seems to
use (after the $AR I believe) that's easy too:

AR="myownfunkyar --moo" AR_FLAGS="--moo2" ./configure

It can be seen by:

$ grep '^AR' libtool

----------------------------------------------------------------------

Comment By: kdekker (kdekker)
Date: 2010-07-15 08:37

Message:
Hi,

I use AR="myownfunkyar -myfunkyargs" ./configure.
Indeed myownfunkyar is picked up, but myfunkyargs is skipped.
So it did not work.... in the old configure it did only work if
myownfunkyar had an absolute path, e.g. AR="/usr/bin/ar -X 32_64"
./configure. I did not try this config with the modified configure script.
My issue is just that the arguments got lost.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-14 17:38

Message:
Then you don't use the updated configure. This is what I get:

$ AR=myownfunkyar ./configure

(no output about checking for ar)

and then later:

$ grep myown Makefile
AR = myownfunkyar

Thus I conclude that it is indeed working.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-14 17:38

Message:
Then you don't use the updated configure. This is what I get:

$ AR=myownfunkyar ./configure

(no output about checking for ar)

and then later:

$ grep myown Makefile
AR = myownfunkyar

Thus I conclude that it is indeed working.

----------------------------------------------------------------------

Comment By: kdekker (kdekker)
Date: 2010-07-14 08:56

Message:
My feeling is that the problem is not fixed. When setting AR="ar -X 32_64"
before configure is started,

The output of configure says (still):
checking for ar... /usr/bin/ar

(which is not mandatoryly a fault)

but the generated libtool does not have -X 32_64 argument for ar saved
somewhere. My issue is just that the arguments of ar got lost. For AIX
64-bit it is mandatory to use these flags (actually, configure may need to
get some built-in information regarding the oddies of AIX on 64-bit)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-13 20:24

Message:
The file as pushed to git is available here:
http://github.com/bagder/curl/raw/master/configure.ac

and the snapshots are available here: http://curl.haxx.se/snapshots/

----------------------------------------------------------------------

Comment By: kdekker (kdekker)
Date: 2010-07-13 16:30

Message:
Many thanks for supplying fix that fast. If possible, please sent me a
modified configure.ac (no diff, but the file as whole), I then will test
the fix.

I was not able to apply the patch to configure.ac as extracted from 7.21.0
source on my AIX system.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-07-12 18:39

Message:
I can see why this happens.

I've attached a file to this report with a patch for configure.ac that
should fix this issue. Can you try this? If not, I intend to proceed and
commit this change anyway so you can get tomorrow's daily snapshot and try
it out if you can't build your own image from the git source.

----------------------------------------------------------------------

Comment By: kdekker (kdekker)
Date: 2010-07-12 16:48

Message:
To be clear: curl 7.18.2 just worked fine, also for AIX 64-bit.
When adding a set -x in configure just before line 3155, I get the
following output:

/usr/bin/grep -E
+ test -z /usr/bin/grep -E
+ test /usr/bin/grep -E = not_found
+ test -n
+ set -x
+ test -z
+ ac_pt_AR=ar -X 32_64
+ set dummy ar
+ ac_word=ar
+ print -r -- configure:3165: checking for ar
+ 1>& 5
+ print -rn -- checking for ar...
+ 1>& 6
checking for ar... + test = set
+ as_save_IFS=

+ IFS=:
+
as_dummy=/usr/atria/bin:/etc:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java6_64/jre/bin:/usr/java6_64/bin:/usr/vac/bin:/usr/vacpp/bin:/usr/sbin:/usr/dt/bin:/home/kdekker/bin:/usr/local/bin:.:/usr/bin:/usr/local/bin
+ IFS=

+ test -z /usr/atria/bin
+ test -f /usr/atria/bin/ar
+ IFS=

+ test -z /etc
+ test -f /etc/ar
+ IFS=

+ test -z /usr/bin
+ test -f /usr/bin/ar
+ test -x /usr/bin/ar
+ ac_cv_path_ac_pt_AR=/usr/bin/ar
+ print -r -- configure:3184: found /usr/bin/ar
+ 1>& 5
+ break 2
+ IFS=

+ ac_pt_AR=/usr/bin/ar
+ test -n /usr/bin/ar
+ print -r -- configure:3196: result: /usr/bin/ar
+ 1>& 5
+ print -r -- /usr/bin/ar
+ 1>& 6
/usr/bin/ar
+ test x/usr/bin/ar = x
+ AR=/usr/bin/ar
+ test -z /usr/bin/ar
+ test /usr/bin/ar = not_found
+ test -f ./include/curl/curlbuild.h
+ + /usr/bin/sed -ne s/^#define LIBCURL_VERSION "\(.*\)"/\1/p
./include/curl/curlver.h

I would expect that AR was changed to $ac_pt_AR

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3028318&group_id=976
Received on 2010-07-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET