NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


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

[netCDF #KRD-878925]: Building netcdf on 64 bit Linux machine



> I am trying to build netcdf 3.6.3 on CentOS release 5.2 64 bit machine.
> I get the following error when linking against the newly built netcdf
> library.
>
> /usr/bin/ld: /opt/lib64/libnetcdf.a(attr.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /opt/lib64/libnetcdf.a(attr.o): could not read symbols: Bad value
>
> The netcdf build goes just fine, and all tests are successful. I don't
> see any notes specific to building on 64 bit machines except "Some
> platforms support special options to build in 64-bit mode. " But Linux
> is not listed, only AIX, IRIX, and SUNOS.
>
> I am using gcc/g++ version 4.1.2
>
> Any compile flags I should be using?
>
> Thanks,
>
> Patrick West
> Tetherless World Constellation
> Rensselaer Polytechnic Institute
>

Howdy Patrick!

This is not a 64-bit problem, but a shared library problem.

Sounds like your application wants to link against a shared library. By
default, only static netCDF libraries are build.

Rebuild netCDF with the --enable-shared configure option.

Please let me know if this doesn't help.

Thanks,

Ed

Ticket Details
===================
Ticket ID: KRD-878925
Department: Support netCDF
Priority: Normal
Status: Closed