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
#!/usr/bin/ksh
export LIBPATH=/opt/freeware/lib:/opt/freeware/lib64:/usr/lib:/lib
export OBJECT_MODE=64
export AR="/usr/bin/ar -X32_64"
export CC="/opt/freeware/bin/gcc -maix64"
export CFLAGS="-I/opt/freeware/include"
export CPPFLAGS="-I/opt/freeware/include"
export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib"
./configure --prefix=/home/packagebuilder/apachelibinc \
--with-openssl=/usr \
--with-ca-path=/var/ssl/certs/ \
--enable-shared \
--enable-static \
--enable-ldap \
--with-libssh2 \
--without-zstd \
--with-nghttp2
...
Host setup: powerpc-ibm-aix7.1.5.0
Install prefix: /home/packagebuilder/apachelibinc
Compiler: /opt/freeware/bin/gcc -maix64
CFLAGS: -isystem /opt/freeware/include -Werror-implicit-function-declaration -O2 -Wno-system-headers -pthread
CPPFLAGS: -isystem /opt/freeware/include -isystem /opt/freeware/include -isystem /opt/freeware/include
LDFLAGS: -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
LIBS: -lnghttp2 -lssh2 -lssl -lcrypto -lssl -lcrypto -lldap -llber -lz
curl version: 7.86.0
SSL: enabled (OpenSSL)
SSH: enabled (libSSH2)
zlib: enabled
brotli: no (--with-brotli)
zstd: no (--with-zstd)
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: /var/ssl/certs/
ca fallback: no
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: enabled (--disable-hsts)
HTTP1: enabled (internal)
HTTP2: enabled (nghttp2)
HTTP3: no (--with-ngtcp2, --with-quiche --with-msh3)
ECH: no (--enable-ech)
WebSockets: no (--enable-websockets)
Protocols: DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS LDAP LDAPS MQTT POP3 POP3S RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP
Features: AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL UnixSockets alt-svc libz threadsafe
------------------------------
I regret starting this entire conversation
------------------------------
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