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

Re: 19990104: Udunits: building on Linux 5.1



Robert,

>Date: Mon, 04 Jan 1999 14:00:04 -0500
>From: Robert Boucher <address@hidden>
>Organization: Litton-TASC
>To: Steve Emmerson <address@hidden>
>Subject: Re: 19990104: Udunits: building on Linux 5.1
>Keywords: 199812312105.OAA14114

In the above message, you wrote:

> Here are the contents of test.log and make.log:
> 
> Make.log
> 
> making `all' in directory /data1/udunits-1.11.7/src/port
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/port'
> 
> making `all' in directory /data1/udunits-1.11.7/src/port/misc
> 
> make[2]: Entering directory `/data1/udunits-1.11.7/src/port/misc'
> pgcc -c -O -I.  -D_REENTRANT -Df2cFortran uddummy.c
> ar rcuv libudport.a uddummy.o
> a - uddummy.o
> case "" in \
> '') ;; \
> *)  ar rucv libudport.a ;; \
> esac
> ranlib libudport.a
> make[2]: Leaving directory `/data1/udunits-1.11.7/src/port/misc'
> 
> returning to directory /data1/udunits-1.11.7/src/port
> 
> 
> making `all' in directory /data1/udunits-1.11.7/src/port/cfortran
> 
> make[2]: Entering directory `/data1/udunits-1.11.7/src/port/cfortran'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/data1/udunits-1.11.7/src/port/cfortran'
> 
> returning to directory /data1/udunits-1.11.7/src/port
> 
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/port'
> 
> returning to directory /data1/udunits-1.11.7/src
> 
> 
> making `all' in directory /data1/udunits-1.11.7/src/lib
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/lib'
> ln -s ../port/misc/udalloc.c .
> ln -s ../port/misc/udalloc.h .
> pgcc -c -O -I../port/misc -I../port/cfortran
> -DUT_DEFAULT_PATH='"/data1/udunits-1.11.7/etc/udunits.dat"' -Df2cFortran
> utlib.c
> pgcc -c -O -I../port/misc -I../port/cfortran
> -DUT_DEFAULT_PATH='"/data1/udunits-1.11.7/etc/udunits.dat"' -Df2cFortran
> utparse.c
> pgcc -c -O -I../port/misc -I../port/cfortran
> -DUT_DEFAULT_PATH='"/data1/udunits-1.11.7/etc/udunits.dat"' -Df2cFortran
> utscan.c
> PGC-W-0221-Redefinition of symbol offsetof
> (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC-W-0258-Argument 1 in macro offsetof is not identical to previous
> definition (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC-W-0258-Argument 2 in macro offsetof is not identical to previous
> definition (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC/x86 Linux/x86 Rel 1.7-6.3: compilation completed with warnings
> pgcc -c -O -I../port/misc -I../port/cfortran
> -DUT_DEFAULT_PATH='"/data1/udunits-1.11.7/etc/udunits.dat"' -Df2cFortran
> udalloc.c
> ar rcuv libudunits.a utlib.o utparse.o utscan.o udalloc.o
> a - utlib.o
> a - utparse.o
> a - utscan.o
> a - udalloc.o
> case "" in \
> '') ;; \
> *)  ar rucv libudunits.a ;; \
> esac
> ranlib libudunits.a
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/lib'
> 
> returning to directory /data1/udunits-1.11.7/src
> 
> 
> making `all' in directory /data1/udunits-1.11.7/src/udunits
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/udunits'
> make[2]: Entering directory `/data1/udunits-1.11.7/src/udunits'
> pgcc -c -O -I../lib -I../port/misc -Df2cFortran udunits.c
> pgcc -o udunits -O udunits.o -L/data1/udunits-1.11.7/src/lib -ludunits
> -L/data1/udunits-1.11.7/src/port/misc -ludport
> Linking:
> make[2]: Leaving directory `/data1/udunits-1.11.7/src/udunits'
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/udunits'
> 
> returning to directory /data1/udunits-1.11.7/src
> 
> cd perl && perl Makefile.PL
> Warning: -L../lib changed to -L/data1/udunits-1.11.7/src/perl/../lib
> Checking if your kit is complete...
> Looks good
> Writing Makefile for UDUNITS
> 
> making `dynamic' in directory /data1/udunits-1.11.7/src/perl
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/perl'
> /usr/bin/perl -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5
> /usr/lib/perl5/ExtUtils/xsubpp  -typemap /usr/lib/perl5/ExtUtils/typemap
> -typemap typemap UDUNITS.xs >UDUNITS.tc && mv UDUNITS.tc UDUNITS.c
> Please specify prototyping behavior for UDUNITS.xs (see perlxs manual)
> pgcc -c -I../lib -I../port/misc -Dbool=char -DHAS_BOOL
> -I/usr/local/include -O2    -DVERSION=\"1.11.7\" -DXS_VERSION=\"1.11.7\"
> -fpic -I/usr/lib/perl5/i386-linux/5.00404/CORE -Df2cFortran UDUNITS.c
> PGC-W-0221-Redefinition of symbol offsetof
> (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC-W-0258-Argument 1 in macro offsetof is not identical to previous
> definition (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC-W-0258-Argument 2 in macro offsetof is not identical to previous
> definition (///usr/local/pgi/linux86/include/stddef.h: 308)
> PGC/x86 Linux/x86 Rel 1.7-6.3: compilation completed with warnings
> mkdir ./blib
> mkdir ./blib/arch
> mkdir ./blib/arch/auto
> mkdir ./blib/arch/auto/UDUNITS
> Running Mkbootstrap for UDUNITS ()
> chmod 644 UDUNITS.bs
> LD_RUN_PATH="/data1/udunits-1.11.7/src/perl/../lib:/lib" cc -o
> blib/arch/auto/UDUNITS/UDUNITS.so  -shared -L/usr/local/lib UDUNITS.o
> -L/data1/udunits-1.11.7/src/perl/../lib -ludunits -lm
> chmod 755 blib/arch/auto/UDUNITS/UDUNITS.so
> cp UDUNITS.bs ./blib/arch/auto/UDUNITS/UDUNITS.bs
> chmod 644 blib/arch/auto/UDUNITS/UDUNITS.bs
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/perl'
> 
> returning to directory /data1/udunits-1.11.7/src

The above look OK.

> Test.log
> 
> making `test' in directory /data1/udunits-1.11.7/src/udunits
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/udunits'
> make[2]: Entering directory `/data1/udunits-1.11.7/src/udunits'
> make[2]: `udunits' is up to date.
> make[2]: Leaving directory `/data1/udunits-1.11.7/src/udunits'
> ./udunits ../lib/udunits.dat <test.in | sed 's/\.00* UTC/.00 UTC/' \
>     >test.out
> Success!
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/udunits'
> 
> returning to directory /data1/udunits-1.11.7/src
> 
> 
> making `dynamic' in directory /data1/udunits-1.11.7/src/perl
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src/perl'
> make[1]: Leaving directory `/data1/udunits-1.11.7/src/perl'
> 
> returning to directory /data1/udunits-1.11.7/src
> 
> make[1]: Entering directory `/data1/udunits-1.11.7/src'
> 
> making `test' in directory /data1/udunits-1.11.7/src/perl
> 
> make[2]: Entering directory `/data1/udunits-1.11.7/src/perl'
> mkdir ./blib/lib
> mkdir ./blib/lib/auto
> mkdir ./blib/lib/auto/UDUNITS
> cp UDUNITS.pm ./blib/lib/UDUNITS.pm
> AutoSplitting UDUNITS (./blib/lib/auto/UDUNITS)
> PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
> -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 test.pl
> Can't load './blib/arch/auto/UDUNITS/UDUNITS.so' for module UDUNITS:
> ./blib/arch/auto/UDUNITS/UDUNITS.so: undefined symbol: __mth_i_dpowd at
> /usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm line 166.
> 
>  at test.pl line 4
> BEGIN failed--compilation aborted at test.pl line 4.
> make[2]: *** [test_dynamic] Error 2
> make[2]: Leaving directory `/data1/udunits-1.11.7/src/perl'
> make[1]: *** [perl/test] Error 1
> make[1]: Leaving directory `/data1/udunits-1.11.7/src'
> make: *** [perl_test] Error 2

