Package: gsoap
Version: 2.7.6d-1
Severity: normal
Tags: patch

When trying to link on an amd64 machine, building my shared library fails with 
the following error:

/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../lib64/libgsoapssl++.a(libgsoapssl___a-stdsoap2_ssl_cpp.o):
 relocation R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../lib64/libgsoapssl++.a: could 
not read symbols: Bad value
collect2: ld returned 1 exit status

Recompiling gsoap with the compiler flags '-fPIC -DPIC' solved the problem.

I also encountered another build problem: the c versions and c++ version are 
build with different compiler flags.
Setting CXXFLAGS equal to CFLAGS solved this problem too.

John

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages gsoap depends on:
ii  libc6                         2.3.6-1    GNU C Library: Shared libraries an
ii  libgcc1                       1:4.0.2-9  GCC support library
ii  libstdc++6                    4.0.2-9    The GNU Standard C++ Library v3

gsoap recommends no packages.

-- no debconf information
diff -Nurb gsoap-2.7.6d.dl/debian/rules gsoap-2.7.6d/debian/rules
--- gsoap-2.7.6d.dl/debian/rules	2006-02-20 14:25:16.954109784 +0100
+++ gsoap-2.7.6d/debian/rules	2006-02-20 14:22:13.335024128 +0100
@@ -12,7 +12,7 @@
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -fPIC -DPIC
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
@@ -26,7 +26,7 @@
 config.status: configure
 	dh_testdir
 	# Add here commands to configure the package.
-	./configure CFLAGS='$(CFLAGS)' --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+	./configure CFLAGS='$(CFLAGS)' CXXFLAGS='$(CFLAGS)' --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
 
 
 build: build-stamp

Reply via email to