[Top][All Lists]

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

shared library problem on macos with free software scientific package...

From: Ed Hartnett
Subject: shared library problem on macos with free software scientific package...
Date: Fri, 07 Jan 2011 05:30:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Howdy all!

I am working on netCDF, a set of (free) software libraries that enable
access to array-oriented scientific data. It is used heavily by climate
and other Earth scientists.

NetCDF includes a Fortran 90 API. The F90 library is put together as a
convenience library, and then the F77 is put together. Both the F90 and
F77 libraries are then packaged into the same fortran library.

This works fine on many platforms, and fine on macos for static builds,
but for shared library builds I get an odd problem. When it's time to
assemble the final fortran library, which includes the F77 object files
and the F90 convenience library, I get an error (see below).

For some reason, the libtool script that ships with the dist is ignored,
and the build tries to use /usr/bin/libtool instead, and that's where it
comes unglued. This may have nothing to do with macos, but may mearly be
happening on this machine because an old version of libtool is installed

I am using libtool 2.4 to build the dist, and the macos machine also has
libtool 2.4 installed.

Why would it try to use /usr/bin/libtool, when it has a perfectly good
copy of a libtool script that it uses successfully elsewhere?

The tarball can be found here:

The full test output can be found here (requires free registration on
our website):

The error message was:
    /bin/sh ../libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H
    -I. -I..  -I../include -I../liblib    -m32 -MT fort-varsio.lo -MD
    -MP -MF $depbase.Tpo -c -o fort-varsio.lo fort-varsio.c &&\
    mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../include -I../liblib
    -m32 -MT fort-varsio.lo -MD -MP -MF .deps/fort-varsio.Tpo -c
    fort-varsio.c  -fno-common -DPIC -o .libs/fort-varsio.o
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../include -I../liblib
    -m32 -MT fort-varsio.lo -MD -MP -MF .deps/fort-varsio.Tpo -c
    fort-varsio.c -o fort-varsio.o >/dev/null 2>&1
/bin/sh ../libtool --tag=FC   --mode=link g95  -m32 -lz -lcurl  -o -rpath /machine/netcdf/nc_test_51783/in1/lib
    fort-attio.lo fort-control.lo fort-dim.lo fort-genatt.lo
    fort-geninq.lo fort-genvar.lo fort-lib.lo fort-misc.lo
    fort-v2compat.lo fort-vario.lo fort-var1io.lo fort-varaio.lo
    fort-varmio.lo fort-varsio.lo  ../f90/ 
libtool: link: g95 -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
    .libs/libnetcdff.0.dylib  .libs/fort-attio.o .libs/fort-control.o
    .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o
    .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o
    .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o
    .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o
    -Wl,-force_load,../f90/.libs/libnetcdff90.a  -lz -lcurl  -m32
    -compatibility_version 1 -current_version 1.0 -Wl,-single_module
/usr/bin/libtool: unknown option character `f' in: -force_load
Usage: /usr/bin/libtool -static [-] file [...] [-filelist
    listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist
    listfile[,dirname]] [-arch_only arch] [-o output] [-install_name
    name] [-compatibility_version #] [-current_version #] [-seg1addr
    0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#]
    [-seg_addr_table <filename>] [-seg_addr_table_filename
    <file_system_path>] [-all_load] [-noall_load]
make[2]: *** [] Error 1
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1

Am I doing something wrong here?



Ed Hartnett  -- address@hidden

reply via email to

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