It appears from the above that attempting to use the UDUNITS perl
extension module results in an unresolved reference for the symbol
"__mth_i_dpowd".  I've never seen this symbol before, so I don't know
what is referencing it.

Here are some possibilities:

    1.  Do you need the perl extension module?  If not, then you can
        skip building and installing it and your UDUNITS library should
        work just fine.  To skip the perl extension module do the
        following:

            1.  Go to the top-level source directory.

            2.  Execute the command "make distclean".

            3.  Set your environment variables as before.  Remember to
                have CPPFLAGS contain the string "-Df2cFortran".

            4.  Set the environment variable PERL to the empty string,
                e.g.

                    % setenv PERL ''

                or

                    $ export PERL=''

            5.  Execute the configure script.  Redirect as before.

            6.  Execute the command "make".  Redirect as before.

            7.  Execute the command "make test".  Redirect as before.

            8.  Execute the command "make install".  Redirect as before.

            9.  Execute the command "make clean".

    2.  If you need the UDUNITS perl extension module, then is the
        compiler that you're using (pgcc) the same one that was used to
        build the perl utility?  If not, then you have to ensure that
        you use the same compiler.

    3.  There might be a library somewhere that contains a definition
        for the unresolved symbol (__mth_i_dpowd).  Try using the
        "nm" utility to find it.  When you've found it, add a
        reference to that library to the LIBS variable in the makefile
        "perl/Makefile.PL".  Then go to the top-level source directory
        and execute the following commands:

            make perl/clean
            make perl/all
            make perl/test

Please let me know which possibility you wish to persue.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>