g++-4.9 binary incompatibilities with libraries built with g++-4.8

Bug #1329089 reported by Steve Langasek
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Thomas Voß
0.4
Won't Fix
Medium
Steve Langasek
Debian
Fix Released
Unknown
dbus-cpp (Ubuntu)
Fix Released
Critical
Thomas Voß
firefox (Ubuntu)
New
Undecided
Unassigned
gcc-4.9 (Ubuntu)
Fix Released
Critical
Unassigned
gcc-defaults (Ubuntu)
Fix Released
Undecided
Unassigned
location-service (Ubuntu)
Invalid
Critical
Unassigned
mir (Ubuntu)
Fix Released
Medium
Unassigned
process-cpp (Ubuntu)
Invalid
Undecided
Unassigned
qtbase-opensource-src (Ubuntu)
Fix Released
Undecided
Unassigned
unity (Ubuntu)
Invalid
Undecided
Unassigned
unity-scope-click (Ubuntu)
Fix Released
Undecided
Unassigned
unity-scopes-api (Ubuntu)
Fix Released
Undecided
Unassigned
unity-scopes-shell (Ubuntu)
New
Undecided
Unassigned

Bug Description

The location-service 0.0.3+14.10.20140512-0ubuntu1 package in utopic, when rebuilt against libdbus-cpp3 3.0.0+14.10.20140604-0ubuntu1 (built with gcc-4.8) and with current gcc-defaults (which makes g++-4.9 the default), fails the package build in its test suite.

 2/14 Test #2: acceptance_tests ..................***Failed 30.54 sec
DBus daemon: unix:abstract=/tmp/dbus-HdW1T5UHNB,guid=188551aa5d797b663dade1425398d71b
task-0: Started with PID: 13031
task-0: [==========] Running 2 tests from 1 test case.
task-0: [----------] Global test environment set-up.
task-0: [----------] 2 tests from LocationServiceStandalone
task-0: [ RUN ] LocationServiceStandalone.SessionsReceiveUpdatesViaDBus

** (dbus-test-runner:13025): WARNING **: Timing out at maximum wait of 30 seconds.

(dbus-test-runner:13025): libdbustest-CRITICAL **: dbus_test_service_run: assertion 'all_tasks(service, all_tasks_finished_helper)' failed
task-0: Shutting down
DBus daemon: Shutdown

This test suite does *not* fail if either dbus-cpp is rebuilt with g++-4.9, or if location-service is built with g++-4.8.

This implies a binary compatibility problem for C++ libraries in g++ 4.9, which is critical to resolve.

Related branches

