You are not logged in.

#1 2015-04-23 21:01:19

nanawel
Member
From: Occitanie, FR
Registered: 2012-05-07
Posts: 94
Website

How to compile SubVersioN 1.7.20 without error?

Hi,

I'm using development tools that only support SVN 1.7 format (e.g. PHPStorm so SVNKit 1.7) so I need to compile and install SVN 1.7. What I need precisely is the Gnome Keyring support (be able to store and use usernames/passwords that are managed by Gnome Keyring).

I'm trying to use the dedicated AUR package with a few modifications to make it work (it's currently broken) but I get stuck at compilation if I leave the main options (I've removed Perl support):

# $Id$
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=subversion-1.7
pkgver=1.7.20
pkgrel=2
pkgdesc="A Modern Concurrent Version Control System"
arch=('i686' 'x86_64')
license=('APACHE')
depends=('neon' 'apr-util' 'sqlite' 'file' 'serf' 'systemd')
optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion' \
            'python2: for some hook scripts' 'java-environment') #'ruby: for some hook scripts')
makedepends=('krb5' 'apache' 'python2' 'perl>=5.18' 'swig' 'java-runtime' 'java-environment'
             'autoconf' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs')
backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
url="http://subversion.apache.org/"
provides=('svn' 'subversion')
conflicts=('svn' 'subversion') 
options=('!makeflags' '!libtool' '!emptydirs')
install=${pkgname}.install
source=(http://apache.mirror.rafal.ca/subversion/subversion-$pkgver.tar.bz2 #{,.asc}
        svn
        svnserve.conf
        svnserve.tmpfiles
        svnserve.service
        subversion.rpath.fix.patch)
md5sums=('bf3b7d480bc99d048eaf36a9fc794f9c'
         'a0db6dd43af33952739b6ec089852630'
         'c459e299192552f61578f3438abf0664'
         'bb2857eceafcfac35dde39dcffad2314'
         'e8020c7a1d1a0c47091b5fdd034f81c5'
         '6b4340ba9d8845cd8497e013ae01be3f')


build() {
   cd "${srcdir}/subversion-${pkgver}"
   export PYTHON=/usr/bin/python2

   patch -Np0 -i ../subversion.rpath.fix.patch
   sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/hook-scripts/{,mailer/{,tests/}}*.py

   ./configure --prefix=/opt/subversion-1.7 --with-apr=/usr --with-apr-util=/usr \
               --with-zlib=/usr --with-neon=/usr --with-serf=/usr --with-apxs \
               --with-sqlite=/usr --with-berkeley-db=:/usr/include/:/usr/lib:db-5.3 \
               --enable-javahl --with-gnome-keyring --with-kwallet \
               --with-jdk=/usr/lib/jvm/java-7-openjdk \
               --disable-static

   make external-all
   make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all
   make swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python2.7/site-packages/svn swig-py javahl #swig-pl #swig-rb
}

#check() {
#   cd "${srcdir}/${pkgname}-${pkgver}"
#   export LANG=C LC_ALL=C
#   make check check-swig-pl check-swig-py check-javahl CLEANUP=yes # check-swig-rb
#}

package() {
   cd "${srcdir}/subversion-${pkgver}"

   export LD_LIBRARY_PATH="${pkgdir}"/usr/lib:${LD_LIBRARY_PATH}
   make DESTDIR="${pkgdir}" INSTALLDIRS=vendor \
     swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python2.7/site-packages/svn \
     install install-swig-py install-javahl #install-swig-pl #install-swig-rb

   install -dm755 "${pkgdir}"/usr/share/subversion
   cp -a tools/hook-scripts "${pkgdir}"/usr/share/subversion/
   rm "${pkgdir}"/usr/share/subversion/hook-scripts/*.in

#   rm "${pkgdir}"/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
#   rm -r "${pkgdir}"/usr/lib/perl5/core_perl

   ## svnserve ...

   # xinetd
   install -D -m 644 "${srcdir}"/svn "${pkgdir}"/etc/xinetd.d/svn

   # ... systemd
   install -D -m 644 "${srcdir}"/svnserve.service  "${pkgdir}"/usr/lib/systemd/system/svnserve.service
   install -D -m 644 "${srcdir}"/svnserve.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/svnserve.conf

   # ... common config
   install -D -m 644 "${srcdir}"/svnserve.conf "${pkgdir}"/etc/conf.d/svnserve

   install -Dm 644 tools/client-side/bash_completion \
     "${pkgdir}"/usr/share/bash-completion/completions/subversion
   for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do
      ln -sf subversion "${pkgdir}"/usr/share/bash-completion/completions/${i}
   done
}

I get this error at the end:

.libs/locking_commands.o: In function `organize_lock_targets.isra.1':
locking_commands.c:(.text+0x72b): undefined reference to `svn_wc__node_get_base_rev'
locking_commands.c:(.text+0x76e): undefined reference to `svn_wc__node_get_lock_info'
.libs/merge.o: In function `merge_props_changed':
merge.c:(.text+0x135c): undefined reference to `svn_wc__node_get_base_rev'
.libs/merge.o: In function `merge_reintegrate_cb':
merge.c:(.text+0x4134): undefined reference to `svn_wc__node_get_base_rev'
.libs/merge.o: In function `calculate_remaining_ranges':
merge.c:(.text.unlikely+0x1c07): undefined reference to `svn_wc__node_get_base_rev'
.libs/merge.o: In function `do_merge.isra.42':
merge.c:(.text.unlikely+0x4b1f): undefined reference to `svn_wc__get_server_excluded_subtrees'
.libs/mergeinfo.o: In function `svn_client__get_wc_mergeinfo':
mergeinfo.c:(.text+0xad1): undefined reference to `svn_wc__node_get_base_rev'
mergeinfo.c:(.text+0xc59): undefined reference to `svn_wc__node_get_base_rev'
.libs/patch.o: In function `check_dir_empty.isra.7':
patch.c:(.text+0x299b): undefined reference to `svn_wc__strictly_is_wc_root'
.libs/revert.o: In function `svn_client_revert2':
revert.c:(.text+0x2c3): undefined reference to `svn_wc__strictly_is_wc_root'
.libs/revisions.o: In function `svn_client__get_revision_number':
revisions.c:(.text+0x24d): undefined reference to `svn_wc__node_get_commit_base_rev'
.libs/switch.o: In function `svn_client__switch_internal':
switch.c:(.text+0x563): undefined reference to `svn_wc__node_get_base_rev'
.libs/update.o: In function `update_internal':
update.c:(.text+0x2a6): undefined reference to `svn_wc__node_get_base_rev'
.libs/util.o: In function `svn_client__path_relative_to_root':
util.c:(.text+0x25f): undefined reference to `svn_wc__node_get_repos_relpath'
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'libsvn_client-1.la' with the above command before installing it
build-outputs.mk:956: recipe for target 'install-lib' failed
make: *** [install-lib] Error 1
==> ERROR: A failure occurred in package().
    Aborting...

I also know that if I remove almost all options but gnome-keyring I end up with a binary... that crashes when trying to use gnome-keyring authentication (segfault).

Has anyone succeeded in getting a working SVN 1.7 on an up-to-date Arch?

Thanks in advance

Offline

#2 2015-04-24 08:12:14

nanawel
Member
From: Occitanie, FR
Registered: 2012-05-07
Posts: 94
Website

Re: How to compile SubVersioN 1.7.20 without error?

I've just tested the build from CollabNet (SVN 1.7.19) an it crashes at the very same moment, which makes me think that the issue might not be with SVN but with a third-party library.

Below are the last lines when I run the command with strace (authentication to svn://myhost/myrepo is of course stored in Gnome-Keyring):

$ svn info svn://myhost/myrepo
...
recvmsg(4, 0x7ffdcb0261c0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
getrusage(RUSAGE_SELF, {ru_utime={0, 33333}, ru_stime={0, 13333}, ...}) = 0
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 47923378}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 33333}, ru_stime={0, 13333}, ...}) = 0
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 47953861}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 33333}, ru_stime={0, 13333}, ...}) = 0
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 47975327}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 33333}, ru_stime={0, 13333}, ...}) = 0
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 48018653}) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1b\0\0\0\t\0\0\0\221\0\0\0\1\1o\0\30\0\0\0/org/fre"..., 168}, {"1\0\0\0,\0\0\0/org/freedesktop/secrets"..., 98}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 266
poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\243\0\0\0\230\4\0\0=\0\0\0\6\1s\0\6\0\0\0:1.324\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 243
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
recvmsg(4, 0x7ffdcb0261c0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
getrusage(RUSAGE_SELF, {ru_utime={0, 33333}, ru_stime={0, 13333}, ...}) = 0
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 48160882}) = 0
sendmsg(4, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1/\0\0\0\n\0\0\0\230\0\0\0\1\1o\0,\0\0\0/org/fre"..., 168}, {"\33\0\0\0org.freedesktop.Secret.Item\0"..., 47}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 215
poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\226\0\0\0\231\4\0\0-\0\0\0\6\1s\0\6\0\0\0:1.324\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 214
write(5, "\1\0\0\0\0\0\0\0", 8)         = 8
recvmsg(4, 0x7ffdcb0261c0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

Offline

Board footer

Powered by FluxBB