Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Mon, Dec 17, 2012 at 10:20 AM, David Tardon dtar...@redhat.com wrote: Hi, The old build system looks for ENVLINKFLAGS variable. So if you set ENVLINKFLAGS to the same value as LDFLAGS, the build should pass. D. Thanks, that works great. Added it to the lcov wiki page. Regards, John Smith. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
Hi, On Wed, Dec 12, 2012 at 01:53:48PM +0100, John Smith wrote: On Wed, Dec 12, 2012 at 12:28 PM, Michael Stahl mst...@redhat.com wrote: but apparently LDFLAGS don't hmmm... you could try editing these and adding your options there: solenv/inc/unxgcc.mk:LINKFLAGSSHLGUI= -shared solenv/inc/unxgcc.mk:LINKFLAGSSHLCUI= -shared This works, by the way, for setup_native. But even after editing those files the same behavior (LDFLAGS not set) appears when building odk. And I cant seem to be able to figure out what makefile to hack to fix it. Of course I can just do './configure --disable-odk'... The old build system looks for ENVLINKFLAGS variable. So if you set ENVLINKFLAGS to the same value as LDFLAGS, the build should pass. D. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Wed, Dec 12, 2012 at 3:04 AM, Caolán McNamara caol...@redhat.com wrote: On Tue, 2012-12-11 at 21:50 +0100, John Smith wrote: But I still get this error message (in 'make setup_native') undefined reference to `__gcov_init' Does anyone have an idea of what might be going on here ? Does - LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' + LDFLAGS+='-fprofile-arcs -lgcov' CFLAGS+='-fprofile-arcs -ftest-coverage' make any difference ? Sadly, explicitly adding -glcov (-fprofile-arcs implies -lgcov) does not make a difference. I still get this : Making:getuid.so No winegcc present, not building msiinfo... Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msimsp ../../unxlngi6.pro/slo/getuid.o: In function `_GLOBAL__sub_I_65535_0_getuid.c': getuid.c:(.text.startup+0x1a): undefined reference to `__gcov_init' ../../unxlngi6.pro/slo/getuid.o:(.data.rel+0x10): undefined reference to `__gcov_merge_add' collect2: error: ld returned 1 exit status dmake: Error code 1, while making '../../unxlngi6.pro/lib/getuid.so' --- Oh dear - something failed during the build - sorry ! For more help with debugging build errors, please see the section in: http://wiki.documentfoundation.org/Development No winegcc present, not building msimsp... internal build errors: ERROR: error 65280 occurred while making /usr/local/src/libreoffice/setup_native/scripts/source it seems that the error is inside '', please re-run build inside this module to isolate the error and/or test your fix. --- To rebuild a specific module: make .clean # optional make when the problem is isolated and fixed, re-run 'make' make[1]: *** [setup_native] Error 1 make[1]: Leaving directory `/usr/local/src/libreoffice' make: *** [setup_native] Error 2 [root@localhost libreoffice]# ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On 11/12/12 21:50, John Smith wrote: Hi, Im trying to build libreoffice for using gcov/loc, so Ive set: LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' CXXFLAGS+='-fprofile-arcs -ftest-coverage' \ CPPFLAGS+='-fprofile-arcs -ftest-coverage' But I still get this error message (in 'make setup_native') undefined reference to `__gcov_init' Does anyone have an idea of what might be going on here ? setup_native still uses the old dmake based build system, most likely that does not support those *FLAGS variables. you can check with make setup_native VERBOSE=t if that stuff is actually used. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Wed, Dec 12, 2012 at 11:36 AM, Michael Stahl mst...@redhat.com wrote: setup_native still uses the old dmake based build system, most likely that does not support those *FLAGS variables. you can check with make setup_native VERBOSE=t if that stuff is actually used. Thanks. But I have no idea what to look for in the output when using VERBOSE=t. :( This is the output I get with make setup_native VERBOSE=t : # LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' CXXFLAGS+='-fprofile-arcs -ftest-coverage' CPPFLAGS+='-fprofile-arcs -ftest-coverage' make setup_native VERBOSE=t make -r -f /usr/local/src/libreoffice/Makefile.top setup_native make[1]: Entering directory `/usr/local/src/libreoffice' cd setup_native unset MAKEFLAGS /usr/local/src/libreoffice/solenv/bin/build.pl -P2 -- -P2 = (1/1) Building module setup_native = Entering /usr/local/src/libreoffice/setup_native/source/mac Entering /usr/local/src/libreoffice/setup_native/scripts/source Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/makecab Making:all_getuid.dpslo No winegcc present, not building makecab... Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msidb Compiling: setup_native/scripts/source/getuid.c gcc -fprofile-arcs -ftest-coverage -fmessage-length=0 -c -Os -D_GNU_SOURCE -I. -I../../unxlngi6.pro/inc/getuid -I../inc -I../../inc -I../../unx/inc -I../../unxlngi6.pro/inc -I. -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/external -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc -I/usr/local/src/libreoffice/solenv/inc -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include/linux -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include/native_threads/include -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/udkapi -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/offapi -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/oovbaapi -I. -I../../res -I. -pipe -mtune=pentiumpro -fprofile-arcs -ftest-coverage -fmessage-length=0 -c -Os -D_GNU_SOURCE -Wall -Wextra -Wendif-labels -Wdeclaration-after-statement -fpic -DLINUX -DUNX -DGCC -DINTEL -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DHAVE_GCC_VISIBILITY_FEATURE -DX86 -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/include/c++/4.7.2 -DSUPD=410 -DPRODUCT -DNDEBUG -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DHAVE_THREADSAFE_STATICS -DRTL_USING -DSOLAR_JAVA -o ../../unxlngi6.pro/slo/getuid.o getuid.c : LD_LIBRARY_PATH=/usr/local/src/libreoffice/solver/unxlngi6.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} /usr/local/src/libreoffice/solver/unxlngi6.pro/bin/makedepend @/tmp/mkCa8M3B ../../unxlngi6.pro/misc/s_getuid.dpcc No winegcc present, not building msidb... Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msiinfo - SHL1FILTERFILE not set! - No winegcc present, not building msiinfo... dummy file to keep the dependencies for later use. rm -f ../../unxlngi6.pro/lib/check_getuid.so mv ../../unxlngi6.pro/lib/getuid.so ../../unxlngi6.pro/lib/check_getuid.so /usr/local/src/libreoffice/solenv/bin/checkdll.sh -L../../unxlngi6.pro/lib -L/usr/local/src/libreoffice/solver/unxlngi6.pro/lib ../../unxlngi6.pro/lib/check_getuid.so Making:getuid.so Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msimsp gcc -Wl,-z,noexecstack -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,--hash-style=gnu -Wl,-z,origin -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib',--enable-new-dtags -shared -L../../unxlngi6.pro/lib -L../lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib -L/usr/local/src/libreoffice/solver/unxlngi6.pro/lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib ../../unxlngi6.pro/slo/getuid.o -o ../../unxlngi6.pro/lib/getuid.so -ldl -Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed No winegcc present, not building msimsp... Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msitran ../../unxlngi6.pro/slo/getuid.o: In function `_GLOBAL__sub_I_65535_0_getuid.c': getuid.c:(.text.startup+0x1a): undefined reference to `__gcov_init' ../../unxlngi6.pro/slo/getuid.o:(.data.rel+0x10): undefined reference to `__gcov_merge_add' No winegcc present, not building msitran... collect2: error: ld returned 1 exit status dmake: Error code 1, while making '../../unxlngi6.pro/lib/getuid.so' --- Oh dear - something failed during the build - sorry ! For more help with debugging build errors, please see the section in: http://wiki.documentfoundation.org/Development internal build errors: ERROR: error 65280 occurred while making /usr/local/src/libreoffice/setup_native/scripts/source it seems that the error is inside '', please re-run build inside this module to
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On 12/12/12 11:49, John Smith wrote: On Wed, Dec 12, 2012 at 11:36 AM, Michael Stahl mst...@redhat.com wrote: setup_native still uses the old dmake based build system, most likely that does not support those *FLAGS variables. you can check with make setup_native VERBOSE=t if that stuff is actually used. Thanks. But I have no idea what to look for in the output when using VERBOSE=t. :( well obviously check that the flags you want to add are actually on the command line... Compiling: setup_native/scripts/source/getuid.c gcc -fprofile-arcs -ftest-coverage -fmessage-length=0 -c -Os ^^^ ok so CFLAGS seem to work gcc -Wl,-z,noexecstack -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,--hash-style=gnu -Wl,-z,origin -Wl,-rpath,'$ORIGIN:$ORIGIN/../ure-link/lib',--enable-new-dtags -shared -L../../unxlngi6.pro/lib -L../lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib -L/usr/local/src/libreoffice/solver/unxlngi6.pro/lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib .../../unxlngi6.pro/slo/getuid.o -o ../../unxlngi6.pro/lib/getuid.so -ldl -Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed but apparently LDFLAGS don't hmmm... you could try editing these and adding your options there: solenv/inc/unxgcc.mk:LINKFLAGSSHLGUI= -shared solenv/inc/unxgcc.mk:LINKFLAGSSHLCUI= -shared of course the best would be to convert the module to the new build system and send a patch :) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Wed, Dec 12, 2012 at 12:28 PM, Michael Stahl mst...@redhat.com wrote: well obviously check that the flags you want to add are actually on the command line... Thank you so much for your time and patience. Yes, I could have checked if these options ended up on the command line. I was wrongly assuming you meant 'check if/how the dmake system is still used', and I didnt know how to look for that. of course the best would be to convert the module to the new build system and send a patch :) I would if I could. But as you can clearly see, I would need some serious hand holding for that. I can add a bit about dmake not supporting LDFLAGS this way (and that the new gbuild system does) to the wiki page describing how to generate the lcov reports. Thanks, John Smith. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Wed, Dec 12, 2012 at 12:28 PM, Michael Stahl mst...@redhat.com wrote: but apparently LDFLAGS don't hmmm... you could try editing these and adding your options there: solenv/inc/unxgcc.mk:LINKFLAGSSHLGUI= -shared solenv/inc/unxgcc.mk:LINKFLAGSSHLCUI= -shared This works, by the way, for setup_native. But even after editing those files the same behavior (LDFLAGS not set) appears when building odk. And I cant seem to be able to figure out what makefile to hack to fix it. Of course I can just do './configure --disable-odk'... # LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' CXXFLAGS+='-fprofile-arcs -ftest-coverage' CPPFLAGS+='-fprofile-arcs -ftest-coverage' make odk VERBOSE=t make -r -f /usr/local/src/libreoffice/Makefile.top odk make[1]: Entering directory `/usr/local/src/libreoffice' cd odk unset MAKEFLAGS /usr/local/src/libreoffice/solenv/bin/build.pl -P2 -- -P2 = (1/1) Building module odk = Entering /usr/local/src/libreoffice/odk/inc Entering /usr/local/src/libreoffice/odk/pack/unzip_udk Entering /usr/local/src/libreoffice/odk/source/unowinreg/win Entering /usr/local/src/libreoffice/odk/source/com/sun/star/lib/loader /bin/cp /usr/local/src/libreoffice/src/185d60944ea767075d27247c3162b3bc-unowinreg.dll ../../../unxlngi6.pro/bin/unowinreg.dll Entering /usr/local/src/libreoffice/odk/source/unoapploader/unx Making:com_sun_star_lib_loader.dpj rm -f ../../../../../../unxlngi6.pro/misc/com_sun_star_lib_loader_dummy.java rm -f ../../../../../../unxlngi6.pro/misc/com_sun_star_lib_loader_dummy.java Compiling: odk/source/unoapploader/unx/unoapploader.c rm -f ../../../../../../unxlngi6.pro/misc/com_sun_star_lib_loader_dummy.java gcc -fprofile-arcs -ftest-coverage -fmessage-length=0 -c -Os -I. -I../../../unxlngi6.pro/inc/unoapploader -I../inc -I../../../inc -I../../../unx/inc -I../../../unxlngi6.pro/inc -I. -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/external -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc -I/usr/local/src/libreoffice/solenv/inc -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include/linux -I/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5/include/native_threads/include -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/udkapi -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/offapi -I/usr/local/src/libreoffice/solver/unxlngi6.pro/inc/oovbaapi -I. -I../../../res -I. -pipe -mtune=pentiumpro -fprofile-arcs -ftest-coverage -fmessage-length=0 -c -Os -Wall -Wextra -Wendif-labels -Wdeclaration-after-statement -DLINUX -DUNX -DGCC -DINTEL -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DHAVE_GCC_VISIBILITY_FEATURE -DX86 -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/include/c++/4.7.2 -DSUPD=410 -DPRODUCT -DNDEBUG -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DHAVE_THREADSAFE_STATICS -DRTL_USING -DSOLAR_JAVA -o ../../../unxlngi6.pro/obj/unoapploader.o unoapploader.c : LD_LIBRARY_PATH=/usr/local/src/libreoffice/solver/unxlngi6.pro/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} /usr/local/src/libreoffice/solver/unxlngi6.pro/bin/makedepend @/tmp/mkfV0F2B ../../../unxlngi6.pro/misc/o_unoapploader.dpcc rm -f ../../../../../../unxlngi6.pro/misc/com_sun_star_lib_loader_dummy.java /bin/javac -source 1.5 -target 1.5 -classpath .:../../../../../../unxlngi6.pro/class: -d ../../../../../../unxlngi6.pro/class @/tmp/mkIqMQRk Making:unoapploader gcc -Wl,-z,noexecstack -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,--hash-style=gnu -Wl,-export-dynamic -Wl,-rpath-link,../../../unxlngi6.pro/lib:/usr/local/src/libreoffice/solver/unxlngi6.pro/lib:/lib:/usr/lib -L../../../unxlngi6.pro/lib -L../lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib -L/usr/local/src/libreoffice/solver/unxlngi6.pro/lib -L/usr/local/src/libreoffice/solenv/unxlngi6/lib ../../../unxlngi6.pro/obj/unoapploader.o \ -lfindsofficepath -ldl -o ../../../unxlngi6.pro/bin/unoapploader ../../../unxlngi6.pro/obj/unoapploader.o:(.data+0x14): undefined reference to `__gcov_merge_add' ../../../unxlngi6.pro/obj/unoapploader.o: In function `main': unoapploader.c:(.text.startup+0x56f): undefined reference to `__gcov_execvp' ../../../unxlngi6.pro/obj/unoapploader.o: In function `_GLOBAL__sub_I_65535_0_SEPARATOR': unoapploader.c:(.text.startup+0x5c7): undefined reference to `__gcov_init' /usr/local/src/libreoffice/solver/unxlngi6.pro/lib/libfindsofficepath.a(findsofficepath.o): In function `_GLOBAL__sub_I_65535_0_findsofficepath.c': findsofficepath.c:(.text+0x429): undefined reference to `__gcov_init' /usr/local/src/libreoffice/solver/unxlngi6.pro/lib/libfindsofficepath.a(findsofficepath.o):(.data.rel+0x10): undefined reference to `__gcov_merge_add' collect2: error: ld returned 1 exit status dmake: Error code 1, while making '../../../unxlngi6.pro/bin/unoapploader' ---
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On 12/12/12 13:53, John Smith wrote: On Wed, Dec 12, 2012 at 12:28 PM, Michael Stahl mst...@redhat.com wrote: but apparently LDFLAGS don't hmmm... you could try editing these and adding your options there: solenv/inc/unxgcc.mk:LINKFLAGSSHLGUI= -shared solenv/inc/unxgcc.mk:LINKFLAGSSHLCUI= -shared This works, by the way, for setup_native. But even after editing those files the same behavior (LDFLAGS not set) appears when building odk. And I cant seem to be able to figure out what makefile to hack to fix it. Of course I can just do './configure --disable-odk'... well odk is rather irrelevant for code coverage anyway... ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'
On Tue, 2012-12-11 at 21:50 +0100, John Smith wrote: But I still get this error message (in 'make setup_native') undefined reference to `__gcov_init' Does anyone have an idea of what might be going on here ? Does - LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' + LDFLAGS+='-fprofile-arcs -lgcov' CFLAGS+='-fprofile-arcs -ftest-coverage' make any difference ? C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice