NetBSD-Users archive

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

more tails of woe with the horrors of shared libraries (Undefined symbol "svn_fs_fs__init")



oy, here I go again with weird dynamic loader problems.

$ git svn clone svn://svn.[[edited]]
Can't load 
'/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/SVN/_Core/_Core.so'
 for module SVN::_Core: /usr/pkg/lib/libsvn_fs-1.so.0: Undefined symbol 
"svn_fs_fs__init" (symnum = 54) at 
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/DynaLoader.pm line 230.
 at /usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/SVN/Base.pm 
line 59
BEGIN failed--compilation aborted at 
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/SVN/Core.pm line 
5.
Compilation failed in require at /usr/pkg/libexec/git-core//git-svn line 29.


A casual glance at SVN/_Core/_Core.so shows everything OK:

$ ldd 
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/SVN/_Core/_Core.so
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi/auto/SVN/_Core/_Core.so:
        -lpthread.0 => /usr/lib/libpthread.so.0
        -laprutil-0.0 => /usr/pkg/lib/libaprutil-0.so.0
        -lexpat.1 => /usr/pkg/lib/libexpat.so.1
        -lm.0 => /usr/lib/libm387.so.0
        -lm.0 => /usr/lib/libm.so.0
        -lcrypt.0 => /usr/lib/libcrypt.so.0
        -lapr-0.0 => /usr/pkg/lib/libapr-0.so.0
        -lintl.0 => /usr/lib/libintl.so.0
        -lsvn_client-1.0 => /usr/pkg/lib/libsvn_client-1.so.0
        -lz.1 => /usr/lib/libz.so.1
        -lsvn_delta-1.0 => /usr/pkg/lib/libsvn_delta-1.so.0
        -lsvn_fs-1.0 => /usr/pkg/lib/libsvn_fs-1.so.0
        -lsvn_ra-1.0 => /usr/pkg/lib/libsvn_ra-1.so.0
        -lsvn_repos-1.0 => /usr/pkg/lib/libsvn_repos-1.so.0
        -lsvn_wc-1.0 => /usr/pkg/lib/libsvn_wc-1.so.0
        -lsvn_diff-1.0 => /usr/pkg/lib/libsvn_diff-1.so.0
        -lsvn_subr-1.0 => /usr/pkg/lib/libsvn_subr-1.so.0
        -lsvn_swig_perl-1.0 => /usr/pkg/lib/libsvn_swig_perl-1.so.0
        -lperl => 
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/CORE/libperl.so

$ ldd /usr/pkg/lib/libsvn_fs-1.so.0
/usr/pkg/lib/libsvn_fs-1.so.0:
        -lm.0 => /usr/lib/libm387.so.0
        -lm.0 => /usr/lib/libm.so.0
        -lcrypt.0 => /usr/lib/libcrypt.so.0
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lapr-0.0 => /usr/pkg/lib/libapr-0.so.0
        -lintl.0 => /usr/lib/libintl.so.0


However indeed things are apparently busted here:

$ nm /usr/pkg/lib/libsvn_fs-1.so.0 | fgrep svn_fs_fs
         U svn_fs_fs__init


Oh, how I hate and dread stupid dynamically loaded modules and libraries!

Why oh why oh why oh why didn't this fail during the build!?!?!?!?!?!?!?


According to google someone did report the same error message on the
Subversion users mailing list, but there was no real explanation and his
supposed solution is totally inapplicable to my configuration.


Turns out the real problem was that libsvn_fs-1.so _should_ depend on
libsvn_fs_fs.1.so, but because of twisted lossage somehow this fact
fails to get registered if you're trying to build both static and
dynamic libraries (which should be possible -- it works if you do it
correctly).

Oddly the static link of svn itself works, but it leaves the shared
libraries in a shambles and p5-subversion broken as above.

libtool really must be abolished.  Few people seem to learn to use it
properly, and partly because it's still broken by design after all these
years.

Sigh.

-- 
                                                Greg A. Woods
                                                Planix, Inc.

<woods%planix.com@localhost>       +1 416 218 0099        http://www.planix.com/

Attachment: pgpp9sa7qDMm5.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index