Hi Again,
Thanks for your suggestion...
I was able to finally compile the program using a higher version of compiler/assembler (gcc version 2.95.3 20010315/GNU assembler version 2.10.1 (sparc-sun-solaris2.6) using BFD version 2.10.1). What I was attempting next was to statically link log4cpp into my program. My program compiles and succesfully links, using the same compiler/assembler. However, when i launch my program, it core dumps, not immediately, but maybe 10 to 20 seconds. I only have these two statements in my program:
log4cpp::Appender* appender;
appender = new log4cpp::OstreamAppender("default", &std::cout);
I used DDD, but I'm not sure that I can trust the traceback?
Core was generated by `./snooper'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libxnet.so.1...done.
Reading symbols from /usr/lib/libposix4.so.1...done.
Reading symbols from /sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/libstdc++.so.2.10.0...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
#0 __static_initialization_and_destruction_0 (__initialize_p=1313936,
__priority=9)
at /sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../include/g++-3/std/bastring.h:178
^Z^Z/sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../include/g++-3/std/bastring.h:178:5498:beg:0xe4778
(gdb) frame 3
#3 0xe552c in _init () at Appender.cpp:83
(gdb) frame 1
#1 0xe4c74 in global constructors keyed to log4cpp::Priority::getPriorityName () at Priority.cpp:15
/users/fparrott/test_snooper11/log4cpp-0.3.0/src/Priority.cpp:15:319:beg:0xe4c74
(gdb) frame 2
#2 0xe54f4 in __do_global_ctors_aux () at Appender.cpp:83
(gdb) frame 3
#3 0xe552c in _init () at Appender.cpp:83
(gdb)
I would like to use static linking at this time, while I evaluate the software into my program.
I'm new at this, so if there is any other info I can provide, please let me knw.
thanks again for your help and patients.
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've tried to compile the program on our solaris
2.6 system. The gcc version is 2.9. Here's the error message I receive:
rm -f .libs/RemoteSyslogAppender.lo
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -pedantic -c RemoteSyslogAppender.cpp -fPIC -DPIC -o RemoteSyslogAppender.o
mv -f RemoteSyslogAppender.o .libs/RemoteSyslogAppender.lo
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -pedantic -c RemoteSyslogAppender.cpp -o RemoteSyslogAppender.o >/dev/null 2>&1
mv -f .libs/RemoteSyslogAppender.lo RemoteSyslogAppender.lo
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -pedantic -c SimpleLayout.cpp
rm -f .libs/SimpleLayout.lo
g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -g -O2 -Wall -pedantic -c SimpleLayout.cpp -fPIC -DPIC -o SimpleLayout.o
/var/tmp/ccRmaOgT.s: Assembler messages:
/var/tmp/ccRmaOgT.s:2457: Fatal error: Symbol __tfQ27log4cpp6Layout already defined.
make[1]: *** [SimpleLayout.lo] Error 1
make[1]: Leaving directory `/users/fparrott/test_snooper11/log4cpp-0.2.7/src'
make: *** [all-recursive] Error 1
If there's anyother information I can provide, please let me know.
Thanks very much for your help.
Frank
Hmm, looks like your compiler and your assembler don't get along. Are you using the GNU assember? If not, please try it.
Good luck,
Bastiaan
Hi Again,
Thanks for your suggestion...
I was able to finally compile the program using a higher version of compiler/assembler (gcc version 2.95.3 20010315/GNU assembler version 2.10.1 (sparc-sun-solaris2.6) using BFD version 2.10.1). What I was attempting next was to statically link log4cpp into my program. My program compiles and succesfully links, using the same compiler/assembler. However, when i launch my program, it core dumps, not immediately, but maybe 10 to 20 seconds. I only have these two statements in my program:
log4cpp::Appender* appender;
appender = new log4cpp::OstreamAppender("default", &std::cout);
I used DDD, but I'm not sure that I can trust the traceback?
Core was generated by `./snooper'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libxnet.so.1...done.
Reading symbols from /usr/lib/libposix4.so.1...done.
Reading symbols from /sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/libstdc++.so.2.10.0...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
#0 __static_initialization_and_destruction_0 (__initialize_p=1313936,
__priority=9)
at /sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../include/g++-3/std/bastring.h:178
^Z^Z/sw/packages/gcc/c2.95.3/sparc-sun-solaris2.6/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3/../../../../include/g++-3/std/bastring.h:178:5498:beg:0xe4778
(gdb) frame 3
#3 0xe552c in _init () at Appender.cpp:83
(gdb) frame 1
#1 0xe4c74 in global constructors keyed to log4cpp::Priority::getPriorityName () at Priority.cpp:15
/users/fparrott/test_snooper11/log4cpp-0.3.0/src/Priority.cpp:15:319:beg:0xe4c74
(gdb) frame 2
#2 0xe54f4 in __do_global_ctors_aux () at Appender.cpp:83
(gdb) frame 3
#3 0xe552c in _init () at Appender.cpp:83
(gdb)
I would like to use static linking at this time, while I evaluate the software into my program.
I'm new at this, so if there is any other info I can provide, please let me knw.
thanks again for your help and patients.
Frank