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
Building with USE=-python works around the issue
Created attachment 642316 [details] build.log
*** This bug has been marked as a duplicate of bug 725848 ***
*** Bug 725848 has been marked as a duplicate of this bug. ***
(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.
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
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?
Created attachment 643544 [details, diff] Patch ebuild for building Python bindings Add python_optimize. (N.B. the py3c patch is rather large for FILESDIR)
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).
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"
(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
(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
any solution?
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.
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 15 patch works for me too
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(-)