MantisBT - CMake
View Issue Details
0015065CMakeCMakepublic2014-08-06 15:542015-05-04 09:05
Dennis Clarke 
 
normalmajoralways
closedno change required 
SparcSolaris10
CMake 3.0 
 
0015065: compile error Source/kwsys/ProcessUNIX.c, line 2214: error: incomplete struct/union/enum sigaction: act
error in source file : Source/kwsys/ProcessUNIX.c

line 2214: error: incomplete struct/union/enum sigaction: act


The complete info is thus :

/opt/solarisstudio12.3/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Bootstrap.cmk -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Bootstrap.cmk -DKWSYS_NAMESPACE=cmsys -c /usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c -o ProcessUNIX.o
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 453: warning: implicit function declaration: strdup
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 453: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2214: error: incomplete struct/union/enum sigaction: act
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2216: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2216: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2218: warning: implicit function declaration: sigaction
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2414: warning: implicit function declaration: kill
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2484: warning: implicit function declaration: popen
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2484: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2504: warning: implicit function declaration: pclose
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2558: warning: implicit function declaration: sigemptyset
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2559: warning: implicit function declaration: sigaddset
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2560: warning: implicit function declaration: sigprocmask
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2651: error: incomplete struct/union/enum sigaction: newSigChldAction
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2652: error: incomplete struct/union/enum sigaction: sizeof()
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2660: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2660: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined struct/union member: sa_flags
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined symbol: SA_NOCLDSTOP
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2754: error: incomplete struct/union/enum sigaction: newSigChldAction
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2755: error: incomplete struct/union/enum sigaction: sizeof()
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2756: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2756: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined struct/union member: sa_flags
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined symbol: SA_NOCLDSTOP
"/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c", line 2548: error: incomplete struct/union/enum sigaction: kwsysProcessesOldSigChldAction
cc: acomp failed for /usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Source/kwsys/ProcessUNIX.c
gmake: *** [ProcessUNIX.o] Error 2
---------------------------------------------
Error when bootstrapping CMake:
Problem while running /usr/local/bin/gmake
---------------------------------------------
Log of errors: /usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.001/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
$


Extract source tarball.

$ mdigest -a sha256 ../src/cmake-3.0.0.tar.gz
99a34b7f74000404feffd82fba9d9e0cd623428c74b6a4851a0dee1c272606c0 ../src/cmake-3.0.0.tar.gz

$ gzip -dc ../src/cmake-3.0.0.tar.gz | tar -xf -



Create a separate build directory :

$ mkdir cmake-3.0.0_SunOS5.10_sparcv9.002
$ cd cmake-3.0.0_SunOS5.10_sparcv9.002



Set some environment variables to allow for cmake to be installed into /usr/local and to use a standard C compiler ( Oracle Studio 12.3 on Solaris 10 ) as well as to target the Oracle Sparc v9 64-bit architecture :


AR=/usr/ccs/bin/ar
AS=/usr/ccs/bin/as
BUILD=/usr/local/build
CC=/opt/solarisstudio12.3/bin/cc
CFLAGS=-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
CONFIG_SHELL=/usr/local/bin/bash
CPPFLAGS=-I/usr/local/include -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
CXXFLAGS=-dalign -erroff=%none -errtags=yes -ftrap=%none -g -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -xdepend=no -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO
CXX=/opt/solarisstudio12.3/bin/CC
GREP=/usr/xpg4/bin/grep
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LD_OPTIONS=-64 -R/usr/local/lib/$ISALIST:/usr/local/lib -L/usr/local/lib/$ISALIST:/usr/local/lib
LD_RUN_PATH=/usr/local/lib
LD=/usr/ccs/bin/sparcv9/ld
LIBTOOL=/usr/local/bin/libtool
M4=/usr/local/bin/gm4
MAKE=/usr/local/bin/gmake
MANPATH=/usr/share/man:/usr/X11/share/man
NM=/usr/ccs/bin/sparcv9/nm -p
PAGER=/usr/xpg4/bin/more
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/opt/solarisstudio12.3/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/opt/schily/bin
PERL=/usr/local/bin/perl
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
SED=/usr/local/bin/gsed
SHELL=/bin/ksh
XTERM_LOCALE=en_US.UTF-8


