Hi Daniel,
I still get the same error
1) downloaded latest libtool and configured it as below
./configure --host=i386-unknown-linux-gnu --build=x86_64-unknown-linux-gnu
2) did make on my binaried and i pop up with same old error
libtool: link: g++ -shared -nostdlib -Wl,-rpath -Wl,/usr/local/lib
-L/usr/local/lib -L/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../.. -L/lib/../lib64
-L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s ... -m32 -Wl,-soname -Wl,
...........
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/libpam.so when
searching for -lpam
I changed the sys_lib_search_path_spec and compiler_lib_search_path to
appropriate paths and the build goes fine.
eg: sys_lib_search_path_spec=" /usr/lib/gcc/x86_64-redhat-linux/3.4.6/32
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../x86_64-redhat-linux/lib/x86_64-redhat-linux/3.4.6/
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../x86_64-redhat-linux/lib/
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../x86_64-redhat-linux/3.4.6/
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../
/lib/x86_64-redhat-linux/3.4.6/ /lib/ /usr/lib/x86_64-redhat-linux/3.4.6/
/usr/lib/"
libtool: link: g++ -shared -nostdlib -Wl,--rpath -Wl,/usr/local/lib
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../.. -L/lib/../lib
-L/usr/lib/../lib -lstdc++ -lm -lc -lgcc_s_32 -m32 -Wl,-soname -Wl, .....
I am not at all sure if what I am doing is correct. Can you plz correct me.
-dev
________________________________
From: Daniel Herring <[email protected]>
To: devendra ayalasomayajula <[email protected]>
Cc: [email protected]
Sent: Tuesday, July 7, 2009 12:01:33 AM
Subject: Re: libtool picking up 64 bit libs when making a 32 bit build on 64
bit machine
On Mon, 6 Jul 2009, devendra ayalasomayajula wrote:
> I am trying to make a 32 bit build on a 64 bit machine. I see a problem with
> the search path that libtool(1.5.6) uses for
> compilation as well as linking. It picks up the 64 bit libs instead of 32 bit
> libs.
Step 0 is to upgrade to libtool 2.2.6a. This will make your life better and
simplify life for the libtool maintainers.
- Daniel
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool