View previous topic :: View next topic |
Author |
Message |
braddeicide n00b
Joined: 17 Apr 2005 Posts: 11
|
Posted: Sat Apr 26, 2008 4:55 am Post subject: Makefile help |
|
|
Hi, I have this makefile
Code: |
all: libvmware-bdwrapper.la
distclean: clean
clean:
rm -fr *.la *.lo *.o .libs
vmware-bdwrapper.lo: vmware-bdwrapper.c
libtool --mode=compile gcc -O -c -std=c99 -pedantic vmware-bdwrapper.c
libvmware-bdwrapper.la: vmware-bdwrapper.lo
libtool --mode=link gcc -O -o libvmware-bdwrapper.la vmware-bdwrapper.lo -rpath `pwd` -ldl
install: all
install -o root -g root -m 4755 .libs/libvmware-bdwrapper.so.0.0.0 /usr/lib/
ldconfig
|
That was made on a 32bit system, it links against the default libraries which on my system are 64bit, how do i redirect it to compile against the 32bit libraries?
I tried this
Code: |
all: libvmware-bdwrapper.la
distclean: clean
clean:
rm -fr *.la *.lo *.o .libs
vmware-bdwrapper.lo: vmware-bdwrapper.c
libtool --mode=compile gcc -O -c -std=c99 -pedantic -m32 -L/usr/lib32 vmware-bdwrapper.c
libvmware-bdwrapper.la: vmware-bdwrapper.lo
libtool --mode=link gcc -O -o libvmware-bdwrapper.la vmware-bdwrapper.lo -rpath `pwd` -ldl -m32 -L/usr/lib32
install: all
install -o root -g root -m 4755 .libs/libvmware-bdwrapper.so.0.0.0 /usr/lib/
ldconfig
|
But i get some build errors.
The whole source is availible here http://homepage3.nifty.com/tjh/vmware-bdwrapper/
It's intended use is with vmware, which itself is a 32bit app. |
|
Back to top |
|
|
braddeicide n00b
Joined: 17 Apr 2005 Posts: 11
|
Posted: Sat Apr 26, 2008 5:32 am Post subject: |
|
|
I found out that i needed to add
-nostartfiles /usr/lib32/crt1.o /usr/lib32/crti.o /usr/lib32/crtn.o
Which most people says fixes the problem, however gentoo GCC is persistant on using a 64bit version of crti.o
x86_64-pc-linux-gnu-g++ -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/crtbeginS.o .libs/vmware-bdwrapper.o /usr/lib32/crt1.o /usr/lib32/crti.o /usr/lib32/crtn.o -ldl -L/usr/lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crtn.o -m32 -Wl,-soname -Wl,libvmware-bdwrapper.so.0 -o .libs/libvmware-bdwrapper.so.0.0.0
/usr/lib32/crti.o: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crti.o:(.init+0x0): first defined here
So the next question is,,, where is the "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crti.o" coming from? Are there some default GCC variables i need to overwrite? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|