Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  2 Apr 2009 04:16:24 +0400 (MSD)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        krion@FreeBSD.org
Subject:   ports/133290: [PATCH] devel/pcre: doesn't use -fPIC for static libraries on amd64
Message-ID:  <20090402001624.BCD3110883C@hades.panopticon>
Resent-Message-ID: <200904020020.n320K3de095572@freefall.freebsd.org>

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

>Number:         133290
>Category:       ports
>Synopsis:       [PATCH] devel/pcre: doesn't use -fPIC for static libraries on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 02 00:20:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Mar 21 18:50:30 MSK 2009
>Description:
Each pcre source is built twice, so one object file goes into shared library, and another into static one.
However, the object files the go into static libs are built without -fPIC, which make it impossible to link other code with static pcre library on amd64 (and other 64 bit archs is suppose). The example is lang/qscheme which is broken on amd64 because of that.

--- from pcre build log:
===>  Building for pcre-7.8
make  all-am
/bin/sh ./libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I.      -O2 -fno-strict-aliasing -pipe -march=nocona -MT pcre_compile.lo -MD -MP -MF .deps/pcre_compile.Tpo -c -o pcre_compile.lo pcre_compile.c
mkdir .libs
 cc -DHAVE_CONFIG_H -I. -O2 -fno-strict-aliasing -pipe -march=nocona -MT pcre_compile.lo -MD -MP -MF .deps/pcre_compile.Tpo -c pcre_compile.c  -fPIC -DPIC -o .libs/pcre_compile.o
 cc -DHAVE_CONFIG_H -I. -O2 -fno-strict-aliasing -pipe -march=nocona -MT pcre_compile.lo -MD -MP -MF .deps/pcre_compile.Tpo -c pcre_compile.c -o pcre_compile.o >/dev/null 2>&1
mv -f .deps/pcre_compile.Tpo .deps/pcre_compile.Plo
---

--- from qscheme error log:
cc -DHAVE_CONFIG_H -I. -I. -I.     -O2 -fno-strict-aliasing -pipe -march=nocona  -I/usr/local/include -I/usr/local/include -o regex.so -shared -fPIC -I/usr/local/include ./regex.c /usr/local/lib/libpcre.a
/usr/bin/ld: /usr/local/lib/libpcre.a(pcre_compile.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpcre.a: could not read symbols: Bad value
gmake[2]: *** [regex.so] Error 1
gmake[2]: Leaving directory `/usr/work/usr/home/amdmi3/qscheme/work/qscheme-0.5.1'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/work/usr/home/amdmi3/qscheme/work/qscheme-0.5.1'
gmake: *** [all-recursive-am] Error 2
*** Error code 1

Stop in /usr/home/amdmi3/qscheme.
---

Port maintainer (krion@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090402001624.BCD3110883C>