Mir

ftbfs in linking libmir-test-assist.a in xenial+overlay and yakkety+overlay

Bug #1601810 reported by Kevin DuBois
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Kevin DuBois
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::MonomorphicImpl<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::MonomorphicImpl<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::MonomorphicImpl<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::MonomorphicImpl<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::DescribeTo(std::ostream*) const':
/usr/include/gmock/gmock-matchers.h:242: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::DescribeTo(std::ostream*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::PolymorphicMatcher<testing::internal::StrEqualityMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::MonomorphicImpl<char const*>::MatchAndExplain(char const*, testing::MatchResultListener*) const'
../libmir-test-assist.a(mock_egl.cpp.o): In function `testing::internal::MatcherBase<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const':
/usr/include/gmock/gmock-matchers.h:232: undefined reference to `testing::internal::AnyMatcherImpl<std::tuple<char const*> const&>::MatchAndExplain(std::tuple<char const*> const&, testing::MatchResultListener*) const'
collect2: error: ld returned 1 exit status

full log:
https://launchpadlibrarian.net/272328456/buildlog_ubuntu-xenial-amd64.mir_0.24.0+16.04.20160711-0ubuntu1_BUILDING.txt.gz

Related branches

Revision history for this message
Kevin DuBois (kdub) wrote :

can produce in x+o sbuild, but cannot reproduce in x+o without sbuild.

Revision history for this message
Kevin DuBois (kdub) wrote :

This doesn't occur with the gold linker

Changed in mir:
milestone: 0.24.0 → 0.25.0
summary: - ftbfs in linking libmir-test-assist.a in xenial and overlay
+ ftbfs in linking libmir-test-assist.a in xenial+overlay and
+ yakkety+overlay
Revision history for this message
Kevin DuBois (kdub) wrote :

linked to branch that fixes things by linking to the internally-created static library, instead of libmir-test-assist.a. That doesn't quite seem like a root-issue-fix at the moment, so still trying to figure out the real issue.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

As we want to test libmir-test-assist.a for downstream use linking to the static library instead is not an acceptable solution.

Revision history for this message
Kevin DuBois (kdub) wrote :

The problem would only occur when using dpkg-buildpackage. (slightly different link order was generated).

The symbols that were missing were templates from gmock that were generated and in the mock_egl.cpp.o file. Given the right link order (namely, mirserver.so before libmir-test-assist.a), things would resolve correctly. If mirserver.so came after libmir-test-assist.a, then the egl functions would get resolved, but for whatever reason, the weak symbols generated as part of the gmock stuff wouldn't get pulled in again before getting to the end of the linkage list.

The proper solution seems to be to use -Wl,--whole-archive to make sure that the symbols generated from the gmock templates are still available despite linkage order

Changed in mir:
assignee: nobody → Kevin DuBois (kdub)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

That explanation sounds incomplete. libmirserver.so really shouldn't be mentioning gmock templates.

And "target_link_libraries(mir_acceptance_tests" also mentions libmir-test-assist.a before libmirserver.so.

But if the solution works...

Changed in mir:
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Updated the bug description. Now I see mock_egl.cpp in there I suspect this might be fixed by bug 1603303.

description: updated
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.25.0

Changed in mir:
status: In Progress → Fix Committed
Kevin DuBois (kdub)
no longer affects: mir/0.24
Changed in mir:
milestone: 0.25.0 → 0.24.0
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.7 KiB)

This bug was fixed in the package mir - 0.24.0+16.10.20160815.3-0ubuntu1

---------------
mir (0.24.0+16.10.20160815.3-0ubuntu1) yakkety; urgency=medium

  * New upstream release 0.24.0 (https://launchpad.net/mir/+milestone/0.24.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 41
      . mircommon ABI unchanged at 6
      . mirplatform ABI bumped to 12
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI bumped to 10
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI unchanged at 5
    - Enhancements:
      . Added a new tool 'mirvanity' which can use a high speed video camera
        to measure client-to-screen latency.
      . Added (build-time) support for desktop full OpenGL servers (disabled
        by default in favor of GLESv2).
      . Introduced new buffer semantics (NBS) and enabled it by default.
      . Avoided using libmirserver in mir_demo_standalone_render_overlays,
        making bringup traces less cluttered.
      . Removed TilingWindowManager from example servers.
      . Added two new mir_*_performance_test tools that are run as part of
        'mir_performance_tests'.
      . Added pointer confinement to the client API.
      . Added new platform supporting software EGLStreams.
      . Added an input platform that the nested server can use.
      . Allow configuration of the application_not_responding_detector
      . Handle server-side keymapping using XKBMapper.
      . Remove the offscreen display.
      . Add callback option to notify shells that the server is about to stop.
      . Add logging for ANativeWindow events on Android.
    - Bugs fixed:
      . usage of std:call_once in mirclient causes TLS collisions with some
        android devices (LP: #1599867)
      . AltGr not working on external keyboards (LP: #1565236)
      . [regression] unity8 fails to start when built with 0.24 series (lp:mir)
        (LP: #1597717)
      . CI failure in MirSurfaceVisibilityEvent.exposed_received_when_surface_
        raised_over_occluding_surface [called twice - over-saturated and active]
        (LP: #1556045)
      . package-built mir_demo_server does not start on device (LP: #1577357)
      . During surface creation, first stream in spec becomes default stream.
        (LP: #1577967)
      . mouse is getting stuck on a phantom edge (LP: #1580774)
      . [testsfail] in MirSurfaceVisibilityEvent.exposed_received_when_surface_
        raised_over_occluding_surface [never called] (LP: #1581385)
      . [enhancement] Add support for full OpenGL compositing (LP: #1420581)
      . [testsfail] ServerSignal.terminate_handler_is_called_for_SIGINT|SIGTERM
        (LP: #1570353)
      . [testsfail] ClientLatency.triple_buffered_client_has_less_than_two_
        frames_latency (LP: #1576690)
      . [testsfail] NestedServer.when_monitor_plugged_in_client_is_notified_of_
        new_display_configuration (LP: #1576760)
      . mir server crashed in what(): drmModeMoveCursor failed (returned -13)
        (LP: #1579630)
      . mirtest-dev is hard to use as the objects used are compiled with LTO
        (LP: #1583536)
      . [testsfail] ClientLogging.repo...

Read more...

Changed in mir (Ubuntu):
status: New → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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