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

John Smith lbalbalba at gmail.com
Wed Dec 12 02:49:57 PST 2012


On Wed, Dec 12, 2012 at 11:36 AM, Michael Stahl <mstahl at 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 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


More information about the LibreOffice mailing list