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
Created attachment 311675 [details] emerge --info
Created attachment 311677 [details] configuration log as requested in the build log
The error is: cc1plus: error: unrecognized command line option '-floop-strip'
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'.
I had the same problem with a standard stable amd64 machine and solved it rebuilding python2 without --floop-strip-mine .
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.
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?
(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.
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.
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.
Reported upstream, see $URL
(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
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.
*** Bug 413181 has been marked as a duplicate of this bug. ***