Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435900 - dev-libs/libxslt-1.1.27 - libxslt.c:14:20: fatal error: Python.h: No such file or directory
Summary: dev-libs/libxslt-1.1.27 - libxslt.c:14:20: fatal error: Python.h: No such fil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 436014 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-22 16:35 UTC by Jouni Rinne
Modified: 2012-09-23 19:49 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,16.89 KB, text/plain)
2012-09-22 16:35 UTC, Jouni Rinne
Details
emerge --info (emerge_info,5.89 KB, text/plain)
2012-09-22 16:36 UTC, Jouni Rinne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jouni Rinne 2012-09-22 16:35:50 UTC
Created attachment 324634 [details]
build.log

Dev-libs/libxslt-1.1.27 does not build (Using USE="cryp python"), with error like:

cat ./libxsl.py libxsltclass.py > libxslt.py
libxslt.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[3]: *** [libxsltmod_la-libxslt.lo] Virhe 1
make[3]: *** Odotetaan keskeneräisiä töitä....
In file included from types.c:13:0:
libxml_wrap.h:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
In file included from libxslt_wrap.h:1:0,
                 from libxslt-py.c:4:
libxml_wrap.h:1:20: fatal error: Python.h: No such file or directory
Comment 1 Jouni Rinne 2012-09-22 16:36:47 UTC
Created attachment 324636 [details]
emerge --info
Comment 2 Denis M. (Phr33d0m) 2012-09-22 17:33:33 UTC
Confirming this issue on amd64.

[ebuild     U  ] dev-libs/libxslt-1.1.27 [1.1.26-r4] USE="python -crypt -debug -static-libs"



make[3]: Entering directory `/var/tmp/portage/dev-libs/libxslt-1.1.27/work/libxslt-1.1.27/python'
SRCDIR=. /usr/bin/python ./generator.py
Found 244 functions in libxslt-api.xml
Found 32 functions in libxslt-python-api.xml
Generated 143 wrapper functions, 100 failed, 33 skipped

Missing type converters:
xsltTopLevelFunction:2  xmlXPathObjectPtr:1  xsltDecimalFormatPtr:2  xmlChar **:2  xmlXPathCompExprPtr:5  xsltPreComputeFunction:1  xsltElemPreCompPtr:2  xsltDebugTraceCodes:2  xsltDocumentPtr:8  xsltSecurityPrefsPtr:11  xsltTemplatePtr:4  pythonObject *:5  ...:1  xsltNumberDataPtr:1  xmlHashTablePtr:1  xmlNodePtr *:3  xsltExtInitFunction:2  xsltCompilerCtxtPtr:2  char **:2  xmlXPathObjectPtr *:1  xmlNodeSetPtr:2  xmlXPathFunction:3  xsltTransformFunction:5  xsltCompMatchPtr:3  void *:13  xsltLocale:4  xmlOutputBufferPtr:1  xsltPointerListPtr:4  xmlDictPtr:1  xsltSortFunc:2  xsltNsMapPtr:1  xsltStackElemPtr:3 
touch gen_prog
  CC       libxsltmod_la-libxslt.lo
libxslt.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[3]: *** [libxsltmod_la-libxslt.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-libs/libxslt-1.1.27/work/libxslt-1.1.27/python'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/libxslt-1.1.27/work/libxslt-1.1.27/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libxslt-1.1.27/work/libxslt-1.1.27'
make: *** [all] Error 2
Comment 3 Pryka 2012-09-22 18:28:27 UTC
Confirmed. 

Same problem
Comment 4 Michael Gisbers 2012-09-22 18:31:08 UTC
Confirmed
Comment 5 Rafał Mużyło 2012-09-22 19:40:06 UTC
checking for python... /usr/bin/python
PYTHON is pointing at /usr/bin/python
Found Python version 2.7
Found libxml2-python module
./configure: line 13520: python2.7-config: command not found

OK, hard to tell if the above is a user or ebuild problem - needs checking.
Comment 6 Sander Sweers 2012-09-22 20:17:19 UTC
(In reply to comment #5)
> checking for python... /usr/bin/python
> PYTHON is pointing at /usr/bin/python
> Found Python version 2.7
> Found libxml2-python module
> ./configure: line 13520: python2.7-config: command not found
> 
> OK, hard to tell if the above is a user or ebuild problem - needs checking.

It looks like this commit is what made this error.

http://git.gnome.org/browse/libxslt/commit/configure.in?id=a1981a0da0201b8da3713aafc1c0656be26e21f0

stick the below in src_prepare and that will be sorted.
sed -e "s/python\$PYTHON_VERSION-config/python-config-\$PYTHON_VERSION/g" -i configure.in || die "sed failed"

However there is more to this and the above does not fix the compilation error..
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-22 22:05:47 UTC
1.1.27 with USE=python was simultaneously broken in 3 ways, each fatal:

* @PYTHON_SUBDIR@ was changed to $(PYTHON_SUBDIR) in Makefile.am, but the corresponding sed in the ebuild was not updated.
* configure.ac needed to be patched to use Gentoo's python-configure command instead of python2.7-configure that some other distros provide.
* Due to the way python/Makefile.am set the python include path, Python.h could not be found when compiling libxslt.c. (I've submitted a patch for this issue upstream to https://bugzilla.gnome.org/show_bug.cgi?id=684637)

Everything should be fixed now :)

>  22 Sep 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  libxslt-1.1.27.ebuild, +files/libxslt-1.1.27-python-config.patch,
>  +files/libxslt-1.1.27-python-includes.patch:
>  Fix build failure with USE=python (bug #435900, thanks to Jouni Rinne, Rafał
>  Mużyło, Sander Sweers et al.)
Comment 8 Michael Gisbers 2012-09-23 19:16:18 UTC
Works for me.
Comment 9 SpanKY gentoo-dev 2012-09-23 19:49:49 UTC
*** Bug 436014 has been marked as a duplicate of this bug. ***