[tlbuild] One of the latest commits broken solaris builds

Nelson H. F. Beebe beebe at math.utah.edu
Tue Aug 31 01:26:08 CEST 2021


>>  error: #error "Compiler or options invalid for pre-UNIX 03 X/Open
>> applications and pre-2001 POSIX applications"

I build a lot of software on Solaris 10 and 11, and have seen similar
complaints many times.  Here are the configure script settings
that I use that appear to fix them (at least sometimes):

### This version is for Solaris 10.  /usr/include/sys/feature_tests.h
### says
###	 * It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
###	 * using c99.  The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
###	 * and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
###	 * or a POSIX.1-2001 application with anything other than a c99 or later
###	 * compiler.  Therefore, we force an error in both cases.
### However, it is permitted to use XPG6, so we do that

CC=/opt/sunstudio12.1/bin/c99
CFLAGS="-I/usr/local/include -D_XOPEN_SOURCE=600 -D_XPG6"
CXX=/opt/sunstudio12.1/bin/CC
CXXFLAGS="-I/usr/local/include -D_XOPEN_SOURCE=600 -D_XPG6"
LDFLAGS="-R/usr/local/lib -L/usr/local/lib"

Try

	% man standards

on Solaris 10 or 11 to see how Sun tried to cope with the
myriad of C and POSIX and XPG standards.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


More information about the tlbuild mailing list.