[Log4cplus-devel] building log4cplus with Sun studio
Logging Framework for C++
Brought to you by:
wilx
From: Jeremy C. R. <re...@re...> - 2011-06-01 18:18:27
|
Using latest subversion trunk revision 1535 with: Sun C++ 5.10 SunOS_sparc 2009/06/03 /export/home/opt/sunstudio12.1/prod/bin/ccfe -y-o -yclogger.o -I../include -I../include +w -y-fbe -y/export/home/opt/sunstudio12.1/prod/bin/fbe -y-xarch=generic -y-verbose -O0 -ptf /tmp/25726%1.%2 -ptx /export/home/opt/sunstudio12.1/prod/bin/CC -ptk "-DHAVE_CONFIG_H -DINSIDE_LOG4CPLUS -I../include -I../include -DNDEBUG -D_REENTRANT -g -v +w -library=stlport4 -library=Crun -D_REENTRANT -xthreadvar -c " -D__SunOS_5_10 -D__SUNPRO_CC=0x5100 -Dunix -Dsun -Dsparc -D__sparc -D__sparcv8plus -D__unix -D__sun -D__SunOS -D__BUILTIN_VA_ARG_INCR -D__SVR4 -D__SUNPRO_CC_COMPAT=5 -D__SUN_PREFETCH -g +d -y-g -xdbggen=no%stabs+dwarf2 -y-xmemalign=8i -I-xbuiltin -y-xthreadvar=%all -xldscope=global -instlib=/export/home/opt/sunstudio12.1/prod/lib/stlport4/libstlport.a -I/export/home/opt/sunstudio12.1/prod/include/CC/stlport4 -I/export/home/opt/sunstudio12.1/prod/include/CC -I/export/home/opt/sunstudio12.1/prod/include/CC/rw7 -I/export/home/opt/sunstudio12.1/prod/include/cc -y-comdat -DHAVE_CONFIG_H -DINSIDE_LOG4CPLUS -DNDEBUG -D_REENTRANT -D_REENTRANT clogger.cxx -s /tmp/ccfe.25726.0.s >&/tmp/ccfe.25726.1.err rm /tmp/ccfe.25726.0.s /export/home/opt/sunstudio12.1/prod/bin/stdlibfilt -stderr </tmp/ccfe.25726.1.err "clogger.cxx", line 157: Error: va_list is not defined. "clogger.cxx", line 158: Error: Cannot assign void* to int. "clogger.cxx", line 189: Error: va_list is not defined. "clogger.cxx", line 190: Error: Cannot assign void* to int. 4 Error(s) detected. rm /tmp/ccfe.25726.1.err *** Error code 1 make: Fatal error: Command failed for target `clogger.lo' Current working directory /export/home/users/jreed/src/log4cplus/log4cplus/trunk/src My workaround for this: Index: src/clogger.cxx =================================================================== --- src/clogger.cxx (revision 1535) +++ src/clogger.cxx (working copy) @@ -30,7 +30,7 @@ #include <cerrno> #include <cstdio> -#include <cstdarg> +#include <stdarg.h> /* for va_list */ #include <cstring> #include <sstream> Later when linking: Undefined first referenced symbol in file bind .libs/socket-unix.o send .libs/socket-unix.o accept .libs/socket-unix.o listen .libs/socket-unix.o socket .libs/socket-unix.o setsockopt .libs/socket-unix.o connect .libs/socket-unix.o getaddrinfo .libs/socket-unix.o freeaddrinfo .libs/socket-unix.o inet_addr .libs/socket-unix.o So was missing -lsocket -lnsl I tracked that down to the checks for these: configure kept failing with: CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored otherwise ### command line files and options (expanded): ... /usr/ccs/bin/ld: illegal option -- W So no success for AC_SEARCH_LIBS so was never defined. So I built with --disable-warnings. That worked-around that problem. Please fix so -W is not passed to Sun's ld. I see your configure.in does have some "sun" support but not working correct. I did not have these problems with 1.0.4. I stopped using trunk after I installed since I had some problems with loggingmacros.h no longer included and some hierarchy changes (I think) so I went back to 1.0.4 for our current use. Jeremy C. Reed echo 'EhZ[h ^jjf0%%h[[Zc[Z_W$d[j%Xeeai%ZW[ced#]dk#f[d]k_d%' | \ tr '#-~' '\-.-{' |