Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2004 18:39:01 +0100
From:      Pete French <pete@twisted.org.uk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   amd64/71674: static libraries cannot be linked when building shared libraries
Message-ID:  <E1C6YJZ-0000H0-59@frenic.drayhouse>
Resent-Message-ID: <200409121740.i8CHeT7A009224@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71674
>Category:       amd64
>Synopsis:       static libraries cannot be linked when building shared libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 12 17:40:28 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Pete French
>Release:        FreeBSD 5.3-BETA4 amd64
>Organization:
>Environment:
System: FreeBSD frenic.drayhouse 5.3-BETA4 FreeBSD 5.3-BETA4 #0: Sun Sep 12 18:04:01 BST 2004 pete@frenic.drayhouse:/usr/obj/usr/src/sys/FRENIC amd64


>Description:
	The supplied /usr/lib/libobjc.a has been compiled in such a
	way that trying to link when making a shared library gives
	the following error:

	/usr/bin/ld: /usr/lib/libobjc.a(Protocol.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/lib/libobjc.a: could not read symbols: Bad value

	This did not happen on pre BETA versions. I am unsure as to whether
	the linker has changed or what. This may apply to all the static
	libraries in /usr/lib though! I have tried with libz.a and libufs.a
	with the same error.


>How-To-Repeat:
	In this instance I was trying to build the GNUstep base libraries.
	But trying to make a very simple shared library, linking against
	static libraries in /usr/lib, will show it up.

>Fix:
	Preseumably fix buildworld so that static libraries are compiled
	with -fPIC ? This also applies to static libraries built from
	ports.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1C6YJZ-0000H0-59>