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

[netCDF #TQG-648396]: /tmp/netcdf-fortran-4.4.2/fortran/./nf_control.F90:307: undefined reference to `nc_inq_path'



Hello,

I'm afraid I don't have access to the pgfortran compiler, but I will do my best 
to help figure this out.  It appears that your system is trying to build a 
shared library, instead of a static one, but you are passing the 
'--disable-shared' flag appropriately.  It looks like you also compiled the 
libnetcdf library statically; would it be possible for you to try rebuilding 
libnetcdf 4.3.3.1, but adding CPPFLAGS="-fPIC"?  You might also try building 
libnetcdf and libnetcdff as shared libraries just to see if that works; it will 
help us rule out some things with the compiler.

I hope this helps, let me know what the result is,

-Ward

> Hello,
> 
> While buildingÂnetcdf-fortran-4.4.2, the following was prompted:
> 
> make[2]: Entering directory '/tmp/netcdf-fortran-4.4.2/nf_test'pgfortran 
> -I../fortran  -I../fortran -g -c -o f03lib_f_interfaces.o 
> Âf03lib_f_interfaces.f90pgfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc  
> Â-I../fortran  -I../fortran -g -c -o test_get.o test_get.Fpgfortran 
> -DHAVE_CONFIG_H -I. -I.. -I../libsrc  Â-I../fortran  -I../fortran -g -c 
> -o test_put.o test_put.Fpgfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc  
> Â-I../fortran  -I../fortran -g -c -o nf_error.o nf_error.Fpgfortran 
> -DHAVE_CONFIG_H -I. -I.. -I../libsrc  Â-I../fortran  -I../fortran -g -c 
> -o nf_test.o nf_test.Fpgfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc  
> Â-I../fortran  -I../fortran -g -c -o test_read.o test_read.Fpgfortran 
> -DHAVE_CONFIG_H -I. -I.. -I../libsrc  Â-I../fortran  -I../fortran -g -c 
> -o test_write.o test_write.Fpgfortran -DHAVE_CONFIG_H -I. -I.. -I../libsrc  
> Â-I../fortran  -I../fortran -g -c -o util.o util.Fsource='f03lib.c' 
> object='f03lib.o' libtool=no \DEPDIR=.d
 eps depmode=pgcc /bin/sh ../depcomp \pgcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc 
  -g -DLONGLONG_IS_LONG -c -o f03lib.o f03lib.c/bin/sh ../libtool 
Â--tag=F77  --mode=link pgfortran -I../fortran  -I../fortran -g  -o 
nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o 
test_read.o test_write.o util.o f03lib.o ../fortran/libnetcdff.la 
-lnetcdfÂlibtool: link: pgfortran -I../fortran -I../fortran -g -o nf_test 
f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o test_read.o 
test_write.o util.o f03lib.o Â../fortran/.libs/libnetcdff.a 
/usr/local/lib/libnetcdf.a../fortran/.libs/libnetcdff.a(nf_control.o): In 
function `nf_inq_path_':/tmp/netcdf-fortran-4.4.2/fortran/./nf_control.F90:307: 
undefined reference to `nc_inq_path'Makefile:1251: recipe for target 'nf_test' 
failedmake[2]: *** [nf_test] Error 2make[2]: Leaving directory 
'/tmp/netcdf-fortran-4.4.2/nf_test'Makefile:1825: recipe for target 'check-am' 
failedmake[1]: *** [check-am] Error 2m
 ake[1]: Leaving directory '/tmp/netcdf-fortran-4.4.2/nf_test'Makefile:544: 
recipe for target 'check-recursive' failedmake: *** [check-recursive] Error 1
> 
> This issue is related to the following case about netcdf-fortran on 
> github:Â/usr/bin/ld: /usr/local/lib/libnetcdf.a(attr.o): relocation 
> R_X86_64_32 against `.rodata' can not be used when making a shared object; 
> recompile with -fPIC Â Issue #35 Â Unidata/netcdf-fortran
> 
> 
> | Â |
> | Â |  | Â | Â | Â | Â | Â |
> | /usr/bin/ld: /usr/local/lib/libnetcdf.a(attr.o): relocat...Hello, While 
> building netcdf-fortran-4.4.2 the following was prompted: Making check in 
> fortran make[1]: Entering directory '/tmp/netcdf-fortran-4.4.2/fortran' make 
> ... |
> |  |
> | View on github.com | Preview by Yahoo |
> |  |
> | Â |
> 
> 
> Attached is my config.log file for:
> 
> ./configure --prefix=/usr/local/netcdf/fortran \--disable-shared \CC=pgcc 
> \FC=pgfortran \F77=pgfortran
> 
> Would you please give me some ideas about how to solve this issue?
> 
> Best Regards,
> NÃstor Waldyd
> 
> On Thursday, 26 November 2015, 19:25, Ward Fisher <address@hidden> wrote:
> 
> 
> Closed #35.â
> Reply to this email directly or view it on GitHub.
> 
> 
> 


Ticket Details
===================
Ticket ID: TQG-648396
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.