[Bug 684637] New: libxslt-1.1.27: --with-python build fails with "Python.h: No such file or directory"

172 views
Skip to first unread message

libxslt

unread,
Sep 22, 2012, 5:43:54 PM9/22/12
to tel.conn...@gmail.com
https://bugzilla.gnome.org/show_bug.cgi?id=684637
libxslt | general | unspecified

Summary: libxslt-1.1.27: --with-python build fails with
"Python.h: No such file or directory"
Classification: Platform
Product: libxslt
Version: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: general
AssignedTo: dan...@veillard.com
ReportedBy: tetr...@gentoo.org
QAContact: libxml-...@gnome.bugs
CC: gn...@gentoo.org
GNOME version: ---


Commit a2cd8a03 moved the includes in python/Makefile.am from INCLUDES to
AM_CPPFLAGS. This change breaks the build when using --with-python.

This happens because automake does not use AM_CPPFLAGS for tagets which have a
target-specific *_CPPFLAGS variable. And at least when using automake-1.12.3 on
Gentoo, a basic definition of libxsltmod_la_CPPFLAGS automatically gets added
python/Makefile.am:

libxsltmod_la_CPPFLAGS = -shared

As a result, the rule for building libxsltmod_la-libxslt.lo gets expanded to

libxsltmod_la-libxslt.lo: libxslt.c
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS)
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(libxsltmod_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o
libxsltmod_la-libxslt.lo `test -f 'libxslt.c' || echo '$(srcdir)/'`libxslt.c

and the build fails with

/bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I.. -shared -I/usr/include/libxml2 -march=native -O2
-pipe -Wall -c -o libxsltmod_la-libxslt.lo `test -f 'libxslt.c' || echo
'./'`libxslt.c
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..
-I/usr/include/libxml2 -march=native -O2 -pipe -Wall -c libxslt.c -fPIC -DPIC
-o .libs/libxsltmod_la-libxslt.o
libxslt.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.

The build failure can be avoided by appending the includes to
libxsltmod_la_CPPFLAGS instead of assigning to AM_CPPFLAGS.

--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

libxslt

unread,
Sep 22, 2012, 5:49:46 PM9/22/12
to tel.conn...@gmail.com
https://bugzilla.gnome.org/show_bug.cgi?id=684637
libxslt | general | unspecified

Alexandre Rostovtsev <tetromino> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://bugs.gentoo.org/sho
| |w_bug.cgi?id=435900

libxslt

unread,
Sep 22, 2012, 5:50:27 PM9/22/12
to tel.conn...@gmail.com
https://bugzilla.gnome.org/show_bug.cgi?id=684637
libxslt | general | unspecified

--- Comment #1 from Alexandre Rostovtsev <tetr...@gentoo.org> 2012-09-22 21:50:22 UTC ---
Created an attachment (id=225003)
View: https://bugzilla.gnome.org/attachment.cgi?id=225003
Review: https://bugzilla.gnome.org/review?bug=684637&attachment=225003

proposed patch
Reply all
Reply to author
Forward
0 new messages