Source: inventor
Version: 2.1.5-10-17
Severity: wishlist
Tags: patch

Hi Maintainer

When building inventor 2.1.5-10-17 on Ubuntu Saucy's builders, the build was successful on amd64 and armhf, but failed with the following error on i386 and powerpc.

/usr/bin/g++ -L/build/buildd/inventor-2.1.5-10/debian/tmp/usr/lib -shared -Wl,--whole-archive -Wl,-z,defs -L/usr/X11R6/lib Decal.o -lGL -lInventor -lInventorXt -Wl,--no-whole-archive -o Decal.so /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[4]: *** [Decal.so] Error 1

I found similar bug reports [1,2] and my understanding is that Decal.so is being linked against the static libc instead of the shared libc.

The attached patch explicitly links libc by appending -lc to Decal.c++'s LLDLIBS.

Regards
Graham


[1] http://bugs.debian.org/717331
[2] https://bugs.launchpad.net/mir/+bug/1208774

diff -Nru inventor-2.1.5-10/debian/patches/add-required-libs.patch inventor-2.1.5-10/debian/patches/add-required-libs.patch
--- inventor-2.1.5-10/debian/patches/add-required-libs.patch	2013-08-08 10:37:56.000000000 +0200
+++ inventor-2.1.5-10/debian/patches/add-required-libs.patch	2013-08-12 13:34:38.000000000 +0200
@@ -21,7 +21,7 @@
  CXXFILES = Decal.c++
  
 -LLDLIBS = -lInventor -lInventorXt
-+LLDLIBS = -lGL -lInventor -lInventorXt
++LLDLIBS = -lGL -lInventor -lInventorXt -lc
  
  all install: all_ivbin
  

Reply via email to