Snapshot g++, -frepo and collect2 error (symbol in .rpo but not compiled)

Edek P. edek.pienkowski@gmail.com
Sun Mar 1 18:14:00 GMT 2009


Hi,

sorry for everything ;), I just started playing with compiling gcc.

I have Fedora 8, I have some software I'm writing, I'm trying to switch to gcc 4.4.x because of some previous bugs in gcc.
Anyway, I compiled gcc and g++, here is the version dump, it was compiled with some optimizing flags for my cpu

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.4-20090227/configure --prefix=/home/s1/soft/gcc/soft_b2/ --program-suffix=-4.4-20090227-b2 --with-mpfr=/home/s1/soft/gcc/soft_b2/ --with-ppl=/home/s1/soft/gcc/soft_b2/ 
--with-cloog=/home/s1/soft/gcc/soft_b2/ --with-decimal-float --enable-libssp --enable-threads=posix --disable-bootstrap
Thread model: posix
gcc version 4.4.0 20090227 (experimental) (GCC)

I didn't run the gcc tests (make check) yet. I did "make check" the prerequisites. This build was compiled with previous build (same snapshot) compiled with stock gcc (Fedora 4.1.2 version).

What happens when I compile some templated stuff to a DSO:

collect2: 
'_ZN4dogs4util3xml8TXmlBaseINS1_12TSimpleTypesISbIwSt11char_traitsIwESaIwEEEENS1_6xerces16TNamespaceXercesIS8_EENS9_14TElementXercesIS8_NS9_11TTextXercesIS8_EESB_NS9_16TAttributeXercesIS8_SB_SE_EEEEE14getRootElementEv' 
was assigned to '/home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/xml/XmlImplementationFactory.rpo', but was not defined during recompilation, or vice versa

...followed by a lot of undefined references. This happens while making a dummy link step to generate instances, commandline:
/home/s1/soft/gcc/soft_b2/bin/g++-4.4-20090227-b2 -L/home/s1/soft/gcc/soft_b2/lib64 -frepo   -L/home/s1/soft/log4cxx/soft/lib  /home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/./ByteBuffer.o 
/home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/./DogsUuid.o  /home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/./IOInstances.o 
/home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/./StringInputStream.o  /home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/./StringOutputStream.o 
/home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/xml/Types.o  /home/s1/tmp/dogs_svn/imported/trunk/build/obj/util/impl/xml/XmlImplementationFactory.o -lossp-uuid++ -llog4cxx -pipe -frepo 
-D_REENTRANT -Wctor-dtor-privacy -Wall -fstack-protector-all -O2 -ftree-loop-linear -fweb -march=core2 -msse4a -fdiagnostics-show-option -fomit-frame-pointer -fPIC -rdynamic -o temp_out_file 2>&1 | 
grep -v main

Now, the same source code compiles without -frepo, compiles with stock 4.1.2 gcc with -frepo.
It looks to me more like a compiler error than a problem between my chair and my keyboard.
So, I'm thinking of submitting a bug report, but
1. I have no idea how to extract a testcase for the problem
2. Maybe the source code or compiling/linking options are wrong.
3. Maybe I'm doing everything wrong, like using system libc with a compiler that has much newer ABI (or any other reason)

Where should I start? I actually think this is a gcc bug, because of the error message I pasted above.

Thanks,
Edek



More information about the Gcc-help mailing list