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

Re: HP-UX 10.20 mexcdf53 linking: symbol "$00000003"



Manual,

> To: address@hidden
> From: Manual Lopez <address@hidden>
> Subject: question on netcdf 3.4
> Organization: WHOI
> Keywords: 199810081936.NAA12693

In the above message, you wrote:

>   I recently installed netcdf on a HP 715/100 running HPUX
> 10.20. Apparently the installation went fine. I need netcdf in order
> to build mexcdf53 (a matlab 5 netcdf interface). When I try to build
> mexcdf53 I get a linking error. I have been advised by the people
> at mathworks that mex files on an HP have to be built as Position
> Independent Code (PIC), an so I would like to know if the static
> library libnetcdf.a contains PIC code. If not, they have advised me
> to try to use a shared version of the library. Is it posible to build
> libnetcdf as a shared library? How could I do that?  In case you have
> any ideas on how to overcome the problem, I reproduce here the error
> of the linker
> 
> -> ld  -b +e mexFunction +e mexVersion -o mexcdf53.mexhp7  mexcdf53.o 
> mexversion.o  /utilerias/netcdf3/lib/libnetcdf.a 
>  
> ld: Invalid loader fixup for symbol "$00000003".

We've seen this problem before.  Unfortunately, we don't know the cause.
There are 2 things you could try, however, that might fix the problem.

    1.  Compile with the "+z" option.  To do this, do the following:

        a.  Go to the top-level netcdf source directory.

        b.  Execute the command "make distclean".

        c.  Remove the file "config.cache" if it exists.

        d.  Set your environment variables as before.

        e.  Ensure that the environment variables CFLAGS and FFLAGS
            contain the string "+z".

        f.  Execute the configure script.

        g.  Continue with "make", "make test", "make install", and "make
            clean".

and/or

    2.  Apply the following patch to the loader:

            
ftp://i3107ffs.external.hp.com/hp-ux_patches/s700_800/10.X/PHSS_15391

        then do steps a-g above.

Please let me know if this helps.

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