Subject: cannot reolve symbol
To: None <current-users@NetBSD.ORG>
From: Andreas Wrede <>
List: current-users
Date: 06/06/1998 09:30:21
Since upgrading from 1.3 to -current a couple of weeks ago I have a two
perl applications (pilot-link's sync-plan and p5-tk's tkmib) for which 
appears to be unable to find some symbols. Compiling a with DEBUGing 
and turning Perl's dl_debug on shows the following:

$ PERL_DL_DEBUG=4 ktrace /usr/local/bin/perl -w  /usr/local/bin/sync-plan
[snipped some debug output]
DynaLoader::bootstrap for MD5 (auto/MD5/
dl_load_file(/usr/pkg/lib/perl5/site_perl/i386-netbsd/auto/MD5/,0): map1: 0x40139000 for 0x3000
dl_find_symbol(handle=400176c0, symbol=_boot_MD5)
  symbolref = 40139664
dl_install_xsub(name=MD5::bootstrap, symref=40139664)
 BINDER: _Perl_newXS located at = 0x400425b0 in /usr/pkg/lib/perl5/i386-netbsd/5.00404/CORE/
DynaLoader::bootstrap for PDA::Pilot (auto/PDA/Pilot/
map1: 0x4013c000 for 0x2f7a8
map1: 0x4016f000 for 0x3553c
/usr/libexec/ Undefined symbol "_MailSyncTypeNames" in perl:/usr/pkg/lib/perl5/site_perl/i386-netbsd/auto/PDA/Pilot/

The symbol _MailSyncTypeNames is defined here: nm /usr/local/lib/ |grep _MailSyncTypeName
00015524 D _MailSyncTypeNames

and a ktrace reveals that dlopen accesses the file and then 
opens and mmaps the correct library before failing to resolve the symbol.

When running tkmib, the unresolved symbol is different (__XInitImageFuncPtrs 
in but the scenario leading up to the error are similar. In 
both cases the unresolved symbol is needed in a Perl library 
(_MailSyncTypeNames in /usr/pkg/lib/perl5/site_perl/i386-netbsd/auto/PDA/Pilot/,0 
and __XInitImageFuncPtrs in /usr/pkg/lib/perl5/site_perl/i386-netbsd/auto/Tk/

Is anyone else running sync-plan or tkmib on -current?  

BTW, this is on i386/current as of June 3,  with UVM and PMAP_NEW turned on. 
All programs in question (Perl, p5-tk, pilot-link) were build fresh from 
packages in /usr/pkgsrc.

Andreas Wrede              Planix, Inc.         Networking, System Administration, Consulting      Toronto, Ontario, Canada