Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 725850 - dev-vcs/subversion-1.14.0 fails to build if USE=python enabled
Summary: dev-vcs/subversion-1.14.0 fails to build if USE=python enabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
: 725848 (view as bug list)
Depends on:
Blocks: 735342
  Show dependency tree
 
Reported: 2020-05-28 07:50 UTC by Adam Jones
Modified: 2020-09-19 09:54 UTC (History)
17 users (show)

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


Attachments
emerge --info (einfo.txt,8.51 KB, text/plain)
2020-05-28 07:50 UTC, Adam Jones
Details
build.log (build.log,376.32 KB, text/plain)
2020-05-28 07:51 UTC, Adam Jones
Details
py3c 1.1 (subversion-1.14.0-py3c-1.1.patch,15.91 KB, patch)
2020-06-05 13:55 UTC, Chris Mayo
Details | Diff
Patch ebuild for building Python bindings (subversion-1.14.0.ebuild-python.patch,1.37 KB, patch)
2020-06-05 13:57 UTC, Chris Mayo
Details | Diff
Patch ebuild for building Python bindings (subversion-1.14.0.ebuild-python.patch,1.51 KB, patch)
2020-06-05 14:24 UTC, Chris Mayo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jones 2020-05-28 07:50:01 UTC
Created attachment 642314 [details]
emerge --info

subversion 1.14.0 fails to build if USE=python is enabled.  autoconf reports:

checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: WARNING: Python.h not found; disabling python swig bindings

Build then fails later with:

Transforming tools/dev/x509-parser
 * python3_7: running swig_py_compile
 * python_export() is part of private eclass API.
 * Please call python_get*() instead.
make -j16 swig-py swig_pydir=/usr/lib/python3.7/site-packages/libsvn swig_pydir_extra=/usr/lib/python3.7/site-packages/svn 
/bin/sh "/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/libtool" --tag=CC --silent --mode=compile none  -P -I/usr/include/libutf8proc  -DLINUX -D_REENTRANT -D_GNU_SOURCE  -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/include -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/include -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/proxy -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/proxy -I/usr/include/apr-1  -I/usr/include/apr-1 -I/usr/include/db6.0 -I/usr/include/python3.7m  -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/python/libsvn_swig_py -prefer-pic -c -o subversion/bindings/swig/python/svn_client.lo subversion/bindings/swig/python/svn_client.c
/bin/sh "/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/libtool" --tag=CC --silent --mode=compile none -P -I/usr/include/libutf8proc  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -DSWIGPYTHON -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/include -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/include -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/proxy -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/proxy -I/usr/include/apr-1  -I/usr/include/apr-1 -I/usr/include/db6.0 -I/usr/include/python3.7m  -I/var/tmp/portage/dev-vcs/subversion-1.14.0/work/subversion-1.14.0/subversion/bindings/swig/python/libsvn_swig_py -I./subversion/include -I./subversion -I/usr/include/apr-1   -I/usr/include/apr-1 -I/usr/include/db6.0 -I/usr/include/db6.0 -pthread -I/usr/include/libsecret-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/lib64/libffi/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/serf-1  -o subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.lo -c subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
SWIG python disabled at configure time: no Python.h found
make: *** [build-outputs.mk:67: .swig_py_checked] Error 1
Comment 1 Adam Jones 2020-05-28 07:50:21 UTC
Building with USE=-python works around the issue
Comment 2 Adam Jones 2020-05-28 07:51:12 UTC
Created attachment 642316 [details]
build.log
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-05-28 08:55:56 UTC

*** This bug has been marked as a duplicate of bug 725848 ***
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-05-28 11:41:03 UTC
*** Bug 725848 has been marked as a duplicate of this bug. ***
Comment 5 Barry Schwartz 2020-06-03 16:50:42 UTC
(In reply to Jeroen Roovers from comment #3)
> 
> *** This bug has been marked as a duplicate of bug 725848 ***

There appears to be a ‘marked as a duplicate’ loop: the two bugs are marked as duplicates of each other.
Comment 6 Chris Mayo 2020-06-05 13:55:26 UTC
Created attachment 643540 [details, diff]
py3c 1.1

First problem: not detecting Python.h

Second problem: py3c required
https://subversion.apache.org/docs/release-notes/1.14#py3c

Attached patch adds py3c (it is headers only) taken from v1.1 (MIT):
https://github.com/encukou/py3c/releases
Comment 7 Chris Mayo 2020-06-05 13:57:26 UTC
Created attachment 643542 [details, diff]
Patch ebuild for building Python bindings

This gets the ebuild working for me (with the py3c patch).

BUT... Needs checking, especially the PYTHON_INCLUDEDIR stuff. This is only configuring for one version of Python?
Comment 8 Chris Mayo 2020-06-05 14:24:03 UTC
Created attachment 643544 [details, diff]
Patch ebuild for building Python bindings

Add python_optimize.

(N.B. the py3c patch is rather large for FILESDIR)
Comment 9 Mikkl 2020-06-30 18:33:10 UTC
For the first problem it seems that when configure is searching for python header
(checking for Python includes... (cached) -I$(PYTHON_INCLUDEDIR)) $(PYTHON_INCLUDEDIR) is substituted with '/usr/include/python3.7' but on my system it is 'usr/include/python3.7m' (note the m at the end).
Comment 10 Chris Mayo 2020-07-02 18:51:34 UTC
N.B. dev-python/ctypesgen-0_p72-r1 is Python 2 only.

bug 730474 raised for update to 1.0.2, renames ctypesgen.py to ctypesgen requiring an additional line in subversion ebuild:

--with-ctypesgen="${EPREFIX}/usr/bin/ctypesgen"
Comment 11 Joakim Tjernlund 2020-07-07 09:53:15 UTC
(In reply to Mikkl from comment #9)
> For the first problem it seems that when configure is searching for python
> header
> (checking for Python includes... (cached) -I$(PYTHON_INCLUDEDIR))
> $(PYTHON_INCLUDEDIR) is substituted with '/usr/include/python3.7' but on my
> system it is 'usr/include/python3.7m' (note the m at the end).

Should probably use pkg-config for that:
# > pkg-config python-3.7 --cflags-only-I
-I/usr/include/python3.7m
Comment 12 Joakim Tjernlund 2020-07-07 10:00:12 UTC
(In reply to Chris Mayo from comment #7)
> Created attachment 643542 [details, diff] [details, diff]
> Patch ebuild for building Python bindings
> 
> This gets the ebuild working for me (with the py3c patch).

Probably better to add py3c to SRC_URI or its own ebuild
Comment 13 Silvio 2020-08-30 20:18:02 UTC
any solution?
Comment 14 Russell Dwiggins 2020-09-03 16:21:24 UTC
The ebuild and patch file posted by Chris Mayo werk here as well. If I understand correctly, this is just a workaournd rather than a fix.
Comment 15 Joakim Tjernlund 2020-09-03 17:49:24 UTC
Added py3c to SRC_URI instead.

--- /usr/portage/dev-vcs/subversion/subversion-1.14.0.ebuild	2020-05-27 23:09:09.000000000 +0200
+++ subversion-1.14.0.ebuild	2020-09-03 19:41:42.327621892 +0200
@@ -12,10 +12,12 @@
 inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 flag-o-matic java-pkg-opt-2 libtool perl-module ruby-single toolchain-funcs xdg-utils
 
 MY_P="${P/_/-}"
+MY_PY3C_V="1.1"
 DESCRIPTION="Advanced version control system"
 HOMEPAGE="https://subversion.apache.org/"
 SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2
-	https://dev.gentoo.org/~polynomial-c/${PN}-1.10.0_rc1-patches-1.tar.xz"
+	https://dev.gentoo.org/~polynomial-c/${PN}-1.10.0_rc1-patches-1.tar.xz
+	https://github.com/encukou/py3c/archive/v${MY_PY3C_V}.tar.gz"
 S="${WORKDIR}/${MY_P}"
 
 LICENSE="Subversion GPL-2"
@@ -212,7 +214,10 @@
 	)
 
 	if use python || use perl || use ruby; then
-		myconf+=( --with-swig )
+		myconf+=(
+			--with-py3c="${WORKDIR}/py3c-${MY_PY3C_V}"
+			--with-swig
+		)
 	else
 		myconf+=( --without-swig )
 	fi
@@ -269,10 +274,11 @@
 	# https://bugs.gentoo.org/721300
 	append-cppflags -I"${EPREFIX}"/usr/include/libutf8proc
 
+	python_get_includedir
 	# allow overriding Python include directory
 	ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby${RB_VER}" "none") \
 	ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc${RB_VER}" "none") \
-	ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \
+	ac_cv_python_includes="-I${PYTHON_INCLUDEDIR}" \
 	econf "${myconf[@]}"
 }
 
@@ -294,7 +300,7 @@
 			rm -f ${p} || die
 			ln -s "${BUILD_DIR}" ${p} || die
 
-			python_export PYTHON_INCLUDEDIR
+			python_get_includedir
 			emake swig-py \
 				swig_pydir="$(python_get_sitedir)/libsvn" \
 				swig_pydir_extra="$(python_get_sitedir)/svn"
@@ -384,7 +390,9 @@
 		}
 
 		BUILD_DIR=python \
-		python_foreach_impl swig_py_install
+				 python_foreach_impl swig_py_install
+		BUILD_DIR=python \
+				 python_foreach_impl python_optimize
 	fi
 
 	if use perl ; then
Comment 16 Benjamin Réveillé 2020-09-05 11:57:57 UTC
Comment 15 patch works for me too
Comment 17 Larry the Git Cow gentoo-dev 2020-09-19 09:54:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62aba058c3b97f1cf87bb8fff15d4c1fa76a2836

commit 62aba058c3b97f1cf87bb8fff15d4c1fa76a2836
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-09-19 09:51:10 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-09-19 09:54:27 +0000

    dev-vcs/subversion: Remove Python bindings and scripts
    
    Closes: https://bugs.gentoo.org/725850
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-vcs/subversion/metadata.xml                    |   1 -
 ....13.0-r1.ebuild => subversion-1.13.0-r2.ebuild} | 108 ++-------------------
 ...n-1.14.0.ebuild => subversion-1.14.0-r1.ebuild} | 106 +-------------------
 3 files changed, 11 insertions(+), 204 deletions(-)