Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682802 - dev-vcs/svn2git-1.0.13 : /.../ld: svn.o: undefined reference to symbol svn_fs_file_contents
Summary: dev-vcs/svn2git-1.0.13 : /.../ld: svn.o: undefined reference to symbol svn_fs...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-07 08:54 UTC by Toralf Förster
Modified: 2019-04-17 22:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.12 KB, text/plain)
2019-04-07 08:54 UTC, Toralf Förster
Details
dev-vcs:svn2git-1.0.13:20190406-213742.log (dev-vcs:svn2git-1.0.13:20190406-213742.log,8.00 KB, text/plain)
2019-04-07 08:54 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,131.93 KB, text/plain)
2019-04-07 08:54 UTC, Toralf Förster
Details
environment (environment,63.59 KB, text/plain)
2019-04-07 08:54 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.10 KB, application/x-bzip)
2019-04-07 08:54 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,16.95 KB, application/x-bzip)
2019-04-07 08:54 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-04-07 08:54:00 UTC
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=native -Wall -W -D_REENTRANT -fPIC -DVER="\"1.0.13\"" -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I. -isystem /usr/include/subversion-1 -isystem /usr/include/apr-1 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o CommandLineParser.o CommandLineParser.cpp
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -o ../svn-all-fast-export ruleparser.o repository.o svn.o main.o CommandLineParser.o   -L -lsvn_fs-1 -lsvn_repos-1 -lapr-1 -lsvn_subr-1 -lQt5Core -lpthread   
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: svn.o: undefined reference to symbol 'svn_fs_file_contents'
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libsvn_fs-1.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:245: ../svn-all-fast-export] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop_abi32+64_20190403-102005

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems) *
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.10.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO dev-vcs/svn2git
[ebuild  N    ] dev-vcs/svn2git-1.0.13
Comment 1 Toralf Förster gentoo-dev 2019-04-07 08:54:03 UTC
Created attachment 572138 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-04-07 08:54:06 UTC
Created attachment 572140 [details]
dev-vcs:svn2git-1.0.13:20190406-213742.log
Comment 3 Toralf Förster gentoo-dev 2019-04-07 08:54:09 UTC
Created attachment 572142 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-04-07 08:54:12 UTC
Created attachment 572144 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-04-07 08:54:15 UTC
Created attachment 572146 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-04-07 08:54:17 UTC
Created attachment 572148 [details]
temp.tbz2
Comment 7 Sebastian Pipping gentoo-dev 2019-04-07 19:56:42 UTC
The "-L -lsvn_fs-1" in the first post is odd: -L would need a directory argument and sees to swallow up the "-lsvn_fs-1" so that that the linker does not use libsvn_fs-1.so, as needed.

In src/Makefile line

  LIBS          = $(SUBLIBS) -lsvn_fs-1 -lsvn_repos-1 -lapr-1 -lsvn_subr-1 -lQt5Core -lpthread 

seems to get SUBLIBS set to "-L" from somewhere, while I cannot find any use of SUBLIBS in the rest of the build system.

Toralf, any chance you could trace the source of SUBLIBS in your environment?
dev-vcs/subversion-1.11.1 and dev-vcs/svn2git-1.0.13 compile without issues in my environment.  Thank you!
Comment 8 Björn Kautler 2019-04-11 23:50:49 UTC
(In reply to Sebastian Pipping from comment #7)
> The "-L -lsvn_fs-1" in the first post is odd: -L would need a directory
> argument and sees to swallow up the "-lsvn_fs-1" so that that the linker
> does not use libsvn_fs-1.so, as needed.

Totally correct

> In src/Makefile line
> 
>   LIBS          = $(SUBLIBS) -lsvn_fs-1 -lsvn_repos-1 -lapr-1 -lsvn_subr-1
> -lQt5Core -lpthread 
> 
> seems to get SUBLIBS set to "-L" from somewhere, while I cannot find any use
> of SUBLIBS in the rest of the build system.

Nope

> Toralf, any chance you could trace the source of SUBLIBS in your environment?

He will not be able to find it.

The problem is in src/src.pro from which src/Makefile is generated.
There the isEmpty check for SVN_LIBDIR is done wrongly.
On some systems, including all I used so far, this always evaluates to false and all is fine.
But on some systems or with some versions of Qt, dunno whom to blame, this always evaluates to true but then when it is substitued after the "-L", it is empty.

You can easily reproduce the error using

docker run -it --rm archlinux/base
pacman --noconfirm -Sy git gcc make qt5-base apr subversion
git clone https://github.com/svn-all-fast-export/svn2git
cd svn2git
qmake
make

Where on first run (when there is no src/Makefile, so generation is done) there even is a pretty clear error message "/svn2git/src/src.pro:31: isEmpty(var) requires one argument.".

At https://github.com/svn-all-fast-export/svn2git/pull/72 you can find a PR that fixes it.
Comment 9 Larry the Git Cow gentoo-dev 2019-04-17 21:58:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fbb5f0e32f5eab40f8cf30a73c5002139b3c347

commit 6fbb5f0e32f5eab40f8cf30a73c5002139b3c347
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2019-04-17 21:57:51 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2019-04-17 21:58:29 +0000

    dev-vcs/svn2git: Fix compilation
    
    Closes: https://bugs.gentoo.org/682802
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>
    Package-Manager: Portage-2.3.62, Repoman-2.3.12

 dev-vcs/svn2git/files/svn2git-1.0.13-src-pro.patch | 23 ++++++++++
 dev-vcs/svn2git/svn2git-1.0.13-r1.ebuild           | 51 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)
Comment 10 Sebastian Pipping gentoo-dev 2019-04-17 22:03:13 UTC
(In reply to Björn Kautler from comment #8)
> The problem is in src/src.pro from which src/Makefile is generated.
> There the isEmpty check for SVN_LIBDIR is done wrongly.
> On some systems, including all I used so far, this always evaluates to false
> and all is fine.
> But on some systems or with some versions of Qt, dunno whom to blame, this
> always evaluates to true but then when it is substitued after the "-L", it
> is empty.
> 
> You can easily reproduce the error using
> 
> docker run -it --rm archlinux/base
> pacman --noconfirm -Sy git gcc make qt5-base apr subversion
> git clone https://github.com/svn-all-fast-export/svn2git
> cd svn2git
> qmake
> make
> 
> Where on first run (when there is no src/Makefile, so generation is done)
> there even is a pretty clear error message "/svn2git/src/src.pro:31:
> isEmpty(var) requires one argument.".
> 
> At https://github.com/svn-all-fast-export/svn2git/pull/72 you can find a PR
> that fixes it.

Great analysis and thanks for taking the patch upstream, very nice!

While the new release 1.0.14 contains that fix of yours, it seems to have other Qt-related compile issues (reported at https://github.com/svn-all-fast-export/svn2git/issues/73) so I cherry-picked you patch to 1.0.13-r1 in Gentoo for now.