From thierry@pompo.net  Sat Jun 19 12:14:00 2004
Return-Path: <thierry@pompo.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3108316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 2004 12:14:00 +0000 (GMT)
Received: from graf.pompo.net (graf.pompo.net [81.56.186.139])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C865C43D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 2004 12:13:59 +0000 (GMT)
	(envelope-from thierry@pompo.net)
Received: by graf.pompo.net (Postfix, from userid 1001)
	id 3DBF4768D; Sat, 19 Jun 2004 14:11:31 +0200 (CEST)
Message-Id: <20040619121131.3DBF4768D@graf.pompo.net>
Date: Sat, 19 Jun 2004 14:11:31 +0200 (CEST)
From: Thierry Thomas <thierry@pompo.net>
Reply-To: Thierry Thomas <thierry@pompo.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: x11-toolkits/plib: unbreak TORCS on amd64.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68109
>Category:       ports
>Synopsis:       x11-toolkits/plib: unbreak TORCS on amd64.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 19 12:20:23 GMT 2004
>Closed-Date:    Tue Jun 22 09:09:48 GMT 2004
>Last-Modified:  Tue Jun 22 09:09:48 GMT 2004
>Originator:     Thierry Thomas
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 4.10-STABLE FreeBSD 4.10-STABLE #0: Sun Jun 6 19:02:53 CEST 2004 thierry@graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF020727 i386


	
>Description:
	games/torcs is marked broken on amd64 because it fails with the
	following error:

	c++ -shared -o simuv2.so simu.o simuitf.o car.o aero.o engine.o axle.o steer.o susp.o brake.o wheel.o transmission.o differential.o collide.o categories.o -L/tmp/a/ports/games/torcs/work/torcs-1.2.2/export/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib   -lplibsg -lplibul -L/tmp/a/ports/games/torcs/work/torcs-1.2.2/export/lib -lsolid
	/usr/bin/ld: /usr/X11R6/lib/libplibsg.a(sg.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
	/usr/X11R6/lib/libplibsg.a: could not read symbols: Bad value
	gmake[4]: *** [simuv2.so] Error 1

	Even if the plib libraries are built statically, TORCS use them to build
	dynamic libraries, and it must be compiled with -fPIC.

>How-To-Repeat:
	See logs on bento / pointyhat:
	<http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.5.2004061001/torcs-1.2.2_1.log>

>Fix:
	Please apply the following patch (or anything similar):

--- plib.diff begins here ---
diff -urN x11-toolkits/plib.orig/Makefile x11-toolkits/plib/Makefile
--- x11-toolkits/plib.orig/Makefile	Tue Jun  1 19:26:23 2004
+++ x11-toolkits/plib/Makefile	Tue Jun  1 21:31:16 2004
@@ -18,7 +18,7 @@
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CC="${CC}" CFLAGS="${CFLAGS}" \
-		CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
+		CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -fPIC" \
 		CPPFLAGS="${PTHREAD_CFLAGS}" \
 		LDFLAGS="${PTHREAD_LIBS}"
 CONFIGURE_ARGS=	--with-GL=${X11BASE} --with-x
--- plib.diff ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->des 
Responsible-Changed-By: thierry 
Responsible-Changed-When: Sat Jun 19 12:24:24 GMT 2004 
Responsible-Changed-Why:  

Over to the maintainer. 

Please back Responsible: to me. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=68109 
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Tue Jun 22 09:09:47 GMT 2004 
State-Changed-Why:  
Fixed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68109 
>Unformatted:
