#47 Compile fails under Solaris 10


Could the correct flags be provided to compile this library under Solaris 10? It compiled with no problems under Solaris 9.

Many thanks..


raisin2:tmp $ cd commoncpp2-1.5.2/
raisin2:commoncpp2-1.5.2 $ gmake
Making all in include
gmake[1]: Entering directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
gmake all-recursive
gmake[2]: Entering directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
Making all in cc++
gmake[3]: Entering directory `/home/e0080433/tmp/commoncpp2-1.5.2/include/cc++'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/home/e0080433/tmp/commoncpp2-1.5.2/include/cc++'
gmake[3]: Entering directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
gmake[3]: Leaving directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
gmake[2]: Leaving directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
gmake[1]: Leaving directory `/home/e0080433/tmp/commoncpp2-1.5.2/include'
Making all in src
gmake[1]: Entering directory `/home/e0080433/tmp/commoncpp2-1.5.2/src'
source='thread.cpp' object='thread.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/bash ../autoconf/depcomp \ /bin/bash ../libtool --tag=CXX --mode=compile /opt/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_REENTRANT -D_GNU_SOURCE -I../include -g -c -o thread.lo thread.cpp
/opt/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY -D_REENTRANT -D_GNU_SOURCE -I../include -g -c thread.cpp -o .libs/thread.o
"/usr/include/sys/feature_tests.h", line 337: Error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99".
gmake[1]: *** [thread.lo] Error 1
gmake[1]: Leaving directory `/home/e0080433/tmp/commoncpp2-1.5.2/src'
gmake: *** [all-recursive] Error 1
raisin2:commoncpp2-1.5.2 $


  • Nobody/Anonymous

    Logged In: NO

    Compiling with the CNU compiler tools does not exhibit this problem. The problem seems to be localized to the Sun Studio 11 compiler that I am using.


  • dlmeek

    dlmeek - 2008-01-15

    Logged In: YES
    Originator: NO

    config.h is being built incorrectly for Solaris 10. At least in my case. After two edits to config.h compilation started working.

    If someone happens to know what options should be passed on to ./configure I would appreciate that.


  • Nobody/Anonymous

    What compiller do you use?
    I compile commonC++ both for Solaris 8 and Solaris 10 with Sunstudio11 & 12.
    Of cource there was a porblem, but fixable.

    I use the folowing settings:

    export CXX=/opt/SunStudio11/SUNWspro/bin/CC
    export CC=/opt/SunStudio11/SUNWspro/bin/cc

    export CFLAGS="-mt -xO3"

    export CXXFLAGS="-features=extensions -mt -xO3 \ -errtags=yes -erroff=wvarhidemem \ -instances=global \ -library=Cstd -library=no%stlport4 -features=tmplife -features=tmplrefstatic -filt=%all"

    export LDFLAGS="-mt"

    export LIBS=" -lsocket -lnsl"

    ./configure --without-nat --without-ipv6 --without-pic --disable-shared --enable-static

  • Nobody/Anonymous

    I was able to compile commoncpp 1.7.3 on Solaris 10 by SunStudio 12, after changing #define _XOPEN_SOURCE 600
    #define _XOPEN_SOURCE 700
    in generated config.h file.

  • Botan

    Botan - 2009-07-06

    Sorry, last two posts was mine.

  • David Sugar

    David Sugar - 2012-11-18

    I had found several strange issues on testing of ucommon 6 in opensolaris with sunwpro compiler. But the only thing that currently breaks is applog.cpp in the commoncpp tree, related to std::map being different/incorrect. Of course it may also be correct we should use _XOPEN_SOURCE 700 on OpenSolaris...

  • David Sugar

    David Sugar - 2012-11-18
    • milestone: --> Common_Libraries

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks