further testing...by setting LIBPATH to contain /opt/freeware/lib BEFORE /opt/freeware/lib64 in the build script ,configure finished successfully.
still no idea why gcc insists in loading the 64 bit object before the 32 bit one, smells like a packaging issue in the gcc package for aix 7.1
Original Message:
Sent: Thu April 20, 2023 05:15 AM
From: C- -T
Subject: gcc: strange error message at config stage
i did a build with no cflags/ldflags and the least possible configure options and it went through without errors, so it must have something to do with the flags.
as i took the flags from your curl spec file one to one i can not comprehend whats going on here.
root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # ./configure --without-ssl --without-nghttp2...configure: Configured to build curl/libcurl: Host setup: powerpc-ibm-aix7.1.5.0 Install prefix: /usr/local Compiler: gcc CFLAGS: -Werror-implicit-function-declaration -O2 -Wno-system-headers -pthread CPPFLAGS: -isystem /opt/freeware/include LDFLAGS: -L/opt/freeware/lib LIBS: -lldap -llber -lzstd -lz curl version: 7.86.0 SSL: no (--with-{openssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} ) SSH: no (--with-{libssh,libssh2}) zlib: enabled brotli: no (--with-brotli) zstd: enabled (libzstd) GSS-API: no (--with-gssapi) GSASL: no (libgsasl not found) TLS-SRP: no (--enable-tls-srp) resolver: POSIX threaded IPv6: enabled Unix sockets: enabled IDN: no (--with-{libidn2,winidn}) Build libcurl: Shared=yes, Static=no Built-in manual: enabled --libcurl option: enabled (--disable-libcurl-option) Verbose errors: enabled (--disable-verbose) Code coverage: disabled SSPI: no (--enable-sspi) ca cert bundle: no ca cert path: ca fallback: LDAP: enabled (OpenLDAP) LDAPS: enabled RTSP: enabled RTMP: no (--with-librtmp) PSL: no (libpsl not found) Alt-svc: enabled (--disable-alt-svc) Headers API: enabled (--disable-headers-api) HSTS: no (--enable-hsts) HTTP1: enabled (internal) HTTP2: no (--with-nghttp2, --with-hyper) HTTP3: no (--with-ngtcp2, --with-quiche --with-msh3) ECH: no (--enable-ech) WebSockets: no (--enable-websockets) Protocols: DICT FILE FTP GOPHER HTTP IMAP LDAP LDAPS MQTT POP3 RTSP SMTP TELNET TFTP Features: AsynchDNS IPv6 Largefile UnixSockets alt-svc libz threadsafe zstd...root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # gmake -j 20Making all in lib...root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0/src/.libs # ldd curlcurl needs: /usr/lib/libc.a(shr.o) /usr/lib/libpthreads.a(shr_xpg5.o) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libcurl.a(libcurl.so.4) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libz.a(libz.so.1) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libldap.a(libldap-2.5.so.0) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../liblber.a(liblber-2.5.so.0) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libzstd.a(libzstd.so.1) /unix /usr/lib/libcrypt.a(shr.o) /usr/lib/libpthreads.a(shr_comm.o) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/libgcc_s.a(shr.o) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libnghttp2.a(libnghttp2.so.14) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libssh2.a(libssh2.so.1) /opt/freeware/lib/libgssapi_krb5.a(libgssapi_krb5.so) /opt/freeware/lib/libkrb5.a(libkrb5.so) /opt/freeware/lib/libk5crypto.a(libk5crypto.so) /opt/freeware/lib/libcom_err.a(libcom_err.so) /usr/lib/libcrypto.a(libcrypto.so.1.1) /usr/lib/libssl.a(libssl.so.1.1) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libsasl2.a(libsasl2.so.3) /usr/lib/libs.a(shr.o) /usr/lib/libpthread.a(shr_xpg5.o) /usr/lib/librtl.a(shr.o) /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libkrb5.so /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libk5crypto.so /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libcom_err.so /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/10/../../../libkrb5support.so /opt/freeware/lib/libintl.a(libintl.so.8) /usr/lib/libdl.a(shr.o) /opt/freeware/lib/libiconv.a(libiconv.so.2)root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0/src/.libs # ./curl -Vcurl 7.86.0 (powerpc-ibm-aix7.1.5.0) libcurl/7.86.0 OpenSSL/1.1.1l zlib/1.2.13 libssh2/1.10.0 nghttp2/1.46.0Release-Date: 2022-10-26Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftpFeatures: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Wed April 19, 2023 10:46 AM
From: Ayappan P
Subject: gcc: strange error message at config stage
gcc being a 32-bit binary has /opt/freeware/lib as it's libpath , so it should not go to /opt/freeware/lib64 to look for libgcc_s.a unless LIBPATH is set.
You don't have LIBPATH set which makes this error very surprising. Can you paste the output of "ldd /opt/freeware/bin/gcc" ?
------------------------------
Ayappan P
Original Message:
Sent: Wed April 19, 2023 10:25 AM
From: C- -T
Subject: gcc: strange error message at config stage
root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # envSHELL=/usr/bin/bashLC__FASTMSG=trueHISTSIZE=2000ODMDIR=/etc/objreposHISTTIMEFORMAT=%F %T |AUTHSTATE=compatEDITOR=viENV=/root/.kshrcPWD=/home/packagebuilder/test/curl-7.86.0LOGNAME=rootTZ=Europe/ViennaOBJECT_MODE=64LDFLAGS=-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/libHOME=/rootLANG=en_USAIXTHREAD_SCOPE=SNMON=BcCPPFLAGS=-maix64 -I/opt/freeware/includeSSH_CONNECTION=172.17.8.4 55877 172.17.10.95 22TERM=xtermUSER=rootCURL_CA_BUNDLE=/etc/itsv-ca-bundle.crtAR=/usr/bin/ar -X32_64LOGIN=rootSHLVL=1LOCPATH=/usr/lib/nls/locEXTENDED_HISTORY=ONMAILMSG=[YOU HAVE NEW MAIL]PS1=root@aixbuildhostng: $PWD #SSH_CLIENT=172.17.8.4 55877 22PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8_64/jre/bin:/opt/freeware/bin:/opt/freeware/sbin:.:/usr/lib/instl:/usr/local/bin:/opt/freeware/bin:/usr/es/sbin/cluster:/usr/es/sbin/cluster/utilities:/usr/es/sbin/cluster/cspocCC=gcc -O2HISTFILESIZE=2000CFLAGS=-maix64 -I/opt/freeware/includeMAIL=/usr/spool/mail/rootSSH_TTY=/dev/pts/0OLDPWD=/home/packagebuilder/test_=/usr/bin/envNLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/en_US/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/en_US/%N.cat:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%l.%c/%N.catroot@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # ./configure --prefix=/home/packagebuilder/apachelibinc --with-ssl --with-ca-path=/var/ssl/certs/ --enable-shared --enable-static --enable-ldap --with-libssh2 --without-zstd --with-nghttp2
------------------------------
I regret starting this entire conversation
Original Message:
Sent: Wed April 19, 2023 08:32 AM
From: Ranjit Ranjan
Subject: gcc: strange error message at config stage
Hi,
Please share the configure script options passed to ./configure and env output .
------------------------------
Ranjit Ranjan
IBM
Ranjit.Ranjan@ibm.com
Original Message:
Sent: Wed April 19, 2023 08:04 AM
From: C- -T
Subject: gcc: strange error message at config stage
Hi,
while trying to build curl from source configure bails out with some crazy error...
configure:34032: checking run-time libs availabilityconfigure:34088: gcc -O2 -o conftest -maix64 -I/opt/freeware/include -Werror-implicit-function-declaration -O2 -Wno-system-headers -maix64 -I/opt/freeware/include -I/opt/freeware/include -I/opt/freeware/include -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -L/opt/freeware/lib -L/opt/freeware/lib64 conftest.c -lnghttp2 -lssh2 -lssl -lcrypto -lldap -llber -lz >&5Could not load program gcc:Could not load module /opt/freeware/lib/libiconv.a(libiconv.so.2). Dependent module /opt/freeware/lib64/libgcc_s.a(shr.o) could not be loaded. The module has an invalid magic number.Could not load module gcc-10. Dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2) could not be loaded.Could not load module .configure:34088: $? = 255configure: program exited with status 255configure: failed program was:| /* confdefs.h */
i checked some libraries and gcc, but i see no context between the error message and the situation on the compiler side and installed libs.
root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 #root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # gcc -vUsing built-in specs.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/10/lto-wrapperTarget: powerpc-ibm-aix7.1.0.0Configured with: ../gcc-10.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --enable-languages=c,c++,fortran,go --enable-version-specific-runtime-libs --disable-nls --disable-libstdcxx-pch --disable-werror --enable-libstdcxx-filesystem-ts --with-gcc-major-version-only --program-suffix=-10 --with-cpu=default32 --host=powerpc-ibm-aix7.1.0.0Thread model: aixSupported LTO compression algorithms: zlibgcc version 10.3.0 (GCC)root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # ar -X64 tv /opt/freeware/lib64/libgcc_s.arwxr-xr-x 0/0 376375 Dec 15 11:02 2021 shr.oroot@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # ar -X64 tv /opt/freeware/lib/libiconv.arwxr-xr-x 203/1 1227053 Jun 02 11:18 2022 libiconv.so.2r--r--r-- 0/0 310767 Jul 04 11:17 2022 shr4_64.oroot@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # echo $OBJECT_MODE64root@aixbuildhostng: /home/packagebuilder/test/curl-7.86.0 # echo $LIBPATH
any idea?
best
chris
------------------------------
I regret starting this entire conversation
------------------------------