The run bootstrap thus :


$ ../cmake-3.0.0/bootstrap
---------------------------------------------
CMake 3.0.0, Copyright 2000-2014 Kitware, Inc.
C compiler on this system is: /opt/solarisstudio12.3/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
C++ compiler on this system is: /opt/solarisstudio12.3/bin/CC -dalign -erroff=%none -errtags=yes -ftrap=%none -g -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -xdepend=no -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO
Makefile processor on this system is: /usr/local/bin/gmake
/opt/solarisstudio12.3/bin/CC is not GNU compiler
/opt/solarisstudio12.3/bin/CC has setenv
/opt/solarisstudio12.3/bin/CC has unsetenv
/opt/solarisstudio12.3/bin/CC does not have environ in stdlib.h
/opt/solarisstudio12.3/bin/CC has STL in std:: namespace
/opt/solarisstudio12.3/bin/CC has ANSI streams
/opt/solarisstudio12.3/bin/CC has streams in std:: namespace
/opt/solarisstudio12.3/bin/CC has sstream
/opt/solarisstudio12.3/bin/CC has operator!=(string, char*)
/opt/solarisstudio12.3/bin/CC does not have stl iterator_traits
/opt/solarisstudio12.3/bin/CC does not have old iterator_category
/opt/solarisstudio12.3/bin/CC has old __iterator_category
/opt/solarisstudio12.3/bin/CC has standard template allocator
/opt/solarisstudio12.3/bin/CC does not have allocator<>::rebind<>
/opt/solarisstudio12.3/bin/CC has non-standard allocator<>::max_size argument
/opt/solarisstudio12.3/bin/CC has stl containers supporting allocator objects
/opt/solarisstudio12.3/bin/CC has stl wstring
/opt/solarisstudio12.3/bin/CC does not have header cstddef
/opt/solarisstudio12.3/bin/CC requires template friends to use <>
/opt/solarisstudio12.3/bin/CC supports member templates
/opt/solarisstudio12.3/bin/CC has standard template specialization syntax
/opt/solarisstudio12.3/bin/CC has argument dependent lookup
/opt/solarisstudio12.3/bin/CC has struct stat with st_mtim member
/opt/solarisstudio12.3/bin/CC has ios::binary openmode
/opt/solarisstudio12.3/bin/CC has ANSI for scoping
---------------------------------------------
/opt/solarisstudio12.3/bin/CC -dalign -erroff=%none -errtags=yes -ftrap=%none -g -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -xdepend=no -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I/usr/local/build/cmake-3.0.0/Source -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -c /usr/local/build/cmake-3.0.0/Source/cmStandardIncludes.cxx -o cmStandardIncludes.o
/opt/solarisstudio12.3/bin/CC -dalign -erroff=%none -errtags=yes -ftrap=%none -g -xcode=pic32 -m64 -mc -xunroll=1 -xbuiltin=%none -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -xdepend=no -xnolibmopt -xlinkopt=0 -xnolibmil -xregs=no%appl -xs -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I/usr/local/build/cmake-3.0.0/Source -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -c /usr/local/build/cmake-3.0.0/Source/cmake.cxx -o cmake.o
.
.
.
.
/opt/solarisstudio12.3/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I/usr/local/build/cmake-3.0.0/Source -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -c /usr/local/build/cmake-3.0.0/Source/cmListFileLexer.c -o cmListFileLexer.o
"cmListFileLexer.c", line 1769: warning: implicit function declaration: fileno
"cmListFileLexer.in.l", line 304: warning: implicit function declaration: strdup
"cmListFileLexer.in.l", line 304: warning: improper pointer/integer combination: op "="
.
.
.
/opt/solarisstudio12.3/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I/usr/local/build/cmake-3.0.0/Source -I/usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -DKWSYS_NAMESPACE=cmsys -c /usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c -o ProcessUNIX.o
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 453: warning: implicit function declaration: strdup
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 453: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2214: error: incomplete struct/union/enum sigaction: act
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2216: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2216: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2218: warning: implicit function declaration: sigaction
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2414: warning: implicit function declaration: kill
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2484: warning: implicit function declaration: popen
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2484: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2504: warning: implicit function declaration: pclose
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2558: warning: implicit function declaration: sigemptyset
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2559: warning: implicit function declaration: sigaddset
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2560: warning: implicit function declaration: sigprocmask
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2651: error: incomplete struct/union/enum sigaction: newSigChldAction
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2652: error: incomplete struct/union/enum sigaction: sizeof()
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2660: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2660: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined struct/union member: sa_flags
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined symbol: SA_NOCLDSTOP
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2754: error: incomplete struct/union/enum sigaction: newSigChldAction
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2755: error: incomplete struct/union/enum sigaction: sizeof()
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2756: error: undefined struct/union member: sa_handler
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2756: warning: improper pointer/integer combination: op "="
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined struct/union member: sa_flags
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined symbol: SA_NOCLDSTOP
"/usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2548: error: incomplete struct/union/enum sigaction: kwsysProcessesOldSigChldAction
cc: acomp failed for /usr/local/build/cmake-3.0.0/Source/kwsys/ProcessUNIX.c
gmake: *** [ProcessUNIX.o] Error 2
---------------------------------------------
Error when bootstrapping CMake:
Problem while running /usr/local/bin/gmake
---------------------------------------------
Log of errors: /usr/local/build/cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
$