Steve Langasek (vorlon)
Changed in gcc-4.9 (Ubuntu):
importance: Undecided → Critical
Matthias Klose (doko)
Changed in dbus-cpp (Ubuntu):
importance: Undecided → Critical
Changed in location-service (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-defaults - 1.128ubuntu5

---------------
gcc-defaults (1.128ubuntu5) utopic; urgency=medium

  * Revert the previous change and just change the dependencies for cpp,
    gcc and g++ to depend on the 4.8 packages.
 -- Matthias Klose <email address hidden> Thu, 12 Jun 2014 01:48:23 +0200

Changed in gcc-defaults (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbus-cpp (Ubuntu):
status: New → Confirmed
Changed in gcc-4.9 (Ubuntu):
status: New → Confirmed
Changed in location-service (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

The C++11 support in 4.9 (which is still marked as experimental) did see some incompatible changes with the unordered associative containers in <unordered_map> and <unordered_set. There are no other ABI changes in c++11 mode, maybe except for users of the <future> header. It is not advised to mix c++11 code built from different major compiler versions as long as the c++11 mode is still marked as experimental.

There are a few things to do here:

 - find out which packages are affected (currently working on that)

 - make sure that all packages are built using verbose builds, or else we cannot
   scan the build logs for packages built in c++11 mode.

 - if this is code ending up in libraries, the soname of the library should be bumped where
   the upstream can do that, or the package name of the library should be changed.

 - if the code is ending up in leaf packages, just rebuild the package

 - Don't use versioned build dependencies for g++-4.x at all (preferred), or use the
   same version for all packages within a project.

Packages in main affected are:
  dbus-cpp
  libcolumbus
  firefox
  mir
  process-cpp
  libreoffice (only the clang plugin which is not built)
  qtbase-opensource-src
  unity

The ubuntu-toolchain-r/test PPA know has a gcc-defaults again defaulting to 4.9. Please make sure that you have a build dependency on g++ (>= 4:4.9.0-3ubuntu6) when building with 4.9.

Changed in location-service (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1329089] Re: g++-4.9 binary incompatibilties with libraries built with g++-4.8

On Fri, Jun 13, 2014 at 02:26:28PM -0000, Matthias Klose wrote:

> - Don't use versioned build dependencies for g++-4.x at all (preferred), or use the
> same version for all packages within a project.

If the ABI will change with each new upstream version of g++, and the
library soname / package name should be changed at the same time, then these
packages *should* have build-dependencies on a specific version of g++, to
avoid accidental ABI incompatibilities.

> Packages in main affected are:
> dbus-cpp
> libcolumbus
> firefox
> mir
> process-cpp
> libreoffice (only the clang plugin which is not built)
> qtbase-opensource-src
> unity

Thanks for researching this!

Not all of the packages in the phone are in main. Can you do the same
review for the set of packages that are in the ubuntu-touch seed?

Revision history for this message
Thomas Voß (thomas-voss) wrote : Re: g++-4.9 binary incompatibilties with libraries built with g++-4.8

unorderd_map is not exposed in the API/ABI of the library

Changed in dbus-cpp (Ubuntu):
assignee: nobody → Thomas Voß (thomas-voss)
Changed in process-cpp (Ubuntu):
status: New → Invalid
Changed in dbus-cpp (Ubuntu):
status: Confirmed → In Progress
Changed in debian:
status: Unknown → New
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Matthias Klose (doko) wrote : Re: [Bug 1329089] Re: g++-4.9 binary incompatibilties with libraries built with g++-4.8

Am 17.06.2014 16:16, schrieb Iain Lane:
> Is this https://launchpadlibrarian.net/177775573/buildlog_ubuntu-utopic-
> armhf.evolution_3.12.2-1ubuntu1_FAILEDTOBUILD.txt.gz the same problem?

No, this is another issue (but also seen with other packages).

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: g++-4.9 binary incompatibilties with libraries built with g++-4.8

Not sure if mir-anything needs changing... ?

Changed in mir:
status: New → Incomplete
Changed in mir (Ubuntu):
status: New → Incomplete
Changed in mir:
assignee: nobody → Thomas Voß (thomas-voss)
status: Incomplete → In Progress
Changed in mir (Ubuntu):
status: Incomplete → New
Changed in mir:
milestone: none → 0.4.0
Changed in mir:
milestone: 0.4.0 → 0.5.0
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir/devel at revision None, scheduled for release in mir, milestone Unknown

Changed in mir:
status: In Progress → Fix Committed
Steve Langasek (vorlon)
summary: - g++-4.9 binary incompatibilties with libraries built with g++-4.8
+ g++-4.9 binary incompatibilities with libraries built with g++-4.8
Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in mir:
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Why don't we just keep utopic on g++-4.8 until 4.9 is no longer experimental?

If we rebuild everything for 4.9 while it's still "experimental" it may well change again, requiring more rebuilds.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1329089] Re: g++-4.9 binary incompatibilities with libraries built with g++-4.8

On Mon, Jul 14, 2014 at 08:22:04AM -0000, Daniel van Vugt wrote:
> Why don't we just keep utopic on g++-4.8 until 4.9 is no longer
> experimental?

4.9 is not experimental. *C++11 support in gcc upstream* is experimental.

There is a single rebuild required here for the move from 4.8 to 4.9, no
further rebuilds will be required for ABI changes within gcc 4.9.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Won't fix in 0.4. Instead we're pushing Mir 0.5 to archive, which contains the fix already.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.5.0+14.10.20140717-0ubuntu1

---------------
mir (0.5.0+14.10.20140717-0ubuntu1) utopic; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.5.0 (https://launchpad.net/mir/+milestone/0.5.0)
    - mirclient ABI unchanged at 8. Clients do not need rebuilding.
    - mirserver ABI bumped to 23. Servers need rebuilding, but probably don't
      need modification:
      . DefaultServerConfiguration/Cursor API: Cursor interfaces changed, most
        notably CursorImages moved from ::mir::graphics to ::mir::input.
      . DefaultServerConfiguration: New "prompt" API.
      . DefaultServerConfiguration: "clock" member is now static.
      . SessionAuthorizer: New functions.
      . ServerConfiguration: New function added: the_prompt_connector().
    - Enhancements:
      . Add AddressSanitizer cmake build type.
      . frontend, client API, tests: add support for prompt session
        permissions and for client detecting errors.
      . server: Ensure our emergency cleanup handling infrastructure is
        signal-safe.
      . Implement and enable an xcursor based image loader for cursors.
      . Fix warnings raised by the new g++-4.9.
      . shared, scene: Introduce a generic listener collection.
      . MirMotionEvent: Define a struct typedef to allow for
        pointer_coordinates to be used individually.
    - Bugs fixed:
      . Nexus 10 leaks during overlay operations (LP: #1331769)
      . MultiThreadedCompositor deadlocks (LP: #1335311)
      . Intermittent test failure in ClientSurfaceEvents can client query
        orientation (LP: #1335741)
      . Intermittent test failure in ClientSurfaceEvents/OrientationEvents
        (LP: #1335752)
      . Intermittent memory error in ClientSurfaceEvents on
        orientation query (LP: #1335819)
      . mir_unit_tests.EventDistributorTest.* SEGFAULT (LP: #1338902)
      . [regression] Device locks randomly on welcome screen (LP: #1339700)
      . Intermittent deadlock when switching to session with custom display
        config & closing other session (LP: #1340669)
      . Mir cursor has no hotspot setting, assumes (0, 0) (LP: #1189775)
      . clang built mir_unit_tests.ProtobufSocketCommunicatorFD crashes
        intermittently (LP: #1300653)
      . g++-4.9 binary incompatibilities with libraries built with g++-4.8
        (LP: #1329089)
      . [test regression] SurfaceLoop fails sporadically on deleting surfaces
        for a disconnecting client (LP: #1335747)
      . Intermittent test failure ServerShutdown when clients are blocked
        (LP: #1335873)
      . [regression] mir_demo_client_multiwin is displayed with obviously
        wrong colours (LP: #1339471)
      . Partially onscreen surfaces not occluded when covered by another
        surface (LP: #1340078)
      . SurfaceConfigurator::attribute_set always say "unfocused" for focus
        property changes (LP: #1336548)
 -- Ubuntu daily release <email address hidden> Thu, 17 Jul 2014 07:58:53 +0000

Changed in mir (Ubuntu):
status: Triaged → Fix Released
dobey (dobey)
Changed in unity-scope-click (Ubuntu):
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

unity-scopes-api (0.5.2+14.10.20140722-0ubuntu1) utopic; urgency=low

  [ thomas-voss ]
  * Force building with g++ 4.9

  [ Michi Henning ]
  * Force building with g++ 4.9

 -- Ubuntu daily release <email address hidden> Tue, 22 Jul 2014 09:52:30 +0000

Changed in unity-scopes-api (Ubuntu):
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

dbus-cpp (4.0.0+14.10.20140718-0ubuntu1) utopic; urgency=medium

  [ Thomas Voß ]
  * Bump major revision and so name to account for toolchain update.

 -- Ubuntu daily release <email address hidden> Fri, 18 Jul 2014 12:24:18 +0000

Changed in dbus-cpp (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

.

Changed in mir:
milestone: 0.5.0 → none
status: Fix Committed → Fix Released
milestone: none → 0.5.0
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Working around launchpad bugs. Got there eventually :)

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

afaics the transition is now done

Changed in gcc-4.9 (Ubuntu):
status: Confirmed → Fix Released
Changed in qtbase-opensource-src (Ubuntu):
status: New → Fix Released
Andrea Azzarone (azzar1)
no longer affects: unity
Changed in unity (Ubuntu):
status: New → Invalid
Changed in debian:
status: New → Fix Released
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.