[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #RWK-638692]: Building shared libraries under SuSE Linux 64bit
- Subject: [netCDF #RWK-638692]: Building shared libraries under SuSE Linux 64bit
- Date: Wed, 20 Jun 2007 06:43:10 -0600
> Hello all!
> I am trying to build netcdf with the -enable-shared flag, as Scientific
> Python's NetCDF module appears to insist on it.
Oh, that is not good. Are you sure this is the case? It *requires* shared
netCDF?
> I never had problems with the installation until I swapped to a SuSE
> 64bit Linux server (think it runs 9.3!).
The 64-bit is the problem.
> I am building everything fancy in a local user directory, and I'm using
> the Intel ifort compiler.
> (netcdf, ifort, python etc resides there, but for standard thinks like
> gcc i'm using the global installation)
> The problem now is, that netcdf configures fine using
>
> ./configure --prefix=/data/gis/fhebeler/linux --disable-cxx --enable-shared
>
> (the c++ is giving me troubles, so i disabled it and used the
> precompiled version from your website)
Our website only has static prebuilt libraries.
But probably Scientific Python only uses the C API, and you can build with
--disable-f77 --disable-cxx to turn off all Fortran and C++ stuff.
>
> When I try to make it, it bails out here:
>
> /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld:
> ../f90/.libs/libnetcdff90.a(netcdf.o): relocation R_X86_64_32 can not be
> used when making a shared object; recompile with -fPIC
> ../f90/.libs/libnetcdff90.a(netcdf.o): could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[3]: *** [libnetcdff.la] Error 1
> make[3]: Leaving directory
> `/raid/gis/fhebeler/downloads/netcdf/netcdf-3.6.2/fortran'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory
> `/raid/gis/fhebeler/downloads/netcdf/netcdf-3.6.2/fortran'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/raid/gis/fhebeler/downloads/netcdf/netcdf-3.6.2'
> make: *** [all] Error 2
This saying that libtool and your compiler are having a problem building shared
fortran libraries on your system. Possibly there is a set of flags which could
make it work, but it would be easier to just turn off the fortran libraries if
you don't need them.
>
>
> I've tried a couple of flags, such as
> setenv CPPFLAGS "-fPIC -DpgiFortran"
> (which it seems to ignore)
>
> But honestly, I'm stuck. Any ideas from your side?
> Attached is the config file...
>
> Cheers & Thanks
> Felix
>
If you need the shared fortran library, let me know, otherwise build without it
and see if that works.
Thanks,
Ed
Ticket Details
===================
Ticket ID: RWK-638692
Department: Support netCDF
Priority: Normal
Status: Closed