On Tuesday, Nov 25, 2003, at 16:18 US/Pacific, Ying Liu wrote: [..]
Just installed the Tk package. I got an error:
ld.so.1: /bin/perl: fatal: relocation error: file
/mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/ Event/Event.so
: symbol Perl_get_sv: referenced symbol not found
Killed
Anyone can tell me what's that? How to fix it? Thanks, Ying
not sure how much you already know about 'so' files, 'shared objects' - it is 'compiled code' like a perl module, but in the native language of the OS. so given your path, we are to assume then that you built(???) and/or downloaded for solaris? And that you are running this on a Solaris machine???
Ok, this is where things can get a bit dicey, so bear with me:
vladimir: 68:] pwd ; nm -a *.so | grep -i perl /usr/local/lib/perl5/5.6.1/sun4-solaris-64int/auto/Socket U Perl_croak U Perl_form U perl_get_sv U Perl_mg_set U Perl_newSViv U Perl_newSVpvn U Perl_newXS U Perl_stack_grow U Perl_sv_2iv U Perl_sv_2mortal U Perl_sv_2pv U Perl_sv_2uv U Perl_sv_newmortal U Perl_sv_setnv U Perl_sv_setpvn vladimir: 69:]
our friend 'nm' - ( cf "man nm" ) is great for listing the 'symbols' in a shared object. and in this case I thought I would use the Socket.so, and pick out only the "Perl" symbols.
Since I can never remember where "CORE" is, and we are presuming here that your Perl was built with Dynamic Linking, or YOU ARE SOOOO TOAST, you too can check with "perl -V" and in the section where it talks about
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/local/lib/perl5/5.6.1/sun4-solaris-64int/CORE'
cccdlflags='-fPIC', lddlflags='-G'
that "-R" flag is where we are going to go and see if we can find the relocatable symbol we want Resolved.
vladimir: 80:] cd /usr/local/lib/perl5/5.6.1/sun4-solaris-64int/CORE vladimir: 81:] nm libperl.so | grep perl_get_sv 00021bcc T perl_get_sv vladimir: 82:]
and in my case, I see the symbol being defined in the libperl.so right where I would expect it to be.
If on the other hand your version of perl was not built with Dynamic Linking, that part where you are Soooo Toast, you need to
a. build your perl that way, if you want to use the dynamic linking capability
b. build the version of Tk with the current version of perl that you will be using
c. download and install a static version of the Tk tool set so that all external references are resolved from what would be libperl.a at compile time, rather than from libperl.so at run time.
Hope that Helps, a bit long, but not a simple issue, eh what?
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]