Compile ofCo:Z Toolkit 1.0.7 fails on Solaris 10

General discussion of the Co:Z Toolkit
Post Reply
russtok
Posts: 2
Joined: Thu May 20, 2010 7:43 pm

Compile ofCo:Z Toolkit 1.0.7 fails on Solaris 10

Post by russtok »

Hi,

I'm not having any luck compiling the toolkit for Solaris 10 in SPARC. Here's what happens:

Code: Select all

Making all in src
make  all-am
g++ -DHAVE_CONFIG_H -I.      -g -O2 -DENV_PREFIX=COZ -DBUILD_VERSION="1.0.7 2009-07-07" -MT CoZAgent.o -MD -MP -MF .deps/CoZAgent.Tpo -c -o CoZAgent.o CoZAgent.C
In file included from CoZAgent.C:28:
DtlLog.h:34:1: warning: "_XOPEN_SOURCE" redefined
<built-in>:82:1: warning: this is the location of the previous definition
In file included from /usr/include/iso/stdarg_c99.h:34,
                 from /usr/include/stdarg.h:33,
                 from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include/stdio.h:14,
                 from DtlLog.h:40,
                 from CoZAgent.C:28:
/usr/include/sys/feature_tests.h:336:2: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications      require the use of c99"
*** Error code 1
make: Fatal error: Command failed for target `CoZAgent.o'
I'm using GCC 3.4.3 that comes with Solaris 10. Any suggestions?

Thanks,
Russ
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Try:

Code: Select all

export CXXFLAGS="-std=c99"
Before running your build and see if it fixes the problem.
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

If the above suggestion doesn't work. You can make the following source change locally as a workaround:

In the file src/DtlLog.h, remove the following two lines (at line 33 in the file):

Code: Select all

#else
        #define _XOPEN_SOURCE 600
This should fix the problem. We'll address this issue in a future release.
russtok
Posts: 2
Joined: Thu May 20, 2010 7:43 pm

Post by russtok »

Sorry for the late reply. Too many other pressing projects.

The CXXFLAGS prevented GCC from compiling Co:Z so not set.

Editing src/DtlLog.h worked.

Also needed to add '-liconv' to the LIBS in src/Makefile so that linking against libiconv would occur. Shouldn't configure have picked this up?
LD_LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib since I have the SunFreeware SMCliconv package installed for GNU libiconv.

Now all is compiled and installed.

Thanks!
Post Reply