comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » call_external: ld.so.1 relocation error
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
call_external: ld.so.1 relocation error [message #23769] Mon, 12 February 2001 14:12
rother is currently offline  rother
Messages: 9
Registered: April 2000
Junior Member
hi wizards!

I used 'call_external' very exceptionally yet. now I run into a
'relocation error' while executing 'call_external' -- with a very
simple test-application too. the IDL 'call_external' demo is still
running, but as my fortran-code is calling 'atan' (or other
trig.-functions.), the 'ld.so.1' fails to resolve the symbol.
'make' is designed to call:

/opt/zrt_opt/SUNWspro/bin/f77 -pic -G test.f -o test.so -lF77 -lm -lc -lM77
test.f:
test:
test_slave:

and 'ldd' on 'test.so' seems to be fine:

libF77.so.4 => /opt/zrt_opt/SUNWspro/lib/libF77.so.4
libm.so.1 => /opt/zrt_opt/SUNWspro/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libM77.so.2 => /opt/zrt_opt/SUNWspro/lib/libM77.so.2
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1

but my 'test.pro' crashes IDL with:

IDL >> test
ld.so.1: /opt/rsi/idl_5.4/bin/bin.solaris2.sparc/idl: \
fatal: relocation error: \
file /home/mt/rother/prj/champ/Lib/ME/6/test.so: \
symbol __atanf: referenced symbol not found

Killed

(but 'atan' seems to be in 'libM77.so.2'!)

I'm running IDL 5.4 on a sparc box (solaris 2.7).
I apologize, if this is a FAQ (but I failed searching 'dejanews'
-- which seems to be gone).

many thanks for hints.
martin.
--
Martin Rother (rother@gfz-potsdam.de) 0331/ 288-1272 Division 2.3
GeoForschungsZentrum Potsdam, Germany

here the simple code:
------------------------------------------cut here--------------------
SUBROUTINE test(argc, argv)

IMPLICIT NONE
!=========================================================== ==========
INTEGER*4 argc
INTEGER*4 argv(*)
INTEGER*4 j

!=========================================================== ====

j=LOC(argc)

CALL test_slave
. (
. %VAL(argv(1))
. )

return
end

!=========================================================== ==========
! SLAVE
!=========================================================== ==========

SUBROUTINE test_slave
. (
. result
. )
IMPLICIT NONE
!=========================================================== ====

REAL*8 result

result = atan(0.5)

return
end
!=========================================================== ==========
! EOF test.f
!=========================================================== ==========

-----------------------------------------------cut here---------------

pro test

;=========================================================== ==========
;
;=========================================================== ==========

result = 0.0D00

s = CALL_EXTERNAL( $
"/home/mt/rother/prj/champ/Lib/ME/6/test.so", $
"test_", $
result $
)

print, 'result = ', result

return
END
;=========================================================== ==========
; EOF test
;=========================================================== ==========
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: calling C++ from IDL - throwing exceptions
Next Topic: Typing in a widget_text crashes my C program!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 13:48:04 PDT 2025

Total time taken to generate the page: 0.15956 seconds