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: CONFIRMED
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-08-02 14:23 UTC (History)
16 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 gentoo-dev 2020-05-28 08:55:56 UTC

*** This bug has been marked as a duplicate of bug 725848 ***
Comment 4 Mikle Kolyada 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