Re: Libtool adding libraries differently than neededwith compilerwrappers

2011-04-22 Thread John R. Cary

Hi Nitin,

I did go down this path before.

I added

AC_CONFIG_COMMANDS(rminterlibdeps,
  [
echo Executing rminterlibdeps
os_fc=`uname`-${FC};
case $os_fc in
  Linux-ftn)
echo Removing the inter-library dependencies;
sed -i.bak -e 's/postdeps=.*$/postdeps=/g' -e 
's/postdep_objects=.*$/postdep_objects=/g' -e 
's/link_all_deplibs=.*$/link_all_deplibs=no/g' libtool
sed -i.bak -e 's? -L/opt/fftw/3.2.[0-9]/lib ? ?g' -e 's? 
/opt/fftw/3.2.[0-9]/lib ? ?g' libtool

# The general one does not seem to work?
# sed -i.bak -e 's? -L/opt/fftw/3.2.[0-9].[0-9]/lib ? ?g' -e 
's? /opt/fftw/3.2.[0-9].[0-9]/lib ? ?g' libtool
sed -i.bak -e 's? -L/opt/fftw/3.2.2.1/lib ? ?g' -e 's? 
/opt/fftw/3.2.2.1/lib ? ?g' libtool

;;
esac
rm -f libtool.bak;
  ]
)

to my configure.ac, and I have:

nid00163.franklin$ grep fftw libtool
nid00163.franklin$

showing that all references to fftw in libtool have been removed, but I 
still get

the error.

ThxJohn



On 4/22/2011 10:38 AM, Kapoor, Nitin wrote:

I am having a similar issue where libtool is passing
(/usr/sfw/lib/libstdc++.so) to the linker.

libtool: link: g++ -g -O2 -D_REENTRANT -pthreads -o .libs/EnumVal
src/EnumVal/EnumVal.o  ../src/.libs/libxerces-c.so
/usr/sfw/lib/libstdc++.so -L/usr/sfw/lib -lnsl -lsocket -licuuc
-licudata -pthreads -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib
ld: warning: file /usr/sfw/lib/libstdc++.so: attempted multiple
inclusion of file

I found out that it is because of the postdeps variable in the libtool
script. If you search the libtool script, you will find a similar entry
to this:-
postdeps="-lstdc++ -lm -lgcc_s -lgcc_s". If I remove -lstdc++, then I
get clean compile ( no multiple inclusion warning).

I do not know how to configure libtool to remove it by itself. This may
be your issue as well.

Thanks,

Nitin.




-Original Message-
From: libtool-bounces+nkapoor=sensis@gnu.org
[mailto:libtool-bounces+nkapoor=sensis@gnu.org] On Behalf Of John R.
Cary
Sent: Friday, April 22, 2011 12:28 PM
To: libtool@gnu.org
Subject: Re: Libtool adding libraries differently than neededwith
compilerwrappers

Hi Nitin,

I take the link line output from libtool and throw it into a shell
script, then
I remove those entries and run the script.

Thx...John

On 4/22/2011 10:25 AM, Kapoor, Nitin wrote:

Hi John,

How are you removing the following paths from you link:

/opt/fftw/3.2.2.1/lib/libfftw3.so /opt/fftw/3.2.2.1/lib/libfftw3f.so
 /opt/cray/pmi/1.0-1..7901.22.1.ss/lib64/libpmi.so
 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libstdc++.so

and

 -lgcc_s


Are you hand editing the libtool script ?


Thanks

Nitin.

-Original Message-
From: libtool-bounces+nkapoor=sensis@gnu.org
[mailto:libtool-bounces+nkapoor=sensis@gnu.org] On Behalf Of John

R.

Cary
Sent: Friday, April 22, 2011 9:17 AM
To: libtool@gnu.org
Subject: Libtool adding libraries differently than needed with
compilerwrappers

We have a project using libtool on a Cray-XT4 using pathscale.
For compiling in parallel, we are supposed to use the compiler
wrapper, in this case ftn, that adds various libraries.  A particular
complexity is that one has to switch libraries between front and
back end nodes, and this is done with LD_LIBRARY_PATH.  We have
a problem, in that libtool seems to extract libraries from
the wrapper and put them at the end of the link line in a way
that the linker exits with an error.

System information
x86_64-unknown-linux-gnu
bash
ftn (wrapping pathf90)
-extend-source -byteswapio -fno-second-underscore -r8 -O2
-fno-second-underscore


/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin

/ld
libtool (GNU libtool) 2.4
autoconf (GNU Autoconf) 2.68
automake (GNU automake) 1.11.1

The failure is

/bin/sh ../../libtool --tag=FC --tag=FC  --mode=link ftn
-I../../interfaces/wrap -I../../interfaces/src


-I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r1

96-par/include


-I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-

r1341-par/include
-I/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/include


-I/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0

.47-r114-par/include
-extend-source -byteswapio -fno-second-underscore -r8 -O2
-fno-second-underscore   -o runFlowShear runFlowShear.o libfmcfm.la


-L/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-

r1341-par/lib/pathf
-lglf23mpi -lmmm95 -lifspppl -lnclass -lkapisn


-L/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r1

96-par/lib/pathf
-lGYRO -lNEO -lTGLF


-L/project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.

12-r51-ser/lib
-llsode -lnlother -lr8slatec


-L/project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/l

ib
-lrfftw -lfftw /opt/acml/4.2.0/pathscale64/

RE: Libtool adding libraries differently than neededwith compilerwrappers

2011-04-22 Thread Kapoor, Nitin
I am having a similar issue where libtool is passing
(/usr/sfw/lib/libstdc++.so) to the linker. 

libtool: link: g++ -g -O2 -D_REENTRANT -pthreads -o .libs/EnumVal
src/EnumVal/EnumVal.o  ../src/.libs/libxerces-c.so
/usr/sfw/lib/libstdc++.so -L/usr/sfw/lib -lnsl -lsocket -licuuc
-licudata -pthreads -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib
ld: warning: file /usr/sfw/lib/libstdc++.so: attempted multiple
inclusion of file

I found out that it is because of the postdeps variable in the libtool
script. If you search the libtool script, you will find a similar entry
to this:-
postdeps="-lstdc++ -lm -lgcc_s -lgcc_s". If I remove -lstdc++, then I
get clean compile ( no multiple inclusion warning).

I do not know how to configure libtool to remove it by itself. This may
be your issue as well.

Thanks,

Nitin.




-Original Message-
From: libtool-bounces+nkapoor=sensis@gnu.org
[mailto:libtool-bounces+nkapoor=sensis@gnu.org] On Behalf Of John R.
Cary
Sent: Friday, April 22, 2011 12:28 PM
To: libtool@gnu.org
Subject: Re: Libtool adding libraries differently than neededwith
compilerwrappers

Hi Nitin,

I take the link line output from libtool and throw it into a shell 
script, then
I remove those entries and run the script.

Thx...John

On 4/22/2011 10:25 AM, Kapoor, Nitin wrote:
> Hi John,
>
> How are you removing the following paths from you link:
>
> /opt/fftw/3.2.2.1/lib/libfftw3.so /opt/fftw/3.2.2.1/lib/libfftw3f.so
> /opt/cray/pmi/1.0-1..7901.22.1.ss/lib64/libpmi.so
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/libstdc++.so
>
> and
>
> -lgcc_s
>
>
> Are you hand editing the libtool script ?
>
>
> Thanks
>
> Nitin.
>
> -Original Message-
> From: libtool-bounces+nkapoor=sensis@gnu.org
> [mailto:libtool-bounces+nkapoor=sensis@gnu.org] On Behalf Of John
R.
> Cary
> Sent: Friday, April 22, 2011 9:17 AM
> To: libtool@gnu.org
> Subject: Libtool adding libraries differently than needed with
> compilerwrappers
>
> We have a project using libtool on a Cray-XT4 using pathscale.
> For compiling in parallel, we are supposed to use the compiler
> wrapper, in this case ftn, that adds various libraries.  A particular
> complexity is that one has to switch libraries between front and
> back end nodes, and this is done with LD_LIBRARY_PATH.  We have
> a problem, in that libtool seems to extract libraries from
> the wrapper and put them at the end of the link line in a way
> that the linker exits with an error.
>
> System information
> x86_64-unknown-linux-gnu
> bash
> ftn (wrapping pathf90)
> -extend-source -byteswapio -fno-second-underscore -r8 -O2
> -fno-second-underscore
>
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin
> /ld
> libtool (GNU libtool) 2.4
> autoconf (GNU Autoconf) 2.68
> automake (GNU automake) 1.11.1
>
> The failure is
>
> /bin/sh ../../libtool --tag=FC --tag=FC  --mode=link ftn
> -I../../interfaces/wrap -I../../interfaces/src
>
-I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r1
> 96-par/include
>
-I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-
> r1341-par/include
> -I/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/include
>
-I/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0
> .47-r114-par/include
> -extend-source -byteswapio -fno-second-underscore -r8 -O2
> -fno-second-underscore   -o runFlowShear runFlowShear.o libfmcfm.la
>
-L/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-
> r1341-par/lib/pathf
> -lglf23mpi -lmmm95 -lifspppl -lnclass -lkapisn
>
-L/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r1
> 96-par/lib/pathf
> -lGYRO -lNEO -lTGLF
>
-L/project/projectdirs/facets/franklin/contrib-path-3.2/netlib_lite-1.0.
> 12-r51-ser/lib
> -llsode -lnlother -lr8slatec
>
-L/project/projectdirs/facets/franklin/contrib-path-3.2/fftw-2.1.5-ser/l
> ib
> -lrfftw -lfftw /opt/acml/4.2.0/pathscale64/lib/libacml.a
> /opt/acml/4.2.0/pathscale64/lib/libacml.a
> /opt/acml/4.2.0/pathscale64/lib/libacml_mv.a
>
-L/project/projectdirs/facets/franklin/contrib-path-3.2/fciowrappers-1.0
> .47-r114-par/lib
> -lezcdf -lvshdf5
>
-L/project/projectdirs/facets/franklin/contrib-path-3.2/netcdf-4.1.1-par
> /lib
> -lnetcdf -lnetcdf_c++
> -L/opt/cray/hdf5-parallel/1.8.3.1/hdf5-parallel-pathscale/lib
> -lhdf5_fortran -lhdf5_hl -lhdf5
> /global/common/franklin/usg/szip/2.1/lib/libsz.a -lz
> libtool: link: ftn -I../../interfaces/wrap -I../../interfaces/src
>
-I/project/projectdirs/facets/franklin/internal-path-3.2/ga_transport-r1
> 96-par/include
>
-I/project/projectdirs/facets/franklin/internal-path-3.2/ntcc_transport-
> r1341-par/include
> -I/opt/cray/hdf5-parallel/1