It seems strange to me that these lines would toss an error :

/*--------------------------------------------------------------------------*/
/* Restores all signal handlers to their default values. */
static void kwsysProcessRestoreDefaultSignalHandlers(void)
{
  struct sigaction act;
  memset(&act, 0, sizeof(struct sigaction));
  act.sa_handler = SIG_DFL;
#ifdef SIGHUP
  sigaction(SIGHUP, &act, 0);
#endif
#ifdef SIGINT
  sigaction(SIGINT, &act, 0);
#endif
.
.
. etc etc


The necessary header signal.h is definately included and I try the
compile manually with full verbose tracking and a list of each header
file as it is used :



$ which cc
/opt/solarisstudio12.3/bin/cc
 
$ cc $CFLAGS -H -\# \
> -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE \
> -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk \
> -I../cmake-3.0.0/Source \
> -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk \
> -DKWSYS_NAMESPACE=cmsys \
> -c ../cmake-3.0.0/Source/kwsys/ProcessUNIX.c \
> -o ProcessUNIX.o
### cc: Note: NLSPATH = /opt/solarisstudio12.3/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/solarisstudio12.3/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -errfmt=error -erroff=%none -errshort=full -xstrconst -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xchip=ultraT2 -xarch=sparcvis2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -H -# -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I../cmake-3.0.0/Source -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -DKWSYS_NAMESPACE=cmsys -c ../cmake-3.0.0/Source/kwsys/ProcessUNIX.c -oProcessUNIX.o
/opt/solarisstudio12.3/prod/bin/acomp -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -H -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -DKWSYS_NAMESPACE=cmsys -Qy -Xc -xc99=%all,no%lib -features=extinl,no%typeof,no%extensions,conststrings -i ../cmake-3.0.0/Source/kwsys/ProcessUNIX.c -D__SunOS_5_10 -D__SUNPRO_C=0x5120 -D__unix -D__SVR4 -D__sun -D__SunOS -D__sparcv9 -D__sparc -D_LP64 -D__LP64__ -D__BUILTIN_VA_ARG_INCR -D__C99FEATURES__ -D__PRAGMA_REDEFINE_EXTNAME -D__FLT_EVAL_METHOD__=0 -D__SUN_PREFETCH -D__NOVECTORSIZE__ -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I../cmake-3.0.0/Source -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I-xbuiltin -I/opt/solarisstudio12.3/prod/include/cc -2K -errfmt=error -erroff=%none -errshort=full -dg -xbuiltin=%none -strconst -fsimple=0 -m64 -fparam_ir -xF=%none -xdbggen=no%stabs+dwarf2+usedonly -xdbggen=incl -xldscope=global -xivdep=loop "-g/opt/solarisstudio12.3/prod/bin/cc -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xtarget=ultraT2 -xcache=8/16/4:4096/64/16 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -H -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -I../cmake-3.0.0/Source -I../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk -DKWSYS_NAMESPACE='cmsys' -c " -destination_ir=yabe -y-fbe -y/opt/solarisstudio12.3/prod/bin/fbe -y-xcode=pic32 -y-ftrap=%none -y-xmemalign=8s -y-verbose -y-comdat -y-g -y-xarch=sparcvis2 -y-m64 -y-comdat -y-xthreadvar=dynamic -y-xannotate=yes -y-o -yProcessUNIX.o -y-s
../cmake-3.0.0/Source/kwsys/kwsysPrivate.h
../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk/cmsys/Process.h
        ../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk/cmsys/Configure.h
../cmake-3.0.0_SunOS5.10_sparcv9.002/Bootstrap.cmk/cmsys/System.h
/usr/include/stddef.h
        /usr/include/sys/isa_defs.h
        /usr/include/iso/stddef_iso.h
/usr/include/stdio.h
        /usr/include/sys/feature_tests.h
                /usr/include/sys/ccompile.h
        /usr/include/iso/stdio_iso.h
                /usr/include/sys/va_list.h
                /usr/include/stdio_tag.h
                /usr/include/stdio_impl.h
        /usr/include/iso/stdio_c99.h
/usr/include/stdlib.h
        /usr/include/iso/stdlib_iso.h
        /usr/include/iso/stdlib_c99.h
/usr/include/string.h
        /usr/include/iso/string_iso.h
/usr/include/sys/time.h
        /usr/include/sys/types.h
                /usr/include/sys/machtypes.h
                /usr/include/sys/int_types.h
                /usr/include/sys/select.h
                        /usr/include/sys/time_impl.h
                        /usr/include/sys/time.h
        /usr/include/time.h
                /usr/include/iso/time_iso.h
/usr/include/sys/wait.h
        /usr/include/sys/resource.h
        /usr/include/sys/siginfo.h
                /usr/include/sys/machsig.h
        /usr/include/sys/procset.h
                /usr/include/sys/signal.h
                        /usr/include/sys/iso/signal_iso.h
                                /usr/include/sys/unistd.h
/usr/include/sys/stat.h
        /usr/include/sys/stat_impl.h
/usr/include/unistd.h
/usr/include/fcntl.h
        /usr/include/sys/fcntl.h
/usr/include/errno.h
        /usr/include/sys/errno.h
/usr/include/signal.h
        /usr/include/iso/signal_iso.h
/usr/include/dirent.h
        /usr/include/sys/dirent.h
/usr/include/ctype.h
        /usr/include/iso/ctype_iso.h
        /usr/include/iso/ctype_c99.h
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 453: warning: implicit function declaration: strdup
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 453: warning: improper pointer/integer combination: op "="
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2214: error: incomplete struct/union/enum sigaction: act
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2216: error: undefined struct/union member: sa_handler
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2216: warning: improper pointer/integer combination: op "="
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2218: warning: implicit function declaration: sigaction
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2414: warning: implicit function declaration: kill
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2484: warning: implicit function declaration: popen
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2484: warning: improper pointer/integer combination: op "="
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2504: warning: implicit function declaration: pclose
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2558: warning: implicit function declaration: sigemptyset
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2559: warning: implicit function declaration: sigaddset
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2560: warning: implicit function declaration: sigprocmask
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2651: error: incomplete struct/union/enum sigaction: newSigChldAction
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2652: error: incomplete struct/union/enum sigaction: sizeof()
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2660: error: undefined struct/union member: sa_handler
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2660: warning: improper pointer/integer combination: op "="
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined struct/union member: sa_flags
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2661: error: undefined symbol: SA_NOCLDSTOP
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2754: error: incomplete struct/union/enum sigaction: newSigChldAction
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2755: error: incomplete struct/union/enum sigaction: sizeof()
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2756: error: undefined struct/union member: sa_handler
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2756: warning: improper pointer/integer combination: op "="
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined struct/union member: sa_flags
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2757: error: undefined symbol: SA_NOCLDSTOP
"../cmake-3.0.0/Source/kwsys/ProcessUNIX.c", line 2548: error: incomplete struct/union/enum sigaction: kwsysProcessesOldSigChldAction
cc: acomp failed for ../cmake-3.0.0/Source/kwsys/ProcessUNIX.c
$


So this is a bit baffling to me as you can clearly see the signal.h header used above.

This however does stop me for getting cmake built on Solaris 10 and thus I hope this is
a trivial bug easy to track down.

Thank you.
No tags attached.
related to 0015166closed  cc: acomp failed for Source/CursesDialog/form/fld_arg.c 
Issue History
2014-08-06 15:54Dennis ClarkeNew Issue
2014-08-06 17:06Chuck AtkinsNote Added: 0036565
2014-08-07 06:09Dennis ClarkeNote Added: 0036568
2014-08-07 09:10Brad KingNote Added: 0036572
2014-08-07 11:03Chuck AtkinsNote Added: 0036576
2014-08-07 17:06Dennis ClarkeNote Added: 0036579
2014-08-07 17:10Dennis ClarkeNote Added: 0036580
2014-08-07 17:26Dennis ClarkeNote Edited: 0036580bug_revision_view_page.php?bugnote_id=36580#r1540
2014-08-07 22:26Dennis ClarkeNote Added: 0036581
2014-08-11 09:15Brad KingNote Edited: 0036581bug_revision_view_page.php?bugnote_id=36581#r1544
2014-08-11 09:19Brad KingNote Added: 0036587
2014-09-22 13:03Brad KingRelationship addedrelated to 0015166
2014-12-23 10:28Brad KingNote Added: 0037523
2014-12-23 10:28Brad KingStatusnew => resolved
2014-12-23 10:28Brad KingResolutionopen => no change required
2014-12-23 10:28Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1658#r1658
2014-12-23 10:28Brad KingSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1660#r1660
2014-12-23 10:28Brad KingAdditional Information Updatedbug_revision_view_page.php?rev_id=1662#r1662
2015-05-04 09:05Robert MaynardNote Added: 0038709
2015-05-04 09:05Robert MaynardStatusresolved => closed

Notes
(0036565)
Chuck Atkins   
2014-08-06 17:06   
Short answer: Get rid of the -Xc flag from your CFLAGS environment variable.

Long answer: The -Xc flag places the compiler into "strict ISO C compliance" mode (see http://docs.oracle.com/cd/E24457_01/html/E21990/bjapr.html#bjask [^] ) but unfortunately, most of the system headers on Solaris carry a long heritage with them and are effectively empty (i.e. end up getting #ifdef'd out) when in strict ISO C compliance mode with -Xc so none of the included system headers end up as usable. In addition to the build failure this is also why you get so many warnings for implicitly defined functions, like strdup, that should be coming in through includes but aren't.

I was able to reproduce the failure and fix with Solaris Studio 12.3 on Solaris 10:

chuck.atkins@dashsun1:~$ uname -a
SunOS dashsun1 5.10 Generic_147440-01 sun4u sparc SUNW,Sun-Blade-1500
(0036568)
Dennis Clarke   
2014-08-07 06:09   
Interesting. I compile software quite often with -Xc and see good results.

I will give -Xa a try however we then step away from strict compliance.
(0036572)
Brad King   
2014-08-07 09:10   
CMake upstream is only able to support building on platforms for which there is nightly testing on our dashboard:

 http://open.cdash.org/index.php?project=CMake [^]

We currently have no submission for Solaris (we once did in the past but the machine that ran it is no longer available). If you are able to spare some machine time at night, instructions to run testing are here:

 http://www.cmake.org/Wiki/CMake/Git/Dashboard [^]
(0036576)
Chuck Atkins   
2014-08-07 11:03   
The issue here that strict ISO C compliance means you are only allowed functions and data structures that are guaranteed available in the C language. In this case, ProcessUNIX is using sigaction which is part of the POSIX standard but not the ISO C standard. ISO C compliant code will let you run on anything a C compiler can target, even with no operating system (think a micro-controller, for example) but CMake requires some sort of operating system facilities, like processes, for which there's no concept of inherent to the C language itself. Using the -Xc option with the sun compiler is roughly equivalent to using the -ansi option with gcc. It's not really an issue of Solaris compatibility but one of strict ISO C compliance. The same problems should come up if you try to build on Linux with gcc and the -ansi option.
(0036579)
Dennis Clarke   
2014-08-07 17:06   
To Mr Brad King :

    CMake is a critical tool these days and essential to things such as
building MySQL. Therefore havine nightly tests makes good sense. I currently
submit nightly test builds for libCurl project and can certainly setup some
cron jobs on a server. The systems are Niagara T2 class servers therefore all
tests will be on 64-bit Sparc IV+ upwards architecture only. I have no x86_64
servers and really, I don't think anyone else in the world does either. Just a
guess ever since Oracle took over Sun there is no reason to keep x86 Solaris
alive really .. but they do.
(0036580)
Dennis Clarke   
2014-08-07 17:10   
(edited on: 2014-08-07 17:26)
Regarding this discussion about the ISO C or standard C compiler switch, well, I can assure you that building software in standards compliant mode works fine and supports full signals as well as the various POSIX spec standards. Specifically :

http://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html [^]

POSIX.1-2001 POSIX.1-1990, POSIX.1b-1993,
POSIX.1c-1996, POSIX.2-1992, and POSIX.2a-1992 updates

Plus :

     Solaris 10 also supports the X/Open Common Applications
     Environment (CAE) Portability Guide Issue 3 (XPG3) and Issue
     4 (XPG4); Single UNIX Specification (SUS, also known as
     XPG4v2); Single UNIX Specification, Version 2 (SUSv2); and
     Single UNIX Specification, Version 3 (SUSv3). Both XPG4 and
     SUS include Networking Services Issue 4 (XNS4). SUSv2
     includes Networking Services Issue 5 (XNS5).


That is just the man pages. However if a sample code segment is needed that supports full signals and signal handlers written in strict compliant C I can provide that in a jiffy. However it is out of scope here.

Regardless CMake 3.0.0 seems to compile fine with -Xa and all I wonder now is
how to run a test suite of some sort on the result.

(0036581)
Dennis Clarke   
2014-08-07 22:26   
(edited on: 2014-08-11 09:15)
turns out this is all acedemic in any case because cmake 3.0.1 fails a number of tests when I switch over to -Xa compile option as discussed above.

Thus :

$ bin/ctest
Test project /usr/local/build/cmake-3.0.1_SunOS5.10_sparcv9.001
Guessing configuration NoConfig

EDIT: Removed large CTest output. Relevant info is list of failed tests below.

99% tests passed, 3 tests failed out of 354

Label Time Summary:
Label1 = 0.49 sec
Label2 = 0.49 sec

Total Test time (real) = 4214.12 sec

The following tests FAILED:
         26 - FindPackageTest (Failed)
        251 - RunCMake.CMP0041 (Failed)
        280 - RunCMake.include_directories (Failed)
Errors while running CTest


Clearly I need to setup a nightly build environment and then get involved in
sorting out some of these issues as cmake currently is not available on
Solaris.

Thank you.

(0036587)
Brad King   
2014-08-11 09:19   
Re 0015065:0036579, 0015065:0036581: Thanks. A nightly build will help us keep things working. Please consider joining the developer mailing list:

 http://www.cmake.org/mailman/listinfo/cmake-developers [^]

to introduce yourself and your offer to help maintain support for SunOS.
(0037523)
Brad King   
2014-12-23 10:28   
The solution here was in 0015065:0036565: do not compile with flags that disallow use of POSIX interfaces.
(0038709)
Robert Maynard   
2015-05-04 09:05   
Closing resolved issues that have not been updated in more than 4 months.