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

[Support #SZN-475812]: help with building netcdf-perl



Jonathan,

> trying to build netcdf-perl, I get to the "make" portion and it fails
> (see below).
> 
> here is reqd basic info per your Help docs and I will attach the reqd logs:
> 
> # uname -a
> Linux 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:53:08 EDT 2009 x86_64
> x86_64 x86_64 GNU/Linux
> 
> # cat VERSION
> 1.2.4
> 
> # which cc
> /usr/bin/cc
> 
> # which gcc
> /usr/bin/gcc
> 
> 
> # make > make.log
> Please specify prototyping behavior for NetCDF.xs (see perlxs manual)
> /usr/bin/ld: /usr/local/netcdf-3.6.2/lib/libnetcdf.a(putget.o):
> relocation R_X86_64_32S against `a local symbol' can not be used when
> making a shared object; recompile with -fPIC
> /usr/local/netcdf-3.6.2/lib/libnetcdf.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[3]: *** [blib/arch/auto/NetCDF/NetCDF.so] Error 1
> make[2]: *** [perl/dynamic] Error 1
> make[1]: *** [decision] Error 2
> make: *** [all] Error 2

The netCDF library wasn't compiled in such a way that its object code is 
position independent (i.e., the -fPIC option wasn't used when the netCDF 
library was built).  Position independency is necessary in order to create a 
perl(1) extension module.

Try rebuilding the netCDF package with position independent code.

> [root@pooh src]# cat make.log
> make[1]: Entering directory `/root/netcdf-perl-1.2.4/src'
> make[2]: Entering directory `/root/netcdf-perl-1.2.4/src'
> 
> making `dynamic' in directory /root/netcdf-perl-1.2.4/src/perl
> 
> make[3]: Entering directory `/root/netcdf-perl-1.2.4/src/perl'
> /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap
> /usr/lib/perl5/5.8.8/ExtUtils/typemap  NetCDF.xs > NetCDF.xsc && mv
> NetCDF.xsc NetCDF.c
> gcc -c  -I/usr/local/netcdf-3.6.2/include -D_REENTRANT -D_GNU_SOURCE
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic   -DVERSION=\"1.2.4\" -DXS_VERSION=\"1.2.4\" -fPIC
> "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"   NetCDF.c
> Running Mkbootstrap for NetCDF ()
> chmod 644 NetCDF.bs
> rm -f blib/arch/auto/NetCDF/NetCDF.so
> gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic NetCDF.o
> -o blib/arch/auto/NetCDF/NetCDF.so       \
> -L/usr/local/netcdf-3.6.2/lib -lnetcdf       \
> 
> make[3]: Leaving directory `/root/netcdf-perl-1.2.4/src/perl'
> make[2]: Leaving directory `/root/netcdf-perl-1.2.4/src'
> make[1]: Leaving directory `/root/netcdf-perl-1.2.4/src'
> 
> 
> thanks!
> Jonathan
> 
> --
> Jonathan B. Auerbach
> Systems Administrator
> NOAA/ESRL/GSD/AB
> address@hidden
> 303-497-3760


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: SZN-475812
Department: Support netCDF Perl
Priority: Normal
Status: Closed