Wondering if someone had an idea. nads wrote: > > I am running into a problem with a package that I have developed using g++ > 4.3.2 20081105, even though the problem exists in 4.1.x as well. The > package compiles and runs correctly if I compile the code for production. > That is, compiling without the coverage and profiling options. Here's the > compiler output at link time.<p> > > > /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O3 -funroll-loops > -Wall -I/usr/local/include -I/usr/local/include/lwes-0 > -I/usr/local/include/json -L/usr/local/lib -o netlog-listen > netlog-listen.o libnetlog.la -lresolv -lnsl -lfl -L/usr/local/lib > -L/usr/local/lib -llwes -ljson > g++ -g -O3 -funroll-loops -Wall -I/usr/local/include > -I/usr/local/include/lwes-0 -I/usr/local/include/json -o > .libs/netlog-listen netlog-listen.o -L/usr/local/lib ./.libs/libnetlog.so > /usr/local/lib/liblwes.so -lresolv -lnsl -lfl /usr/local/lib/libjson.so > -Wl,--rpath -Wl,/usr/local/lib > > > But when I configure the code with coverage and profiling options, the > compiler chokes at link time: > > > /bin/sh ../libtool --tag=CXX --mode=link g++ -g -funroll-loops -Wall > -I/usr/local/include -I/usr/local/include/lwes-0 -I/usr/local/include/json > -fprofile-arcs -ftest-coverage -L/usr/local/lib -o netlog-listen > netlog-listen.o libnetlog.la -lresolv -lnsl -lfl -L/usr/local/lib > -L/usr/local/lib -llwes -ljson > g++ -g -funroll-loops -Wall -I/usr/local/include > -I/usr/local/include/lwes-0 -I/usr/local/include/json -fprofile-arcs > -ftest-coverage -fstack-protector -shared -L/usr/local/lib -o > netlog-listen netlog-listen.o libnetlog.la -lresolv -lnsl -lfl > -L/usr/local/lib -L/usr/local/lib -llwes -ljson > /usr/bin/ld: .libs/netlog-listen: hidden symbol `__stack_chk_fail_local' > in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO > /usr/bin/ld: final link failed: Nonrepresentable section on output > collect2: ld returned 1 exit status > make[1]: *** [netlog-listen] Error 1 > > > Adding -shared to CFLAGS allows me to link as was suggested in some user > groups. However, the produced binaries crash as soon as I run them. > Running it under gdb is to no avail; it doesn't produce any meaningful > stack trace. > > I'm sure someone must have seen this and that I'm doing something stupid > here. Would appreciate it if someone could let me know what is wrong > here. > > Thanks, > nads > > > > -- View this message in context: http://www.nabble.com/g%2B%2B-4.x.x-chokes-when-using--fprofile-arcs-tp23006819p23343730.html Sent from the gcc - Help mailing list archive at Nabble.com.