Ralf Wildenhues | 1 Nov 2010 21:30
Picon
Picon

Re: Can't cross-compile with same libdir as the host one

Hi Loïc,

thanks for the bug report.

* Loïc Minier wrote on Sat, Oct 23, 2010 at 04:31:19PM CEST:
>  As part of a project to cross-build Debian packages, I've been looking
>  into an issue which affects libtool packages.  I can actually reproduce
>  the issue very easily with the libtool 2.2.6b release tarball (current
>  version in Debian/Ubuntu) and with the 2.4 tarball:
> 
> cd libtool/tests/depdemo
> ./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi --libdir=/usr/lib
> make install DESTDIR=`pwd`/destdir
[...]

>  /bin/bash ../libtool   --mode=install /usr/bin/install -c   libl2.la '/home/lool/scratch/libtool/upstream/libtool-2.2.6b/tests/depdemo/destdir/usr/lib'
> libtool: install: warning: relinking `libl2.la'
> libtool: install: (cd /home/lool/scratch/libtool/upstream/libtool-2.2.6b/tests/depdemo/l2;
/bin/bash /home/lool/scratch/libtool/upstream/libtool-2.2.6b/tests/depdemo/libtool  --tag CC
--mode=relink arm-linux-gnueabi-gcc -g -O2 -no-undefined -o libl2.la -rpath /usr/lib l2.lo
../l1/libl1.la -inst-prefix-dir /home/lool/scratch/libtool/upstream/libtool-2.2.6b/tests/depdemo/destdir)
> libtool: relink: arm-linux-gnueabi-gcc -shared  .libs/l2.o  
-L/home/lool/scratch/libtool/upstream/libtool-2.2.6b/tests/depdemo/destdir/usr/lib
-L/usr/lib -ll1    -Wl,-soname -Wl,libl2.so.0 -o .libs/libl2.so.0.0.0
> /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: skipping
incompatible /usr/lib/libc.so when searching for -lc
> /usr/lib/libc.a: could not read symbols: File format not recognized

>  Now, it would be possible to workaround this by configuring binutils to
>  support the host as a bfd target, and ld would just skip this x86-64
(Continue reading)

Loïc Minier | 2 Nov 2010 00:12
Favicon

Re: Can't cross-compile with same libdir as the host one

On Mon, Nov 01, 2010, Ralf Wildenhues wrote:
> >  It is entirely possible that this is a toolchain bug, but I think
> >  libtool has this design to use -rpath to specify the installation
> >  directory, which might be why the linker looks in this directory.
> 
> Can you work around it by using the Libtool 2.4 --with-sysroot feature?
> Please report back if that doesn't help.

 I didn't manage to get it working with this feature; I hope I'm using
 it properly

 Starting from tests/depdemo as the previous time, I tried:
./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi --libdir=/usr/lib --with-sysroot=/usr/arm-linux-gnueabi
make install DESTDIR=`pwd`/destdir

 and it fails as follows:
libtool: link: ( cd ".libs" && rm -f "libl2.la" && ln -s "../libl2.la" "libl2.la" )
make[2]: entrant dans le répertoire «
/home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/l2 »
test -z "/usr/lib" || /bin/mkdir -p "/home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir/usr/lib"
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libl2.la '/home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir/usr/lib'
libtool: install: warning: relinking `libl2.la'
libtool: install: (cd /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/l2;
/bin/bash /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/libtool  --tag CC
--mode=relink arm-linux-gnueabi-gcc -g -O2 -no-undefined -o libl2.la -rpath /usr/lib l2.lo
../l1/libl1.la -inst-prefix-dir /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir)
libtool: relink: arm-linux-gnueabi-gcc -shared  -fPIC -DPIC  .libs/l2.o  
-L/home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir/usr/lib -L/usr/lib
-ll1  -O2   -Wl,-soname -Wl,libl2.so.0 -o .libs/libl2.so.0.0.0
/usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: skipping
(Continue reading)

Ralf Wildenhues | 2 Nov 2010 20:04
Picon
Picon

Re: Can't cross-compile with same libdir as the host one

* Loïc Minier wrote on Tue, Nov 02, 2010 at 12:12:28AM CET:
> On Mon, Nov 01, 2010, Ralf Wildenhues wrote:
> > >  It is entirely possible that this is a toolchain bug, but I think
> > >  libtool has this design to use -rpath to specify the installation
> > >  directory, which might be why the linker looks in this directory.
> > 
> > Can you work around it by using the Libtool 2.4 --with-sysroot feature?
> > Please report back if that doesn't help.
> 
>  I didn't manage to get it working with this feature; I hope I'm using
>  it properly
> 
>  Starting from tests/depdemo as the previous time, I tried:
> ./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi --libdir=/usr/lib --with-sysroot=/usr/arm-linux-gnueabi
> make install DESTDIR=`pwd`/destdir

