Hi everybody,
we updated our server (including our internal server for compiling and building packages) to SRU 23.5.0 (pkg://solaris/entire@0.5.11,5.11-0.175.3.23.0.5.0:20170804T163948Z). Today I wanted to build HAProxy version 1.7.9 within this new environment and noticed that GCC5 is somehow broken.
When building the package I got this error message:
In file included from /usr/include/stdio.h:15:0,
from src/haproxy.c:29:
/usr/gcc/5/lib/gcc/x86_64-pc-solaris2.11/5.4.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
^
gmake: *** [src/haproxy.o] Error 1
In an earlier SRU everything was working without an issue and we could compile the packages normally. The source package can be downloaded from here (http://www.haproxy.org/download/1.7/src/haproxy-1.7.9.tar.gz ) and the make command we use is
gmake TARGET=solaris CPU=generic USE_OPENSSL=1
The same GCC error pops up when trying to build a few other packages like QT for example. As it worked in an earlier SRU (19.0.5 to be exact) I suppose that the upgrade from GCC 4.8 to GCC 5 is the main reason for this error.
Any help is appreciated.
Thanks and regards,
Daniel Heitepriem
Edit: After uninstalling all gcc-5 packages the compilation works (using gcc-48)
Edit 2 (30.08.2017): GCC 5 isn't broken, it was just a wrong assumption regarding different GCC default modes
Added statement that GCC 5 isn't broken in Solaris 11