[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#387587: Causes FTBFS with GCC 4.2: ODR issue



Package: apt
Version: 0.6.45

Some packages linking against apt-pkg fail to build with GCC 4.2.
Version 4.2 has not been released yet but I'm building with a snapshot
in order to find errors and give people an advance warning.
Apparently, this is not a bug in GCC but in apt.  One GCC developer
who looked at the code said:

06:16 < pinskia> tbm: the testcase you gave me is invalid, as it has
  an ODR issue

and

"This testcase is useless really, as it is invalid code as the
defintions of the class OpProgress is different between the sources.
Also I think it is a bug with "#pragma interface" which really should
just be removed from GCC but has not because Java uses it."

You can reproduce this with the gcc-snapshot package from unstable
(20060912-1 or higher; 20060823-1 still worked but, like I said,
apparently this is not due to a GCC change but because of invalid
code).


One example failure:

> Automatic build of apt-move_4.2.24-1.1 on coconut0 by sbuild/ia64 0.49
...
> make[1]: Entering directory `/build/tbm/apt-move-4.2.24'
> g++ -g -O2 -Wall   -c -o fetch.o fetch.cc
> g++ -o fetch  fetch.o  -lapt-pkg
> fetch.o: In function `~OpTextProgress':
> /usr/include/apt-pkg/progress.h:89: undefined reference to `OpProgress::~OpProgress()'
> /usr/include/apt-pkg/progress.h:89: undefined reference to `OpProgress::~OpProgress()'
> collect2: ld returned 1 exit status
> make[1]: *** [fetch] Error 1
> make[1]: Leaving directory `/build/tbm/apt-move-4.2.24'

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: