libtool
[Top][All Lists]
Advanced

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

Re: does libtool work on Suns?


From: Ralf Wildenhues
Subject: Re: does libtool work on Suns?
Date: Wed, 25 May 2005 19:35:55 +0200
User-agent: Mutt/1.5.9i

Hi Ed,

* Ed Hartnett wrote on Wed, May 25, 2005 at 06:41:43PM CEST:
> 
> I'm working to convert a popular open source library for Earth
> scientists (called netcdf) to libtool.

No, really?  :)

> But I'm not having much luck, and my boss is now suggesting that we go
> back to all static libraries, and take out this libtool stuff.

Do you always give up this easily?  Just kidding.  :)

> I can't get libtool to work on the Sun:
> 
> Making check in nf_test
> make  nf_test
> f95 -DHAVE_CONFIG_H -I. -I. -I.. -I../fortran   -I../libsrc    -g -c -o 
> test_get.o test_get.F
*snip*
> /bin/bash ../libtool --mode=link f95  -g  -L../libsrc   -o nf_test  
> test_get.o test_put.o  nf_error.o nf_test.o test_read.o  test_write.o util.o 
> fortlib.o -lnetcdf -lm  
> libtool: link: unable to infer tagged configuration
> libtool: link: specify a tag with `--tag'

OK.  How does your configuration look like?  Libtool does not have
native F95 (FC) support yet (might change in the near future), so
do you use F77=f95 or do you use both f77 and f95 in your package?

> It is trying to compile f77 code with f95 (which will work just fine),
> but libtool is complaining because it doesn't have the tag=f77
> argument.
> 
> Is there a way to put this argument in Makefile.am?

Yes.  Depending on the answer above, you won't have to, though.

> I am using the latest libtool distribution: 1.5.18, and reasonably
> recent versions of autoconf and automake.

Weird.  Recent Automake versions do issue the tag automatically.
How do you specify the build of nf_test in Makefile.am?

> Please tell me I haven't done all this libtool conversion for
> nothing. If I can't get our package to build on the Sun, I can't use
> libtool.

Does it build if you manually issue
  /bin/bash ../libtool --mode=link --tag=F77 f95 -g  -L../libsrc   -o nf_test  
test_get.o test_put.o  nf_error.o nf_test.o test_read.o  test_write.o util.o 
fortlib.o -lnetcdf -lm  

?  Assuming libnetcdf is a library within the same package, and built
with use of Libtool, you should write
  /bin/bash ../libtool --mode=link --tag=F77 f95 -g -o nf_test  test_get.o 
test_put.o  nf_error.o nf_test.o test_read.o  test_write.o util.o fortlib.o 
../libsrc/libnetcdf.la -lm  

instead (put ../libsrc/libnetcdf.la in LDADD or *_LDADD for Automake).
For test programs that may not matter so much, but programs installed
alongside your library will work right then.

Regards,
Ralf




reply via email to

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