undefined reference to `__gcov_init' when using FLAGS+='-fprofile-arcs -ftest-coverage'

John Smith lbalbalba at gmail.com
Tue Dec 11 12:50:32 PST 2012


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 ?


John Smith

The output from make is :

# LDFLAGS+='-fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage'
CXXFLAGS+='-fprofile-arcs -ftest-coverage' CPPFLAGS+='-fprofile-arcs
-ftest-coverage' make setup_native
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/scripts/source

Entering /usr/local/src/libreoffice/setup_native/source/mac

Making:    getuid.so
Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/makecab

No winegcc present, not building makecab...
Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msidb

../../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 msidb...
collect2: error: ld returned 1 exit status
dmake:  Error code 1, while making '../../unxlngi6.pro/lib/getuid.so'
Entering /usr/local/src/libreoffice/setup_native/source/win32/wintools/msiinfo

        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:

No winegcc present, not building msiinfo...
  internal build errors:

ERROR: error 65280 occurred while making

 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

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 at localhost libreoffice]#

More information about the LibreOffice mailing list