-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIX XL C/C++ V16.1 comes with clang/clang++ but is not fully clang compatible #3474
Comments
Since it isn't totally clang compatible, we detect this IBM clang front-end and if detected, avoids some clang specific magic. Reported-by: Kees Dekker Fixes #3474
Thanks! Please try out my patch in #3476. It should at least fix the use of the non-supported option. If the |
Many thanks for very quick reply. I've updated the m4/curl-compilers.m4 with the modified file and reran configure (clean/from scratch). I still get (part from config.log):
When I start the build, I get:
In the output of configure, the following line still exists:
Attached: config.log, config.status and the output of the configure command (all in onze tar.gz file). |
You also need to run |
Sorry, please forgive my innocence. Unfortunately, autoconf was not installed. I've obtained it from the AIX (Linux) Toolbox (including automake). But finally I stuck down on libtoolize. It is not in the AIX Toolbox (repositories). I will trust you on this fix and will await until it will be released in a next cURL release. For now, it is just a warning that does apparently not harm now. |
We can actually do it even better if you're up for it. I'll land this (#3476) patch today, as I believe it works, and tomorrow you can get a daily snapshot which will have the configure script generated and you can use that to verify if the issue is truly fixed or not. |
I've downloaded the snapshot from https://curl.haxx.se/snapshots/ (taken 16. January download). Configure still says:
As a result, still messages about the -Qunused option passed to ld are being displayed. Also some confusing (but it is no error, just an observation) output my still be produced by configure:
I..e. I did not expect that error message are part of the output. The job of configure is finding out the compiler and OS capabilities, but if something does not exist, it should not be reported as error. I did not figure out in detail whether a wrong call to the compiler was done or whether some stderr output was not suppressed. IBM AIX works slightly different in making a shared library (for xlc). For xlclang, they both support the -qmkshrobj as well as the -shared option. I double cheched m4/curl-compilers.m4 and configure; both contain a line about if xlclang. See attachment for more details. |
Here's why:
and reading the documentation again I see that |
Do you work 24h a day?? Thanks for very quick reply. I guess you've found the ref 😄. Hoewever, I'm not sure how you then can distinguish real xlc from xlclang. Even in XL C/C++ V16.1 product, both xlc as well as xlclang (and xlC/xlclang++) exist. Output of configure is now (copied some parts):
The second part is ok. The first part is up to you to decide to do something with. |
I think this is doing the right thing. It only checks for xlclang if it first found the clang variable, which I hope won't happen in the regular xlc case. Thanks for verifying the update. I'll merge that into master. |
I did this
IBM quite recently released Xl C/C++ V16.1 for AIX (see announcement). This compiler comprises the 'good old' known xlc (and variants) C-compiler, but this product now also contains xlclang and xlclang++. Apparently, support for newer standards like C11/C++11/C++14 is not added to XL C/C++ but to xlclang (C) or xlclang++ (C++). The xlclang compiler supports some/most of the clang compiler but not all. When calling configure with the following flags:
LDFLAGS="-L/vobs/obj.AIX71/thirdparty/OpenSSL/64bit/openssl-1.1.1/build/lib -L/vobs/obj.AIX71/thirdparty/zlib/64bit/zlib-1.2.11/build/lib" LIBS="-lm -ldl /vobs/tt/../common/thirdparty/zlib/build/IBM_RS6000/64bit/lib/libz.a" CC="xlclang" CFLAGS="-O2 -qinlglue -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qarch=pwr4 -qcheck=divzero -qalias=noansi -qfuncsect=noimplicitstaticref -qcheck=nullptr -qchars=unsigned -std=c11 -q64 " AR="/usr/bin/ar -X 32_64" MAKE=gmake MAKEFLAGS= MFLAGS= ./configure --prefix=/vobs/obj.AIX71/thirdparty/cURL/64bit/curl-7.61.1/build --with-ssl=/vobs/tt/../common/thirdparty/OpenSSL/build/IBM_RS6000/64bit --with-zlib=/vobs/tt/../common/thirdparty/zlib/build/IBM_RS6000/64bit --disable-silent-rules --enable-ipv6 --disable-shared --disable-ldap --disable-manual --without-libidn2 --without-libssh2 || rm -f "/vobs/obj.AIX71/thirdparty/cURL/64bit/curl-7.61.1/config.status"
(with xlclang in the PATH, /opt/IBM/xlC/16.1.0/bin/xlclang)
I then get a configure result that adds -Qunused flag. See (part of) configure output:
Unfortunately, the -Qunused flag is not supported by IBM's xlclang, see:
gmake[2]: Entering directory '/vobs/obj.AIX71/thirdparty/cURL/64bit/curl-7.61.1/lib' /bin/sh ../libtool --tag=CC --mode=compile xlclang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -I/vobs/tt/../common/thirdparty/zlib/build/IBM_RS6000/64bit/include -I/vobs/tt/../common/thirdparty/OpenSSL/build/IBM_RS6000/64bit/include -I/vobs/tt/../common/thirdparty/OpenSSL/build/IBM_RS6000/64bit/include/openssl -fvisibility=hidden -O2 -qinlglue -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qarch=pwr4 -qcheck=divzero -qalias=noansi -qfuncsect=noimplicitstaticref -qcheck=nullptr -qchars=unsigned -std=c11 -q64 -Qunused-arguments -MT libcurl_la-file.lo -MD -MP -MF .deps/libcurl_la-file.Tpo -c -o libcurl_la-file.lo
test -f 'file.c' || echo './'file.c libtool: compile: xlclang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -I/vobs/tt/../common/thirdparty/zlib/build/IBM_RS6000/64bit/include -I/vobs/tt/../common/thirdparty/OpenSSL/build/IBM_RS6000/64bit/include -I/vobs/tt/../common/thirdparty/OpenSSL/build/IBM_RS6000/64bit/include/openssl -fvisibility=hidden -O2 -qinlglue -qtune=balanced -qmaxmem=-1 -qstrict -brtl -qro -qarch=pwr4 -qcheck=divzero -qalias=noansi -qfuncsect=noimplicitstaticref -qcheck=nullptr -qchars=unsigned -std=c11 -q64 -Qunused-arguments -MT libcurl_la-file.lo -MD -MP -MF .deps/libcurl_la-file.Tpo -c file.c -o libcurl_la-file.o **/opt/IBM/xlC/16.1.0/bin/.orig/xlclang: warning: 1501-216 command option -Qunused-arguments is not recognized - passed to ld** mv -f .deps/libcurl_la-file.Tpo .deps/libcurl_la-file.Plo
See also the compiler reference manual at compiler ref
I expected the following
I'm not sure how to fix this. It is probably easy to adjust configure in such way that -Qunused is not added if $CC maches xlclang. In that case, this option can be omitted. However, I don't know the procedure 'how to add support for a new compiler'.
Because I'm building a static libcurl, I don't really suffer from this issue. That may probably change for people who like to build a shared library. In that case, the linker is invoked with incorrect options.
I would be nice if configure fully recognizes AIX's xlclang and passes correct compiler flags to it.
A similar/related thing is another compiler option that does not work correctly (but does not raise further errors):
I think that _xl_clang is probably more XL than clang. Please refer to IBM's compiler reference documentation for more information about what options are supported.
In case if greater details are wanted, test or something else, feel free to ask. If wanted, I can upload configure related files.
curl/libcurl version
[curl -V output]
curl 7.61.1
operating system
AIX 7.1 TL4
The text was updated successfully, but these errors were encountered: