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.
Hi David: This: undefined symbol: __pgdbg_stubseems to indicate that some Portland compiler symbols are still not linked in.
I did not know you were using Portland compilers. My full recipe for compiling netCDF with PG compilers is this:
if netcdf is to be installed in /ops/tools ./configure --prefix=/ops/tools FC=pgf90 \ CPPFLAGS="-DNDEBUG -DpgiFortran -fPIC" \ FFLAGS="-I/usr/include -I/ops/tools/include" makeI think adding -DpgiFortran to the CPPFLAGS for the configure step in the netCDF compile might help.
Sorry for the hassle. I'm CC'ing the netcdf mailing list in case anyone on that list has any ideas. Regards, Doug Hunt dhunt@xxxxxxxx Software Engineer UCAR - COSMIC, Tel. (303) 497-2611 On Tue, 19 Apr 2011, Bryan, David wrote:
Doug, Our admin guy recompiled NetCDF with -fPIC. (Though there were some complications I'll describe below.) The make step worked, but I ran into problem at the make test step. The log from that is below. After the log, I've got the description of the compilation. Thanks, David PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-Netcdf3.t .. 1/46 # Failed test 'use PDL::NetCDF;' # at t/01-Netcdf3.t line 7. # Tried to use 'PDL::NetCDF'. # Error: Can't load '/home/amec/PDL-NetCDF-4.08/blib/arch/auto/PDL/NetCDF/N etCDF.so' for module PDL::NetCDF: /home/amec/PDL-NetCDF-4.08/blib/arch/auto/PDL/ NetCDF/NetCDF.so: undefined symbol: __pgdbg_stub at /usr/lib64/perl5/5.8.5/x86_6 4-linux-thread-multi/DynaLoader.pm line 230. # at (eval 39) line 2 # Compilation failed in require at (eval 39) line 2. # BEGIN failed--compilation aborted at (eval 39) line 2. Use of inherited AUTOLOAD for non-method PDL::NetCDF::nc_create() is deprecated at /home/amec/PDL-NetCDF-4.08/blib/lib/PDL/NetCDF.pm line 1063. Can't locate auto/PDL/NetCDF/nc_create.al in @INC (@INC contains: /home/amec/PDL -NetCDF-4.08/blib/lib/5.8.5/x86_64-linux-thread-multi /home/amec/PDL-NetCDF-4.08 /blib/lib/5.8.5 /home/amec/PDL-NetCDF-4.08/blib/lib/x86_64-linux-thread-multi /h ome/amec/PDL-NetCDF-4.08/blib/lib/5.8.4 /home/amec/PDL-NetCDF-4.08/blib/lib/5.8. 3 /home/amec/PDL-NetCDF-4.08/blib/lib/5.8.2 /home/amec/PDL-NetCDF-4.08/blib/lib/ 5.8.1 /home/amec/PDL-NetCDF-4.08/blib/lib/5.8.0 /home/amec/PDL-NetCDF-4.08/blib/ lib /home/amec/PDL-NetCDF-4.08/blib/arch/5.8.5/x86_64-linux-thread-multi /home/a mec/PDL-NetCDF-4.08/blib/arch/5.8.5 /home/amec/PDL-NetCDF-4.08/blib/arch/x86_64- linux-thread-multi /home/amec/PDL-NetCDF-4.08/blib/arch/5.8.4 /home/amec/PDL-Net CDF-4.08/blib/arch/5.8.3 /home/amec/PDL-NetCDF-4.08/blib/arch/5.8.2 /home/amec/P DL-NetCDF-4.08/blib/arch/5.8.1 /home/amec/PDL-NetCDF-4.08/blib/arch/5.8.0 /home/ amec/PDL-NetCDF-4.08/blib/arch /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/site _perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-li nux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi /usr /lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/ 5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/per l5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread -multi /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/p erl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5. 8.2/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-th read-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib /perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_ perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /us r/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /home/amec/PDL-Ne tCDF-4.08/blib/lib/PDL/NetCDF.pm line 1063 # Looks like you planned 46 tests but ran 3. # Looks like you failed 1 test of 3 run. # Looks like your test exited with 2 just after 3. t/01-Netcdf3.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 44/46 subtests t/02-Netcdf4.t .. 1/20 # Failed test 'use PDL::NetCDF;' # at t/02-Netcdf4.t line 8. # Tried to use 'PDL::NetCDF'. # Error: Can't load '/home/amec/PDL-NetCDF-4.08/blib/arch/auto/PDL/NetCDF/N etCDF.so' for module PDL::NetCDF: /home/amec/PDL-NetCDF-4.08/blib/arch/auto/PDL/ NetCDF/NetCDF.so: undefined symbol: __pgdbg_stub at /usr/lib64/perl5/5.8.5/x86_6 4-linux-thread-multi/DynaLoader.pm line 230. # at (eval 24) line 2 # Compilation failed in require at (eval 24) line 2. # BEGIN failed--compilation aborted at (eval 24) line 2. Bareword "PDL::NetCDF::isNetcdf4" not allowed while "strict subs" in use at t/02 -Netcdf4.t line 14. Bareword "PDL::NetCDF::isNetcdf4" not allowed while "strict subs" in use at t/02 -Netcdf4.t line 13. Execution of t/02-Netcdf4.t aborted due to compilation errors. # Looks like you planned 20 tests but ran 1. # Looks like you failed 1 test of 1 run. # Looks like your test exited with 255 just after 1. t/02-Netcdf4.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 20/20 subtests Test Summary Report ------------------- t/01-Netcdf3.t (Wstat: 512 Tests: 3 Failed: 1) Failed test: 2 Non-zero exit status: 2 Parse errors: Bad plan. You planned 46 tests but ran 3. t/02-Netcdf4.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 20 tests but ran 1. Files=2, Tests=4, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.48 cusr 0.06 csys = 0.59 CPU) Result: FAIL Failed 2/2 test programs. 2/4 subtests failed. make: *** [test_dynamic] Error 255----> Here's the compilation information:I've done the following: Moved previous "libnetcdf" files in /usr/local/lib to /usr/local/lib/BACKUP Configuration/Compilation settings for NetCDF 4.1.1 (/home/WRF/WRF_Source/netcdf-4.4.1) CC pgcc FC pgf90 F77 pgf77 F90 pgf90 CPPFLAGS -DNDEBUG -fPIC ./configure --disable-netcdf-4 -disable-cxx Where --disable-netcdf-4 -- Do not include HDF5 in compilation --disable-cxx -- Do not compile C++ library make check install ... appears to work OK, except that one (1) of the tests in "make check" fails: *** Test: varm on URL: http://test.opendap.org/opendap/data/nc/coads_climatology .nc *** Testing: stride case 1 *** nc function failure: -33 NetCDF: Not a valid ID FAIL: test_varm3 ================================================ 1 of 4 tests failed Please report to support-netcdf@xxxxxxxxxxxxxxxx ... not sure what this test is... Anyway, the following files are available in /home/WRF/WRF_Source/netcdf-4.1.1 ./ncdump/ncdump ./ncgen/ncgen ./ncgen3/ncgen3 ... and ... /usr/local/lib/libnetcdf.a /usr/local/lib/libnetcdf.la ... plus several other files under /home/WRF/WRF_Source/netcdf-4.1.1 ________________________________________ From: Doug Hunt [dhunt@xxxxxxxx] Sent: Monday, April 18, 2011 12:28 PM To: Bryan, David Subject: RE: module PDL::NetCDF not on CPAN Hi David: It looks like you are on a 64 bit Linux machine, but your netcdf installation was not compiled with -fPIC. This is a hassle. For my local installation, I compile netcdf like this: ./configure --prefix=/where/to/install/netcdf \ CPPFLAGS="-DNDEBUG -fPIC" make make install You may have to adapt your ./configure line according to your local needs--the important thing is the -fPIC. Regards, Doug dhunt@xxxxxxxx Software Engineer UCAR - COSMIC, Tel. (303) 497-2611 On Mon, 18 Apr 2011, Bryan, David wrote:Doug, Thanks for the information. Below you'll see the log from the make step. Do you have any suggestions about this? Thanks, David /usr/bin/perl -I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi "-MPDL::PP qw/PDL::NetCDF PDL::NetCDF NetCDF/" netcdf.pd cp NetCDF.pm blib/lib/PDL/NetCDF.pm /usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/PDL/Core/typemap.pdl -typemap typemap NetCDF.xs > NetCDF.xsc && mv NetCDF.xsc NetCDF.c gcc -c -I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/PDL/Core -I/usr/local/include/ -Dbool=int -g -O2 -g -pipe -m64 -DVERSION=\"4.08\" -DXS_VERSION=\"4.08\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE" NetCDF.c In file included from /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/perl.h:1813, from NetCDF.xs:6: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/handy.h:85:1: warning: "bool" redefined <command line>:1:1: warning: this is the location of the previous definition Running Mkbootstrap for PDL::NetCDF () chmod 644 NetCDF.bs rm -f blib/arch/auto/PDL/NetCDF/NetCDF.so gcc -shared NetCDF.o -o blib/arch/auto/PDL/NetCDF/NetCDF.so \ -L/usr/local/lib/ -lnetcdf \ /usr/bin/ld: /usr/local/lib//libnetcdf.a(attr.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib//libnetcdf.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [blib/arch/auto/PDL/NetCDF/NetCDF.so] Error 1 ________________________________________ From: Doug Hunt [dhunt@xxxxxxxx] Sent: Friday, April 15, 2011 7:04 PM To: Bryan, David Cc: rt-cpan-admin@xxxxxxxxxxxxxxxxx Subject: Re: module PDL::NetCDF not on CPAN Hi David: I've been having problems getting PDL::NetCDF indexed on CPAN for a while now, and don't know how to fix them. For the moment, you can just download the http://search.cpan.org/CPAN/authors/id/D/DH/DHUNT/PDL-NetCDF-4.08.tar.gz tarball and then: tar -xvzf PDL-NetCDF-4.08.tar.gz cd PDL-NetCDF-4.08 export NETCDF_LIBDIR=/where/netcdf/libs/are export NETCDF_INCDIR=/where/netcdf/include/files/are perl Makefile.PL make make test make install Regards, Doug dhunt@xxxxxxxx Software Engineer UCAR - COSMIC, Tel. (303) 497-2611 On Fri, 15 Apr 2011, Bryan, David wrote:Iʼve tried installing PDL::NetCDF module with CPAN but I get the message that itʼs not available from CPAN. Can you address this? Thanks, David Bryan Wind Modeler AMEC Earth and Environmental 133 Crosbie Rd St. John's, NL A1B 4A5 Canada 709-724-1929 ext. 321 fax: 709-722-7353 _______________________________________________________________________________________________________________________________ The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. Its contents (including any attachments) may contain confidential and/or privileged information. If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents. If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. Its contents (including any attachments) may contain confidential and/or privileged information. If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents. If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. Its contents (including any attachments) may contain confidential and/or privileged information. If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents. If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.
netcdfgroup
archives: