Can't x-build ubuntu-system-settings with 1.0.4ubuntu1: /usr/lib/arm-linux-gnueabihf/libapt-pkg.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'

Bug #1328838 reported by Iain Lane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned
gcc-4.9 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I just tried a cross-build of ubuntu-system-settings (a reverse dependency of libapt-pkg) on Utopic, and got apt 1.0.4ubuntu1 as part of this.

The build failed (full log attached) with this output

  /usr/bin/arm-linux-gnueabihf-g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++0x -fno-permissive -pedantic -Wall -Wextra -Wl,-Bsymbolic-functions -Wl,-z,relro CMakeFiles/tst-update.dir/tst_update.cpp.o CMakeFiles/tst-update.dir/__/__/__/plugins/system-update/update.cpp.o CMakeFiles/tst-update.dir/tst-update_automoc.cpp.o -o tst-update -rdynamic /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5DBus.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Xml.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Test.so.5.2.1 -lapt-pkg /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5.2.1 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.2.1
  /usr/lib/arm-linux-gnueabihf/libapt-pkg.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
  collect2: error: ld returned 1 exit status

if I then enter the environment and downgrade apt only to the versions in utopic release (1.0.2ubuntu2) then it builds again.

You should be able to reproduce it by creating a cross-building chroot

$ mk-sbuild --target armhf utopic

and then trying to build current ubuntu-system-settings inside that.

$ sbuild --host=armhf -A -d utopic <blah.dsc>

Revision history for this message
Iain Lane (laney) wrote :
description: updated
Revision history for this message
Iain Lane (laney) wrote :

Erm, this works when built against apt 1.0.4ubuntu3. The main difference that I can see is that this was built against gcc/g++ 4.8 whereas the others were with 4.9.

Revision history for this message
Michael Vogt (mvo) wrote :

I marked this a duplicate, please unduplicate if it turns out to be a seperate bug.

Revision history for this message
Matthias Klose (doko) wrote :

looks like 4.8 was used for the cross build and 4.9 for the native builds. This should be rechecked with a 4.9 cross compiler

Revision history for this message
Adam Conrad (adconrad) wrote :

This is entirely a side-effect of the cross-compiler using its own libstdc++ rather than the one on the system search path, which, as doko points out, would be resolved by using a 4.9 cross-compiler.

Basically, it's failing to find a 4.9 symbol in the 4.8 stdc++, which is an entirely reasonable thing to fail to do.

Changed in apt (Ubuntu):
status: New → Invalid
Revision history for this message
Iain Lane (laney) wrote : Re: [Bug 1328838] Re: Can't x-build ubuntu-system-settings with 1.0.4ubuntu1: /usr/lib/arm-linux-gnueabihf/libapt-pkg.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'

On Thu, Jun 12, 2014 at 09:36:38AM -0000, Matthias Klose wrote:
> looks like 4.8 was used for the cross build and 4.9 for the native
> builds. This should be rechecked with a 4.9 cross compiler

I expect it will work. The problem is updating the native defaults and
not the cross ones.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Matthias Klose (doko) wrote :

we don't keep the native and cross compilers in sync during version transitions

Changed in gcc-4.9 (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.