relocation R_X86_64_32 can not be used (Was: Re: (no subject))

Marc G. Fournier scrappy at hub.org
Tue Apr 11 18:07:12 UTC 2006


On Mon, 10 Apr 2006, Steve Kargl wrote:

> On Tue, Apr 11, 2006 at 01:09:07AM -0300, Marc G. Fournier wrote:
>> On Mon, 10 Apr 2006, Steve Kargl wrote:
>>
>>> On Tue, Apr 11, 2006 at 12:30:02AM -0300, Marc G. Fournier wrote:
>>>>> cc -shared -o common.o stream.o registry.o config.o memory.o
>>>>> /usr/bin/ld: stream.o: relocation R_X86_64_32 can not be used when making
>>>>> a shared object; recompile with -fPIC
>>>>> stream.o: could not read symbols: Bad value
>>>
>>> You're mixing static and share libs.  Add -static to your
>>> CFLAGS.
>>
>> Same result:
>>
>> ===>  Building for resin-2.1.17_1
>> (cd src/c/plugin; make)
>> for dir in common apache2; do (cd $dir; make); done
>> cc -c -I/usr/include -static  -DNO_IDEA stream.c
>> stream.c: In function `select_host':
>> stream.c:1103: warning: cast from pointer to integer of different size
>> cc -c -I/usr/include -static  -DNO_IDEA registry.c
>> cc -c -I/usr/include -static  -DNO_IDEA config.c
>> cc -c -I/usr/include -static  -DNO_IDEA memory.c
>> cc -shared -o common.o stream.o registry.o config.o memory.o
>     ^^^^^^^
>
> This isn't -static.

You said to add it to CFLAGS ... which variable defines -shared vs 
-static?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy at hub.org           Yahoo!: yscrappy              ICQ: 7615664


More information about the freebsd-amd64 mailing list