This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help with using multilib for Cilk Library
- From: Ian Lance Taylor <iant at google dot com>
- To: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 19 Jul 2013 15:26:26 -0700
- Subject: Re: Help with using multilib for Cilk Library
- References: <BF230D13CA30DD48930C31D4099330003A452E29 at FMSMSX101 dot amr dot corp dot intel dot com>
On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V
<balaji.v.iyer@intel.com> wrote:
> Hello Everyone,
> I am trying to use Multilib on Cilk Library. I looked at this website (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and libgo as samples to model after. It is currently failing with the following error message:
>
> libtool: link: /export/users/my-files/b-gcc-multilib/./gcc/xg++ -B/export/users/my-files/b-gcc-multilib/./gcc/ -nostdinc++ -nostdinc++ -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/users/my-files/gcc/libstdc++-v3/libsupc++ -I/export/users/my-files/gcc/libstdc++-v3/include/backward -I/export/users/my-files/gcc/libstdc++-v3/testsuite/util -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/bin/ -B/export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/lib/ -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/include -isystem /export/users/my-files/install-gcc-multilib/x86_64-unknown-linux-gnu/sys-include -m32 -shared -nostdlib /usr/lib/../lib/crti.o /export/users/my-files/b-gcc-multilib/./gcc/32/crtbeginS.o .libs/bug.o .libs/cilk-abi.o .libs/cilk-abi-cilk-for.o .libs/cilk-abi-vla.o .libs/cilk-abi-vla-internal.o .libs/cilk_api.o .libs/cilk_fiber.o .libs/cilk_fiber-unix.o .libs/cilk_malloc.o .libs/c_reducers.o .libs/except-gcc.o .libs/frame_malloc.o .libs/full_frame.o .libs/global_state.o .libs/jmpbuf.o .libs/local_state.o .libs/metacall_impl.o .libs/os_mutex-unix.o .libs/os-unix.o .libs/pedigrees.o .libs/record-replay.o .libs/reducer_impl.o .libs/scheduler.o .libs/signal_node.o .libs/spin_mutex.o .libs/stats.o .libs/symbol_test.o .libs/sysdep-unix.o .libs/worker_mutex.o -Wl,-rpath -Wl,/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -Wl,-rpath -Wl,/export/users/my-files/install-gcc-multilib/lib/../lib64 -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src -lpthread -ldl -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/export/users/my-files/b-gcc-multilib/./gcc/32 -L/lib/../lib -L/usr/lib/../lib -L/export/users/my-files/b-gcc-multilib/./gcc /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so -lm -lc -lgcc_s /export/users/my-files/b-gcc-multilib/./gcc/32/crtendS.o /usr/lib/../lib/crtn.o -m32 -m32 -Wl,-soname -Wl,libcilkrts.so.5 -o .libs/libcilkrts.so.5.0.3511
> /export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so: could not read symbols: File in wrong format
> collect2: error: ld returned 1 exit status
> make[4]: *** [libcilkrts.la] Error 1
> make[4]: Leaving directory `/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libcilkrts'
> make[3]: *** [multi-do] Error 1
> make[3]: Leaving directory `/export/users/my-files/b-gcc
>
>
> From what it looks like, it is reading the 64 bit library for the 32 bit mode (or vice-versa). How do I fix this? I am also attaching my configure.ac and Makefile.am. Please note that it is not fully cleaned up (e.g. I have stuff commented out etc). Can someone please tell me what I am doing wrong?
When building the 32bit libcillkrts you are linking against the 64-bit
libstdc++. It's right there on your command line:
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.
If that argument is needed at all, it needs to be
/export/users/my-files/b-gcc-multilib/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs/libstdc++.so
(note added /32 in there). I guess the question is where the argument
is coming from. I must admit that I don't know. Is it in some
environment variable?
Ian