libtool
[Top][All Lists]
Advanced

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

Re: libtool support for intel icc compiler


From: Robert Boehne
Subject: Re: libtool support for intel icc compiler
Date: Tue, 08 Apr 2003 08:57:24 -0500

Himanshu:

Does this patch work?

Robert

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.314
diff -u -r1.314 libtool.m4
--- libtool.m4  5 Apr 2003 19:32:58 -0000       1.314
+++ libtool.m4  8 Apr 2003 13:54:50 -0000
@@ -4850,6 +4850,7 @@
     linux*)
       case $CC in
       icc|ecc)
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'


Himanshu_Khurana wrote:
> 
> Hi ,
> 
> First of all i would like to thank all the people who helped me fix this 
> problem of mine. With all the inputs from the mailing lists especially 
> ALLAN,ROBERT ,Roberto and  TIM with whose help I have been able to work 
> flawlessly with libtool configured for Intel compiler 7.0 (Both icc and icpc)
> 
> Allan in his last mail had rightly suggested that $cc_basename doesnt work. 
> So had to use $CXX and $CC instead. BUT EVEN AFTER THAT AN ERROR WAS COMING 
> when I said
> 
> make -k
> 
> _ERROR WAS 
> __________________________________________________________________________________
> ld: .libs/libltdl.so.1.0.0: undefined versioned symbol name 
> __register_frame_in
> fo@@GLIBC_2.0
> ld: failed to set dynamic section sizes: Bad value
> 
> I tried to run a similar command at command prompt using a sample program of 
> hello.c and main.c of my own and I encountered similar errors as
> ______________________________________________________________________________________
> icc -shared  .libs/hello.o  -lc  -Wl,-soname -Wl,libhello.so.0 -o 
> .libs/libhello
> .so.0.0.0
> ld: .libs/libhello.so.0.0.0: undefined versioned symbol name 
> __register_frame_in
> fo@@GLIBC_2.0
> ld: failed to set dynamic section sizes: Bad value
> _______________________________________________________________________________________
> 
> I tried to remove the -lc flag and it worked fine. So i again went into the 
> libtool.m4 code and changed
> 
> # Assume -lc should be added
>   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
> 
> #############-----I CHANGED THE FLAG FROM yes TO 
> no-----###########################################
> 
> AND YUPPIE IT WORKED
> the make was flawless and i could flawlessly create shared libraries as well 
> as static using BOTH icc and icpc compilers using libtool.
> 
> FOR THE future users of libtool for icc I would summarise the steps I needed 
> to make it work.
> 
> STEPS TO CONFIGURE LIBTOOL FOR ICC
> 
> 1:      Download the CVS version of libtool from 
> <ftp://alpha.gnu.org/pub/gnu/cvs/libtool.tgz>
> 
> 2:      Untar the libtool.tgz file to :
> 
>         tar xvzf ./libtool.tgz -C /home/me/usr/local/
> 
> NOTE: the paths in this document are given for example. --NO DEPENDENCY ON 
> ANY SPECIFIC PATH
> 
> 3:      Install  autoconf 2.57( any version greater than 2.50 suffices) with 
> prefix=/home/me/usr
> 
> 4:      Install automake 1.7 with prefix /home/me/usr
>                 (MAKE SURE THAT AUTOCONF AND AUTOMAKE lie in the same bin 
> folder say /home/me/usr/bin)---CANt use autoconf of one directory (say 
> /home/me/usr/bin) and automake of another directory (say /usr/bin)
> 
> 5:      Set environment variables AS follows
> 
> PATH=/usr/local/bin:$PATH
> PATH=/home/me/usr/bin:/opt/intel/compiler70/ia32/bin:$PATH
> export CC=icc
> export CXX=icpc
> export LD=ld
>                 export 
> LD_LIBRARY_PATH=/opt/intel/compiler70/ia32/lib:$LD_LIBRARY_PATH
> 
> 6: cd /home/me/usr/local/Libtool
> 
> 7: INCORPORATING THE  PATCH
> Open the file Libtool.m4 for editing.
> vi libtool.m4
> ---------------------CHANGE No 1---------search for 
> "icpc"------------------------- 
> ---------------------------------------------------------------------------------
> .. ..
> linux*)
>   case $cc_basename in
>     KCC)
>       # KAI C++ Compiler
>       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
>       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
>       ;;
>     icpc)
>       # Intel C++
>       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
>       ;;$cc_basename to $CXX
> 
> ..
> >>>>>>>>>>>>>>>>>>>>>>change $cc_basename to $CXX<<<<<<<<<<<<<<<<<<
> 
> -----------------CHANGE No 2---------------------search for 
> "icc"------------------- 
> -------------------------------------------------------------------------------
> ..
> linux*)
>   case $cc_basename in
>   icc|ecc)
>     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
>     ;;
> 
> ..
> ..
> >>>>>>>>>>>>>>>>change $cc_basename to $CC<<<<<<<<<
> 
> ------------------CHANGE No 3------------------search for 
> "libc?"----------------- 
> -------------------------------------------------------------------------------
> ..
> ..
> # Do we need to explicitly link libc?
> #
> case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
> x|xyes)
>   # Assume -lc should be added
>   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
> ..
> ..
> 
> >>>>>>>>>>>>>>>>>>>>>CHANGE yes to no<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
> 8: ./bootstrap (remember to set paths so that shell finds the desired 
> autoconf and automake versions)
> 9: ./configure --prefix=/home/me/usr/
> 10: make -k
> 11: make install
> 
> LIBTOOL IS READY FOR USE




reply via email to

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