Source: tango
Version: 8.1.2c+dfsg-1
Severity: important
Tags: upstream patch
Justification: fails to build from source

tango fails to build from source on sparc64 with the following error:

| /bin/bash ../../libtool  --tag=CXX   --mode=link g++ -Wall 
-D_FORTIFY_SOURCE=2 -O1 -fpie -g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -std=c++11   
-D_REENTRANT -DOMNI_UNLOADABLE_STUBS -Wl,-z,now -pie  -Wl,-z,relro -o 
DataBaseds ClassFactory.o DataBaseClass.o DataBase.o DataBaseStateMachine.o 
main.o update_starter.o DataBaseUtils.o -L../../lib/cpp/server -ltango 
-L../../lib/cpp/log4tango/src -llog4tango  -lmysqlclient_r -L/usr/lib -lz  
-lzmq   -lpthread -lnsl -ldl -L/usr/lib -lomniORB4 -lomniDynamic4 -lCOS4  
-lpthread -lomnithread -lnsl -L/usr/lib  -lpthread -lomnithread -lpthread
| libtool: link: g++ -Wall -D_FORTIFY_SOURCE=2 -O1 -fpie -g -O2 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security 
-std=c++11 -D_REENTRANT -DOMNI_UNLOADABLE_STUBS -Wl,-z -Wl,now -pie -Wl,-z 
-Wl,relro -o .libs/DataBaseds ClassFactory.o DataBaseClass.o DataBase.o 
DataBaseStateMachine.o main.o update_starter.o DataBaseUtils.o  
-L../../lib/cpp/server 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so 
-L../../lib/cpp/log4tango/src 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/log4tango/src/.libs/liblog4tango.so 
-lmysqlclient_r -L/usr/lib -lz -lzmq -ldl -lomniORB4 -lomniDynamic4 -lCOS4 
-lnsl -lomnithread -lpthread
| DataBaseClass.o: In function `Tango::Logging::get_core_logger()':
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x10):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0xd0):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x190):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x250):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x310):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x3d0):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x490):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x550):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x610):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x6d0):
 relocation truncated to fit: R_SPARC_GOT13 against symbol 
`Tango::_core_logger' defined in .bss section in 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/lib/cpp/server/.libs/libtango.so
| 
/«BUILDDIR»/tango-8.1.2c+dfsg/build/cppserver/database/../../../lib/cpp/server/logging.h:98:(.text+0x790):
 additional relocation overflows omitted from the output
| collect2: error: ld returned 1 exit status
| make[4]: *** [DataBaseds] Error 1

This is due to the usage of -fpie instead of -fPIE, which create a too
big GOT table. The following patch fixes the issue:

--- tango-8.1.2c+dfsg.orig/cppserver/database/Makefile.am
+++ tango-8.1.2c+dfsg/cppserver/database/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = $(ORB_INCLUDE_PREFIX)  $(LIBZ
        $(MYSQLCLIENT_CFLAGS) \
        $(ZLIB_CPPFLAGS)
 
-AM_CXXFLAGS= -Wall -D_FORTIFY_SOURCE=2 -O1 -fpie
+AM_CXXFLAGS= -Wall -D_FORTIFY_SOURCE=2 -O1 -fPIE
 
 LDADD = -L$(top_builddir)/lib/cpp/server -ltango 
-L$(top_builddir)/lib/cpp/log4tango/src \
                -llog4tango $(MYSQLCLIENT_LDFLAGS) \
--- tango-8.1.2c+dfsg.orig/cppserver/database/Makefile.in
+++ tango-8.1.2c+dfsg/cppserver/database/Makefile.in
@@ -327,7 +327,7 @@ INCLUDES = $(ORB_INCLUDE_PREFIX)  $(LIBZ
        $(MYSQLCLIENT_CFLAGS) \
        $(ZLIB_CPPFLAGS)
 
-AM_CXXFLAGS = -Wall -D_FORTIFY_SOURCE=2 -O1 -fpie
+AM_CXXFLAGS = -Wall -D_FORTIFY_SOURCE=2 -O1 -fPIE
 LDADD = -L$(top_builddir)/lib/cpp/server -ltango 
-L$(top_builddir)/lib/cpp/log4tango/src \
                -llog4tango $(MYSQLCLIENT_LDFLAGS) \
          $(MYSQLCLIENT_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS)  $(LIBZMQ_LIBS)

Would it be possible to include it in the next upload? Thanks in advance

-- System Information:
Debian Release: jessie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: sparc64

Kernel: Linux 3.2.0-4-sparc64
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to