[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Perl Bindings Linking Problem

From: Alan <lists_at_alan2.com>
Date: 2004-03-13 22:33:04 CET

Howdy,

I am having tremendous problems getting the svn perl bindings to work. I stuck about as much detail in this message as I could think
of, so it is super long. Sorry.

1st let me describe the environment I am working in. This is very likely the cause of the problem, so if somebody knows of a flaw in
my setup (I have my reasons for doing it this way, but if I can make it work another way, that's a start, but I need to do it
without root), let me know:
OS: FreeBSD 4.8-RELEASE
SVN: 1.0.1 (been trying since 1.0.0 came out, hoping 1.0.1 would fix it).
Perl: 5.8.2 compiled with -Dprefix=/usr/tvs/perl
Python: 2.2.3 prefix=/usr/tvs/python
Swig: SWIG-1.3.21 compiled from source with these options:
--with-perl5=/usr/tvs/perl/bin/perl --with-python=/usr/tvs/python/bin --prefix=/usr/tvs/swig
BDB: 4.2.52 --prefix=/usr/tvs/BerkeleyDB4

OK, so with all that set up, I build subversion with this script:
export LD_LIBRARY_PATH="/usr/tvs/BerkeleyDB4/lib"
./configure --with-berkeley-db=/usr/tvs/BerkeleyDB4 \
--prefix=/usr/tvs/subversion --with-dbm=db4 --build=i386-unknown-freebsd4.8 \
--with-ssl --with-zlib --disable-mod-activation \
--enable-swig-bindings=perl --with-swig=/usr/tvs/swig/bin/swig

make, make install

Then, I attempt to build the perl bindings like this:
(I have to call configure again, because if I specify CFLAGS when I am building neon, it pukes, and if I don't, perl pukes)
export LD_LIBRARY_PATH="/usr/tvs/BerkeleyDB4/lib:/usr/tvs/swig/lib"
export PATH="/usr/tvs/python/bin:/usr/tvs/swig/bin:/usr/tvs/perl/bin:${PATH}"
export CFLAGS="-I /usr/tvs/perl/lib/5.8.2/i386-freebsd/CORE"
export CPPFLAGS="$CFLAGS"
./configure --with-berkeley-db=/usr/tvs/BerkeleyDB4 \
--prefix=/usr/tvs/subversion --with-dbm=db4 --build=i386-unknown-freebsd4.8 \
--with-ssl --with-zlib --disable-mod-activation \
--enable-swig-bindings=perl --with-swig=/usr/tvs/swig/bin/swig \
--with-neon=/usr/tvs/subversion \
--with-apr=/usr/tvs/subversion \
--with-apr-util=/usr/tvs/subversion

make swig-pl-lib
make install-swig-pl-lib

cd subversion/bindings/swig/perl
export APR_CONFIG="/usr/tvs/subversion/bin/apr-config"
/usr/tvs/perl/bin/perl Makefile.PL
make all
make install

Now, on to the error
So everything builds just fine.
I can use subversion just fine, all is well except for the perl bindings...
I setup my environment like this:
export LD_LIBRARY_PATH="/usr/tvs/subversion/lib:/usr/tvs/swig/lib:/usr/tvs/BerkeleyDB4/lib"
export PATH="${PATH}:/usr/tvs/bin:/usr/tvs/subversion/bin:/usr/tvs/BerkeleyDB4/bin:/usr/tvs/python/bin"

And I try testing out the perl bindings:
$ /usr/tvs/perl/bin/perl -e "use SVN::Wc"
/usr/libexec/ld-elf.so.1: /usr/tvs/perl/lib/site_perl/5.8.2/i386-freebsd/auto/SVN/_Wc/_Wc.so: Undefined symbol
"SWIG_Perl_TypeRegister"

$ /usr/tvs/perl/bin/perl -e "use SVN::Ra"
/usr/libexec/ld-elf.so.1: /usr/tvs/perl/lib/site_perl/5.8.2/i386-freebsd/auto/SVN/_Ra/_Ra.so: Undefined symbol
"SWIG_Perl_TypeRegister"

Or

$ /usr/tvs/perl/bin/perl -e "use SVN::Core"
BEGIN not safe after errors--compilation aborted at /usr/tvs/perl/lib/site_perl/5.8.2/i386-freebsd/SVN/Core.pm line 100.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

I really have no idea what is going on. I used to get the undefined symbol from all modules, but the core seems to be doing
something different now... But I cant figure out what error it is referencing...

As far as I can tell, it is not having problems finding the swig libraries, because I get a different error if I don't put the right
values in LD_LIBRARY_PATH.

I have also tried compiling everything with LD_RUN_PATH instead of using LD_LIBRARY_PATH at runtime, but it didn't change anything.

I am at a loss... Any help would be greatly appriciated.

-Alan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 13 22:31:02 2004

This is an archived mail posted to the Subversion Users mailing list.