This looks right to me.

>  and it fails as follows:

> libtool: install: warning: relinking `libl2.la'
> libtool: install: (cd /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/l2;
/bin/bash /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/libtool  --tag CC
--mode=relink arm-linux-gnueabi-gcc -g -O2 -no-undefined -o libl2.la -rpath /usr/lib l2.lo
../l1/libl1.la -inst-prefix-dir /home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir)
> libtool: relink: arm-linux-gnueabi-gcc -shared  -fPIC -DPIC  .libs/l2.o  
-L/home/lool/scratch/libtool/latest/libtool-2.4/tests/depdemo/destdir/usr/lib -L/usr/lib
-ll1  -O2   -Wl,-soname -Wl,libl2.so.0 -o .libs/libl2.so.0.0.0
> /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: skipping
incompatible /usr/lib/libc.so when searching for -lc
(Continue reading)

Terry Dontje | 15 Nov 2010 13:00
Picon
Favicon

Oracle Solaris Studio 12.2 compiler incompatibility with libtool

Ralf,

I am actually seeing an incompatibility between libtool and Solaris 
Studio 12.2 "Fortran" compiler (not C).  It looks like 
lt_prog_compiler_wl is being set to -rpath and not '-Wl,-rpath or 
'-Qoption ld -path'.  Below is the libtool link line and I've attached 
the output of libtool --config to this email.

/bin/sh ../../../libtool  --tag=FC   --mode=link f95 
-I../../../ompi/include -I../../../../ompi/include -M. 
-I../../../../ompi/mpi/f90 -I../../../ompi/mpi/f90  -m64 -version-info 
0:0:0  -export-dynamic  -o libmpi_f90.la -rpath 
/workspace/tdd/ctnext/tr-linux/lib mpi.lo mpi_sizeof.lo 
mpi_comm_spawn_multiple_f90.lo mpi_testall_f90.lo mpi_testsome_f90.lo 
mpi_waitall_f90.lo mpi_waitsome_f90.lo mpi_wtick_f90.lo 
mpi_wtime_f90.lo   ../../../ompi/mpi/f77/libmpi_f77.la -lrt -lnsl  
-lutil -lm
libtool: link: f95 -G  .libs/mpi.o .libs/mpi_sizeof.o 
.libs/mpi_comm_spawn_multiple_f90.o .libs/mpi_testall_f90.o 
.libs/mpi_testsome_f90.o .libs/mpi_waitall_f90.o 
.libs/mpi_waitsome_f90.o .libs/mpi_wtick_f90.o .libs/mpi_wtime_f90.o   
-rpath /workspace/tdd/ctnext/ws-trunk/linux/ompi/mpi/f77/.libs -rpath 
/workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs -rpath 
/workspace/tdd/ctnext/tr-linux/lib 
-L/workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs 
../../../ompi/mpi/f77/.libs/libmpi_f77.so 
/workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs/libmpi.so -lcrypto -lssl 
-ldl -lrt -lnsl -lutil -lm  -m64   -mt -soname libmpi_f90.so.0 -o 
.libs/libmpi_f90.so.0.0.0
f90: Warning: Option -path passed to ld, if ld is invoked, ignored otherwise
(Continue reading)

Ralf Wildenhues | 15 Nov 2010 22:17
Picon
Picon

Re: Oracle Solaris Studio 12.2 compiler incompatibility with libtool

Hi Terry,

* Terry Dontje wrote on Mon, Nov 15, 2010 at 01:00:17PM CET:
> I am actually seeing an incompatibility between libtool and Solaris Studio
> 12.2 "Fortran" compiler (not C).  It looks like lt_prog_compiler_wl is being
> set to -rpath and not '-Wl,-rpath or '-Qoption ld -path'.  Below is the
> libtool link line and I've attached the output of libtool --config to this
> email.

Thanks for the bug erport.

> 
> /bin/sh ../../../libtool  --tag=FC   --mode=link f95 -I../../../ompi/include
> -I../../../../ompi/include -M. -I../../../../ompi/mpi/f90
> -I../../../ompi/mpi/f90  -m64 -version-info 0:0:0  -export-dynamic  -o
> libmpi_f90.la -rpath /workspace/tdd/ctnext/tr-linux/lib mpi.lo mpi_sizeof.lo
> mpi_comm_spawn_multiple_f90.lo mpi_testall_f90.lo mpi_testsome_f90.lo
> mpi_waitall_f90.lo mpi_waitsome_f90.lo mpi_wtick_f90.lo mpi_wtime_f90.lo
> ../../../ompi/mpi/f77/libmpi_f77.la -lrt -lnsl  -lutil -lm
> libtool: link: f95 -G  .libs/mpi.o .libs/mpi_sizeof.o
> .libs/mpi_comm_spawn_multiple_f90.o .libs/mpi_testall_f90.o
> .libs/mpi_testsome_f90.o .libs/mpi_waitall_f90.o .libs/mpi_waitsome_f90.o
> .libs/mpi_wtick_f90.o .libs/mpi_wtime_f90.o   -rpath
> /workspace/tdd/ctnext/ws-trunk/linux/ompi/mpi/f77/.libs -rpath
> /workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs -rpath
> /workspace/tdd/ctnext/tr-linux/lib
> -L/workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs
> ../../../ompi/mpi/f77/.libs/libmpi_f77.so
> /workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs/libmpi.so -lcrypto -lssl
> -ldl -lrt -lnsl -lutil -lm  -m64   -mt -soname libmpi_f90.so.0 -o
(Continue reading)

Terry Dontje | 16 Nov 2010 19:47
Picon
Favicon

Re: Oracle Solaris Studio 12.2 compiler incompatibility with libtool

On 11/15/2010 04:17 PM, Ralf Wildenhues wrote:
> Hi Terry,
>
> * Terry Dontje wrote on Mon, Nov 15, 2010 at 01:00:17PM CET:
>> I am actually seeing an incompatibility between libtool and Solaris Studio
>> 12.2 "Fortran" compiler (not C).  It looks like lt_prog_compiler_wl is being
>> set to -rpath and not '-Wl,-rpath or '-Qoption ld -path'.  Below is the
>> libtool link line and I've attached the output of libtool --config to this
>> email.
> Thanks for the bug erport.
>
>> /bin/sh ../../../libtool  --tag=FC   --mode=link f95 -I../../../ompi/include
>> -I../../../../ompi/include -M. -I../../../../ompi/mpi/f90
>> -I../../../ompi/mpi/f90  -m64 -version-info 0:0:0  -export-dynamic  -o
>> libmpi_f90.la -rpath /workspace/tdd/ctnext/tr-linux/lib mpi.lo mpi_sizeof.lo
>> mpi_comm_spawn_multiple_f90.lo mpi_testall_f90.lo mpi_testsome_f90.lo
>> mpi_waitall_f90.lo mpi_waitsome_f90.lo mpi_wtick_f90.lo mpi_wtime_f90.lo
>> ../../../ompi/mpi/f77/libmpi_f77.la -lrt -lnsl  -lutil -lm
>> libtool: link: f95 -G  .libs/mpi.o .libs/mpi_sizeof.o
>> .libs/mpi_comm_spawn_multiple_f90.o .libs/mpi_testall_f90.o
>> .libs/mpi_testsome_f90.o .libs/mpi_waitall_f90.o .libs/mpi_waitsome_f90.o
>> .libs/mpi_wtick_f90.o .libs/mpi_wtime_f90.o   -rpath
>> /workspace/tdd/ctnext/ws-trunk/linux/ompi/mpi/f77/.libs -rpath
>> /workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs -rpath
>> /workspace/tdd/ctnext/tr-linux/lib
>> -L/workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs
>> ../../../ompi/mpi/f77/.libs/libmpi_f77.so
>> /workspace/tdd/ctnext/ws-trunk/linux/ompi/.libs/libmpi.so -lcrypto -lssl
>> -ldl -lrt -lnsl -lutil -lm  -m64   -mt -soname libmpi_f90.so.0 -o
>> .libs/libmpi_f90.so.0.0.0
(Continue reading)

Ralf Wildenhues | 16 Nov 2010 19:56
Picon
Picon

Re: Oracle Solaris Studio 12.2 compiler incompatibility with libtool

* Terry Dontje wrote on Tue, Nov 16, 2010 at 07:47:36PM CET:
> On 11/15/2010 04:17 PM, Ralf Wildenhues wrote:
> >Ahh, so Solaris Studio changed their Fortran compiler characteristics.
> >libtool.m4 has:
> >
> >         case `$CC -V 2>&1 | sed 5q` in
> >         *Sun\ F* | *Sun*Fortran*)
> >           # Sun Fortran 8.3 passes all unrecognized flags to the linker
> >           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
> >           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
> >           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
> >           ;;
> >         *Sun\ C*)
> >           # Sun C 5.9
> >           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
> >           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
> >           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
> >           ;;
> >
> >which looks like old Fortran compilers didn't accept a -Wl, or '-Qoption
> >ld' argument to pass flags on to the linker.  Or maybe it still doesn't,
> >but -r is detected as a compiler argument now.  See also
> >http://lists.gnu.org/archive/html/libtool-patches/2006-05/msg00011.html
> >
> >Can you confirm whether -Wl, or '-Qoption ld' is accepted by Solaris
> >Studio 12.2 f90 for GNU/Linux now?
> Either one seem to work with Studio 12.2 and both show up in the
> -flags output.
> I checked an earlier Studio circa 2009 and only -Qoption works and
> only shows up in -flags output.
(Continue reading)

Terry Dontje | 16 Nov 2010 20:01
Picon
Favicon

Re: Oracle Solaris Studio 12.2 compiler incompatibility with libtool

On 11/16/2010 01:56 PM, Ralf Wildenhues wrote:
> * Terry Dontje wrote on Tue, Nov 16, 2010 at 07:47:36PM CET:
>> On 11/15/2010 04:17 PM, Ralf Wildenhues wrote:
>>> Ahh, so Solaris Studio changed their Fortran compiler characteristics.
>>> libtool.m4 has:
>>>
>>>          case `$CC -V 2>&1 | sed 5q` in
>>>          *Sun\ F* | *Sun*Fortran*)
>>>            # Sun Fortran 8.3 passes all unrecognized flags to the linker
>>>            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>>>            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
>>>            _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
>>>            ;;
>>>          *Sun\ C*)
>>>            # Sun C 5.9
>>>            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>>>            _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
>>>            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>>>            ;;
>>>
>>> which looks like old Fortran compilers didn't accept a -Wl, or '-Qoption
>>> ld' argument to pass flags on to the linker.  Or maybe it still doesn't,
>>> but -r is detected as a compiler argument now.  See also
>>> http://lists.gnu.org/archive/html/libtool-patches/2006-05/msg00011.html
>>>
>>> Can you confirm whether -Wl, or '-Qoption ld' is accepted by Solaris
>>> Studio 12.2 f90 for GNU/Linux now?
>> Either one seem to work with Studio 12.2 and both show up in the
>> -flags output.
>> I checked an earlier Studio circa 2009 and only -Qoption works and
(Continue reading)

Terry Dontje | 17 Nov 2010 13:00
Picon
Favicon

Re: Oracle Solaris Studio 12.2 compiler incompatibility with libtool

On 11/16/2010 02:01 PM, Terry Dontje wrote:
> On 11/16/2010 01:56 PM, Ralf Wildenhues wrote:
>> Thanks.  Now the only remaining question is whether we still need to
>> support that thing called 'Sun Ceres Fortran' here:
>> http://www.open-mpi.org/community/lists/devel/2008/11/4932.php
>> and if yes, whether that also supported '-Qoption ld' already, despite
>> a hint to the contrary in that reference.
>>
>> Any chance one of you might know/remember this?
> Like a bad recurring nightmare :-).
>
> Note the f90 2009 compiler is the 8.4 where Ceres was 8.3.  So from 
> 8.4 on -Qoption is supported.  I think we probably would want to still 
> support Ceres but let me ask around.
>
I've discussed this internally and yes we would like Ceres to be supported.

Sorry,

--

-- 
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.dontje <at> oracle.com <mailto:terry.dontje <at> oracle.com>

_______________________________________________
(Continue reading)

Nicolas PENINGUY | 21 Nov 2010 00:53

libtool : .o files are ignored when mixing .lo and .o files

Dear libtool maintainers,

I ran into the following problem while trying to add some systemtap 
trace support to Xorg Server. An object file (stap_probes.o below) is 
generated using the "dtrace" utility, and then added in Makefile.am 
using "libexa_la_LIBADD += stap_probes.o".

During build, the following command is run (that doltlibtool thing ends 
up calling libtool) :

../doltlibtool  --tag=CC   --mode=link gcc -std=gnu99 
-DHAVE_XORG_CONFIG_H -fvisibility=hidden   -DXF86PM   
-DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes 
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs 
-fno-strict-aliasing -Wbad-function-cast -Wformat=2 
-Wold-style-definition -Wdeclaration-after-statement  -D_BSD_SOURCE 
-DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/pixman-1 
-I/usr/include/freetype2   -I../include -I../include -I../Xext 
-I../composite -I../damageext -I../xfixes -I../Xi -I../mi 
-I../miext/shadow  -I../miext/damage -I../render -I../randr -I../fb 
-fvisibility=hidden -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 
-mtune=generic -Wstrict-overflow -rdynamic  -Os   -o libexa.la  exa.lo 
exa_classic.lo exa_migration_classic.lo exa_driver.lo exa_mixed.lo 
exa_migration_mixed.lo exa_accel.lo exa_glyphs.lo exa_offscreen.lo 
exa_render.lo exa_unaccel.lo stap_probes.o -laudit -lm  -lrt

Then I get this expected warning message :

*** Warning: Linking the shared library libexa.la against the non-libtool
(Continue reading)


Gmane