simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Missing -fPIC when compiling code for .so files?


From: Joerg Wunsch
Subject: [Simulavr-devel] Missing -fPIC when compiling code for .so files?
Date: Tue, 8 Jan 2008 14:14:41 +0100
User-agent: Mutt/1.4.1i

I'm trying to compile the CVS version of simulavrxx on a Linux AMD64
machine.  If I understand everything correctly, this is supposed to
eventually result in a shared object file.  I'm getting:

...
creating simulavr
/tools/x86_64/bin/swig -c++ -python -outdir python/ -o python/simulavr_wrap.cpp 
simulavr.i
g++ -I. -I/usr/include/python2.3 python/simulavr_wrap.cpp application.o 
at4433.o at8515.o atmega128.o avrdevice.o avrerror.o avrmalloc.o decoder.o 
decoder_trace.o flash.o gdbserver.o hardware.o helper.o hwacomp.o hwad.o 
hweeprom.o hwextirq.o hwmegaextirq.o hwmegatimer.o hwmegatimer0123irq.o 
hwport.o hwspi.o hwsreg.o hwstack.o hwtimer.o hwtimer01irq.o hwuart.o hwwado.o 
ioregs.o irqsystem.o keyboard.o lcd.o memory.o mysocket.o net.o pin.o 
pinatport.o printable.o rwmem.o scope.o serialrx.o serialtx.o systemclock.o 
trace.o ui.o /usr/lib64/libbfd.a /tools/x86_64/lib/libiberty.a -lc -lm 
-lncurses -shared -o python/_simulavr.so 
In file included from avrdevice.h:29,
                 from python/simulavr_wrap.cpp:1462:
net.h:64: warning: `class MirrorNet' only defines a private destructor and has 
   no friends
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld:
 /tmp/ccC0RESD.o: relocation R_X86_64_32S against `a local symbol' can not be 
used when making a shared object; recompile with -fPIC
/tmp/ccC0RESD.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [python/_simulavr.so] Error 1
make[3]: Leaving directory `/design/user/jwunsch/src/simulavrxx/src'
make[2]: *** [all-recursive] Error 1

Indeed, I cannot see a -fPIC anywhere anyhow during the compilation
before.  How is it supposed to work at all then?  Is it just working
accidentally on the i386 platform since omitting -fPIC is perhaps
benign there?

-- 
Joerg Wunsch * Development engineer, Atmel Dresden, Germany

Atmel Germany GmbH: Theresienstrasse 2, D-74072 Heilbronn
CEO Robert G. McConnell, Amtsgericht Stuttgart, Registration HRB 106652




reply via email to

[Prev in Thread] Current Thread [Next in Thread]