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

Re: 20051101: netCDF Perl Interface - problem using netcdf-perl: __buitin__alloca



John,

Because the perl(1) utility was built using gcc(1), you'll have to use
that compiler to build the netCDF and NetCDF-Perl packages in order to
get them to link together.

I'm sorry, but that's just the way it is.

Regards,
Steve Emmerson

------- Original Message

Date:    Wed, 02 Nov 2005 11:16:05 -0600
From:    John C Nordlie <address@hidden>To:      Steve Emmerson <steve@un
          idata.ucar.edu>
cc:      address@hidden, "" <address@hidden>,
         "Leon F. Osborne" <address@hidden>
Subject: Re: 20051101: netCDF Perl Interface - problem using netcdf-perl: __bui
          tin__alloca 

Hi Steve, thanks for your prompt reply.

On Wed, 2 Nov 2005, Steve Emmerson wrote:

> John,
>
> I believe the problem you're having stems from different compilers being
> used to compile the perl(1), netCDF(3), and NetCDF-Perl(3) packages.  You
> used pgcc(1) to compile the NetCDF-Perl package.  You can discover the
> compiler used for the perl(1) utility via the command
>
>     perl -V

Perl was made with gcc.  Tried building perl 5.8.7 with pgcc, here's
the tail of the 'make' output:

make[1]: Entering directory `/home/nordlie/download/perl-5.8.7'
cp ext/re/re.pm ext/re/re.tmp && sh mv-if-diff ext/re/re.tmp lib/re.pm
make[1]: Leaving directory `/home/nordlie/download/perl-5.8.7'
./miniperl minimod.pl > minimod.tmp
sh mv-if-diff minimod.tmp lib/ExtUtils/Miniperl.pm
touch lib/ExtUtils/Miniperl.pm
cd lib/unicore &&  ../../miniperl -I../../lib mktables -w
oops[Z] at mktables line 1699.
make: *** [lib/unicore/Canonical.pl] Error 25

> You'll have to look in the source-directory of the netCDF package to
> discover which compiler was used (I suspect it was gcc(1)).

Nope, built that with PGI:

        Built and installed
        NetCDF 3.5.1, using following environment variables:

        setenv CPP_NETCDF -I/usr/local/include
        setenv LD_NETCDF "-L/usr/local/lib -lnetcdf"
        setenv PERL /usr/bin/perl
        setenv PERL_MANDIR /usr/local/man
        setenv CC pgcc
        setenv CFLAGS "-O -Msignextend -V -fPIC"
        setenv FC pgf90
        setenv F90 pgf90
        setenv FFLAGS "-g -w -V"
        setenv CXX pgCC
        setenv CPPFLAGS "-DNDEBUG -DpgiFortran"

        as per PGI webpage:
        http://www.pgroup.com/resources/netcdf/netcdf351_pgi5x_64.htm

I double-checked the macros.make file after running configure to be sure
it was using the PGI compilers for C and FORTRAN, it was.

> You're more likely to obtain a successful build if you can use the same
> compiler for all these packages.
>
> Regards,
> Steve Emmerson
>
> **************************************************************************** 
<
> Unidata User Support                                    UCAR Unidata Program 
<
> (303)497-8643                                                  P.O. Box 3000 
<
> address@hidden                                   Boulder, CO 80307 
<
> ---------------------------------------------------------------------------- 
<
> Unidata WWW Service              http://my.unidata.ucar.edu/content/support  
<
> ---------------------------------------------------------------------------- 
<
> 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.
>
> ------- Original Message
>
> >To: address@hidden
> >From: "John Nordlie" <address@hidden>
> >Subject: netCDF Perl Interface - problem using netcdf-perl: __buitin__alloca
> >Organization: University of North Dakota
> >Keywords: 200511020006.jA206YNS028796 netCDF Perl
>
> Institution: University of North Dakota
> Package Version: 1.2.3
> Operating System: Redhat Linux Enterprise Worstation 3
> Hardware Information: Dual Opteron, 1GB RAM, RAID
> Inquiry: System has PGI compilers (C and FORTRAN).  Built and installed
> NetCDF 3.5.1, using following environment variables:
>
> setenv CPP_NETCDF -I/usr/local/include
> setenv LD_NETCDF "-L/usr/local/lib -lnetcdf"
> setenv PERL /usr/bin/perl
> setenv PERL_MANDIR /usr/local/man
> setenv CC pgcc
> setenv CFLAGS "-O -Msignextend -V -fPIC"
> setenv FC pgf90
> setenv F90 pgf90
> setenv FFLAGS "-g -w -V"
> setenv CXX pgCC
> setenv CPPFLAGS "-DNDEBUG -DpgiFortran"
>
> as per PGI webpage:
> http://www.pgroup.com/resources/netcdf/netcdf351_pgi5x_64.htm
>
> Package built and installed with no errors in /usr/local.
>
> Built netcdf-perl-1.2.8 using same enviro variables and installed in default 
lo
> cation (didn't specify prefix in ./configure) with no errors, however when tr
yi
> ng to use, we get this:
>
> mdssfp@lisa:../scripts/perl> perl mos2nc /home/mdssfp/etc/mav_mos.cdl
> /home/mdssfp/mdss_data/raw_data/mos/mav_mos/20051101/mav_mos.20051101.1200.as
c
> 23:47:47 Starting.
> perl: relocation error:
> /usr/lib64/perl5/site_perl/5.8.0/auto/NetCDF/NetCDF.so: undefined
> symbol: __builtin_alloca
>
> Verified as per PGI page that CXX was set to pgCC in macros.make (it was).
>
> 'make test' in build directory also dies:
>
> [nordlie@lisa src]$ make test
> make[1]: Entering directory `/home/nordlie/download/netcdf-perl-1.2.3/src'
>
> making `test' in directory /home/nordlie/download/netcdf-perl-1.2.3/src/perl
>
> make[2]: Entering directory `/home/nordlie/download/netcdf-perl-1.2.3/src/per
l'
> PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
> Can't load 'blib/arch/auto/NetCDF/NetCDF.so' for module NetCDF: blib/arch/aut
o/
> NetCDF/NetCDF.so: undefined symbol: __builtin_alloca at /usr/lib64/perl5/5.8.
0/
> x86_64-linux-thread-multi/DynaLoader.pm line 229.
>  at test.pl line 5
> Compilation failed in require at test.pl line 5.
> BEGIN failed--compilation aborted at test.pl line 5.
> make[2]: *** [test_dynamic] Error 255
> make[2]: Leaving directory `/home/nordlie/download/netcdf-perl-1.2.3/src/perl
'
> make[1]: *** [perl/test] Error 1
> make[1]: Leaving directory `/home/nordlie/download/netcdf-perl-1.2.3/src'
> make: *** [test] Error 2
>
> ------- End of Original Message
>

------- End of Original Message