Mir

`__stack_chk_fail' error in 926 and later revisions (i386)

Bug #1208774 reported by Eleni Maria Stea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Alan Griffiths
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When I build mir trunk (revisions 926 and later revisions) I get the following error:

/usr/lib/i386-linux-gnu/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local':
(.text+0x10): undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libmirplatform.so] Error 1
make[1]: *** [src/platform/graphics/CMakeFiles/mirplatform.dir/all] Error 2

$ uname -a
Linux qubby 3.10.0-5-generic #15-Ubuntu SMP Wed Jul 24 19:44:23 UTC 2013 i686 i686 i686 GNU/Linux

The error seems to occur only in i386 systems

Related branches

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Confirmed in a i686 chroot.

Changed in mir:
status: New → Confirmed
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Explicitly linking libmirplatform.so against libc (-lc) solves the problem, but it's not clear why this is needed (i.e. why libc is not used by default).

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

Looks like we've mixed up shared and non-shared copies of libc. We should ensure all libraries (including static ones) are linking to the dynamic libc.

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

FWIW another workaround is:

=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-08-06 07:58:01 +0000
+++ CMakeLists.txt 2013-08-06 14:44:35 +0000
@@ -44,7 +44,6 @@

 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Werror -Wall -pedantic -Wextra -fPIC")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++0x -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

 if ("${CMAKE_CXX_COMPILER}" MATCHES "clang")
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage")

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

And a further workaround is to use clang++ instead of g++

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in mir:
importance: Undecided → High
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

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

Changed in mir:
status: Confirmed → Fix Committed
Changed in mir:
milestone: none → 0.0.10
no longer affects: mir (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.0.9+13.10.20130812.1-0ubuntu1

---------------
mir (0.0.9+13.10.20130812.1-0ubuntu1) saucy; urgency=low

  [ Robert Ancell ]
  * Fix libmirserver dependent packages requiring the exact version - it
    hadn't been updated for the soname change in revision 948. (LP:
    #1210811)

  [ Alan Griffiths ]
  * platform: workaround link errors on i386/g++ 4.8.1. (LP: #1208774)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 960

mir (0.0.9-0ubuntu1) saucy; urgency=low

  * New release
 -- Ubuntu daily release <email address hidden> Mon, 12 Aug 2013 06:04:36 +0000

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.

Other bug subscribers

Remote bug watches

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