Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415793 - media-sound/lilypond-2.14.2 configure: 'Please install required programs: Python.h' (and dev-tex/tex4ht for dblatex?)
Summary: media-sound/lilypond-2.14.2 configure: 'Please install required programs: Py...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marijn Schouten (RETIRED)
URL: https://code.google.com/p/lilypond/is...
Whiteboard:
Keywords:
: 413181 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-13 20:24 UTC by Markus Walter
Modified: 2012-08-23 09:42 UTC (History)
4 users (show)

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


Attachments
build log (build.log,9.37 KB, text/plain)
2012-05-13 20:24 UTC, Markus Walter
Details
emerge --info (info.txt,5.27 KB, text/plain)
2012-05-13 20:24 UTC, Markus Walter
Details
configuration log as requested in the build log (config.log,116.56 KB, text/plain)
2012-05-13 20:25 UTC, Markus Walter
Details
Tentative patch for not stripping random parts of python-config output (lilypond-2.14.2-python-config-cflags.patch,1.38 KB, patch)
2012-06-24 09:51 UTC, Cyprien Nicolas (fulax)
Details | Diff
fix sed expression in aclocal.m4 (python-cflags.patch,1.34 KB, patch)
2012-07-01 12:44 UTC, Markus Walter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2012-05-13 20:24:23 UTC
Created attachment 311673 [details]
build log

On my haredend ~amd64 machine with gcc-4.6.2 the configuration of lilypond fails with the following error message.

config.status: creating config.hh
WARNING: Please consider installing optional programs:  dblatex
ERROR: Please install required programs:  Python.h (python-devel, python-dev or libpython-dev package)
See INSTALL.txt for more information on how to build LilyPond
Comment 1 Markus Walter 2012-05-13 20:24:36 UTC
Created attachment 311675 [details]
emerge --info
Comment 2 Markus Walter 2012-05-13 20:25:59 UTC
Created attachment 311677 [details]
configuration log as requested in the build log
Comment 3 Rafał Mużyło 2012-05-13 21:01:18 UTC
The error is:
cc1plus: error: unrecognized command line option '-floop-strip'
Comment 4 Markus Walter 2012-05-13 22:04:24 UTC
Strang, recompiling python with safe CFLAGS solved the problem. But something is strange here manually invoking '/usr/bin/python-config --cflags' gave the correct output '--floop-strip-mine' instead of '--floop-strip'.
Comment 5 Simone Scanzoni 2012-05-29 15:11:47 UTC
I had the same problem with a standard stable amd64 machine and solved it rebuilding python2 without --floop-strip-mine .
Comment 6 Rafał Mużyło 2012-05-29 16:56:50 UTC
For some packages, such flags are inherited from older builds.
One example is distutils packages inheriting from python, but IIRC, there's something similar with perl.
Comment 7 Neil Leathers 2012-06-21 15:47:56 UTC
I had trouble with -fvect-cost-model being cut down to -fvect-cost and failing. Is there something that processes the flags and fails to handle a second dash?
Comment 8 Cyprien Nicolas (fulax) 2012-06-23 09:41:00 UTC
(In reply to comment #7)
> I had trouble with -fvect-cost-model being cut down to -fvect-cost and
> failing. Is there something that processes the flags and fails to handle a
> second dash?

Exactly. The aclocal.m4 file tries to strip down some options, but the sed rule is bad written (line 978):

# Clean out junk: http://bugs.python.org/issue3290
# Python headers may need some -f* flags, leave them in.
# We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.


the 's/-[WDOm]...//g' will match every -m<something> option and strip them down, including submatches in others options, like -floop-strip-mine of -fvect-cost-model.
Comment 9 Cyprien Nicolas (fulax) 2012-06-24 09:51:48 UTC
Created attachment 316133 [details, diff]
Tentative patch for not stripping random parts of python-config output

Here is a tentative patch. I don't encounter the issue, so I cannot fully test in real conditions. I only tried in a terminal playing with:

echo " -march=x86 -floop-strip-mime -march=x86 -floop-strip-mime -floop-strip-mime" | sed -e 's/[^[:alnum:]]-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g;s/-arch [^[:space:]]*//g'

I haven't found any related issue on upstream's buglist.
Comment 10 Markus Walter 2012-07-01 12:44:57 UTC
Created attachment 316865 [details, diff]
fix sed expression in aclocal.m4

I tested your patch and it worked. I extended the sed expression to match the start of the string, so the caveat is gone.

Now the compile phase fails for me, but this seems unrelated and will probably get its own bug.
Comment 11 Cyprien Nicolas (fulax) 2012-07-02 09:23:57 UTC
Reported upstream, see $URL
Comment 12 Cyprien Nicolas (fulax) 2012-07-15 08:55:33 UTC
(In reply to comment #10)
> Created attachment 316865 [details, diff] [details, diff]
> fix sed expression in aclocal.m4
> 
> I tested your patch and it worked. I extended the sed expression to match
> the start of the string, so the caveat is gone.

Thanks Markus, your patch has landed upstream, in 2.15.42:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commitdiff;h=49e9d46c164c99a85cb17efc4f17d7d3391af09b
Comment 13 Tim Harder gentoo-dev 2012-08-06 09:06:19 UTC
Closing since 2.15.42 is now in CVS.

If you want to compile python with error causing CFLAGS feel free to also unmask and use the lilypond development releases until 2.16 is released.
Comment 14 Cyprien Nicolas (fulax) 2012-08-23 09:42:08 UTC
*** Bug 413181 has been marked as a duplicate of this bug. ***