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

Re: IDL5.4 CALL_EXTERNAL crashes IDL under IRIX



Ole B Christensen wrote:
> 
> Dear all,
> 
> We have recently upgraded from 5.3 to 5.4, using SGI IRIX 6.5. Under IDL
> 5.3 we have been reading GRIB data by linking to a shared library of
> fortran code with call_external. The same call now crashes IDL 5.4with
> the message:
> 
> 276068:/pack/idl5-5.4/idl_5.4/bin/bin.sgi/idl: rld: Fatal Error:
> attempted access to unresolvable symbol in
> /home/climate/idl/fk/lib/libread_grib.so: s_copy
> 
> I hope that somebody will be able to give a clue to what might be the
> problem.
> 
> Any help will be appreciated!
> 
> Greetings, Ole
> 
> The call looks like this:
> 
> tmp = CALL_EXTERNAL( shared_file,entry_name,filename,code,...,read_arr)
> with some LONGs, strings and arrays. The large thing is
> read_arr = FLTARR( 51200L*120L )
> 
> The fortran code is compiled with
> f77 -n32 -c read_grib.f
> ld -n32 -shared read_grib.o -lemos -o libread_grib.so
> 
> excerpts of the fortran:
>       SUBROUTINE read_grib(argc, argv)
>       INTEGER*4 argc, argv(*)
>       j= LOC(argc)
> 
>       CALL read_grib1  ( %VAL(argv(1)
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.


I don't have IDL 5.4 to verify this is correct, but it's fairly likely.

IDL 5.3 is dependent on libidl.so, which is in turn dependent on
libblas.so, which in turn is dependent on libftn.so. So IDL 5.3 itself 
will dynamically link to libftn.so which is where s_copy is defined.

I presume that the library dependencies are different for 5.4, possibly
no longer dependent on libblas.so which IRIX does not install by
default.
This breaks the dependency on libftn.so so it is no longer loaded.

I would re-build your DSO and use f77 to do the linking (this is usually
recommended because compilers know what linker arguments and libraries
are required). f77 will then link using -lf77 and maybe other libraries
it
needs and this will (hopefully) solve your problem.

-- 
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK 
E-mail :    nmw@ion.le.ac.uk 
Phone :     +44 (0)116 2523568, Fax : +44 (0)116 2523555