Compiler error on OS X 10.5.2 in agg

Hi Stephane,

[CC'd to the matplotlib-users list in case others will find this useful.]

I got the same problem.
Can you tell me where you specified the -Os option to gcc to escape the problem?

So the compile that command that failed is printed right above the error message it generated. (The long line that starts with 'gcc' ...). I just copied this command, edited the -O3 to an -Os, and pasted that command-line back into the terminal. Total low-tech hack, as I didn't want to much with the setup.py file to fix compile flags on a per-file basis.

After that file is compiled manually, you can re-run 'python setup.py build', and it will start up at the next step after the error.

I got the same error in another step, which was a bit trickier to fix, because for some reason, src/_image.cpp gets copied to src/image.cpp on a temporary basis, and then compiled. (I presume the file isn't also modified?) But after the compile errors out, the copy is deleted, so just pasting in the offending gcc command doesn't work. So I had to manually copy src/_image.cpp to scr/image.cpp, and then paste in the modified gcc command.

Ugh! I'd really love some help reducing this to a test case that I can send to Apple.

Zach

···

On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote:

Hi,

I got the same problem.
Can you tell me where you specified the -Os option to gcc to escape the problem?

On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus <zachary.pincus@...1927... > > wrote:

Hello,

I just tried to compile the SVN head of matplotlib (r4994) from source
on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of
numpy), and ran into an "internal compiler error" in the agg code.
(pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.)

Here's the compile line and error:

building 'matplotlib.backends._backend_agg' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/core/include -I/usr/X11/include/
libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include -
I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/
X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/usr/
include -I/usr/X11R6/include -I. -I/Library/Frameworks/
Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o
build/temp.macosx-10.4-i386-2.5/src/_image.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
src/_image.cpp: In member function 'Py::Object
_image_module::from_images(const Py::Tuple&)':
src/_image.cpp:842: error: insn does not satisfy its constraints:
(insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set
(mem:QI (plus:SI (reg/f:SI 6 bp)
              (const_int -280 [0xfffffffffffffee8])) [0 SR.2969+0
S1 A8])
      (reg:QI 5 di)) 56 {*movqi_1} (nil)
  (nil))
src/_image.cpp:842: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:391
Please submit a full bug report, with preprocessed source if
appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

This seems to be an agg and OS X error; it's cropped up here:
http://trac.osgeo.org/mapserver/ticket/2368
and John Hunter reported it on the agg list here:
http://article.gmane.org/gmane.comp.graphics.agg/3963

Unfortunately, the error appears to either not have been fixed by the
10.5.1 update, as suggested in the email thread cited above, or the
error re-appeared in 10.5.2.

Changing the optimization flag from -O3 to -Os and compiling
_image.cpp manually (along with copying src/_image.cpp to src/
image.cpp and compiling that manually in the same way) allowed me to
finish building matplotlib, but clearly an optimized agg image library
is pretty important... (-O2 didn't work...)

Anyone have any idea at all about this error? Or is just turning off -
O3 for this file the best thing to do until Apple fixes the compiler
bug? Does anyone who knows more about agg than I want to try to reduce
this to a test case?

Zach Pincus

Postdoctoral Fellow
Molecular, Cellular, and Developmental Biology
Yale University

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Stephane Raynaud

Hi All,

Zachary Pincus wrote:

Can you tell me where you specified the -Os option to gcc to escape the problem?

So the compile that command that failed is printed right above the error message it generated. (The long line that starts with 'gcc' ...). I just copied this command, edited the -O3 to an -Os, and pasted that command-line back into the terminal. Total low-tech hack, as I didn't want to much with the setup.py file to fix compile flags on a per-file basis.

After that file is compiled manually, you can re-run 'python setup.py build', and it will start up at the next step after the error.

I got the same error in another step, which was a bit trickier to fix, because for some reason, src/_image.cpp gets copied to src/image.cpp on a temporary basis, and then compiled. (I presume the file isn't also modified?) But after the compile errors out, the copy is deleted, so just pasting in the offending gcc command doesn't work. So I had to manually copy src/_image.cpp to scr/image.cpp, and then paste in the modified gcc command.

Ugh! I'd really love some help reducing this to a test case that I can send to Apple.

I've got the same error(s) in the same situation (10.5.2). I haven't seen it any other context nor have had any success in reducing to a test case, alas. Could this have to do with picking up libraries (from fink or elsewhere) and/or different compiler versions? I've got XCode 3 and gcc 4.0. (I've actually got the apple 4.2 preview release as well but that craps out even earlier, I assume due to library version mismatches...)

Andrew

···

Zach

On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote:

Hi,

I got the same problem.
Can you tell me where you specified the -Os option to gcc to escape the problem?

On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus <zachary.pincus-LrD5EImo2rg@...1455... >>> wrote:

Hello,

I just tried to compile the SVN head of matplotlib (r4994) from source
on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head of
numpy), and ran into an "internal compiler error" in the agg code.
(pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.)

Here's the compile line and error:

building 'matplotlib.backends._backend_agg' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno- fused-
madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/core/include -I/usr/X11/include/
libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include -
I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/
site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/
X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/ usr/
include -I/usr/X11R6/include -I. -I/Library/Frameworks/
Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o
build/temp.macosx-10.4-i386-2.5/src/_image.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
src/_image.cpp: In member function 'Py::Object
_image_module::from_images(const Py::Tuple&)':
src/_image.cpp:842: error: insn does not satisfy its constraints:
(insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set
(mem:QI (plus:SI (reg/f:SI 6 bp)
              (const_int -280 [0xfffffffffffffee8])) [0 SR.2969+0
S1 A8])
      (reg:QI 5 di)) 56 {*movqi_1} (nil)
  (nil))
src/_image.cpp:842: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:391
Please submit a full bug report, with preprocessed source if
appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

This seems to be an agg and OS X error; it's cropped up here:
http://trac.osgeo.org/mapserver/ticket/2368
and John Hunter reported it on the agg list here:
http://article.gmane.org/gmane.comp.graphics.agg/3963

Unfortunately, the error appears to either not have been fixed by the
10.5.1 update, as suggested in the email thread cited above, or the
error re-appeared in 10.5.2.

Zachary Pincus wrote:

Can you tell me where you specified the -Os option to gcc to escape
the problem?

So the compile that command that failed is printed right above the
error message it generated. (The long line that starts with
'gcc' ...). I just copied this command, edited the -O3 to an -Os, and
pasted that command-line back into the terminal. Total low-tech hack,
as I didn't want to much with the setup.py file to fix compile flags
on a per-file basis.

After that file is compiled manually, you can re-run 'python setup.py
build', and it will start up at the next step after the error.

I got the same error in another step, which was a bit trickier to fix,
because for some reason, src/_image.cpp gets copied to src/image.cpp
on a temporary basis, and then compiled. (I presume the file isn't
also modified?) But after the compile errors out, the copy is deleted,
so just pasting in the offending gcc command doesn't work. So I had to
manually copy src/_image.cpp to scr/image.cpp, and then paste in the
modified gcc command.

Ugh! I'd really love some help reducing this to a test case that I can
send to Apple.

I've got the same error(s) in the same situation (10.5.2). I haven't
seen it any other context nor have had any success in reducing to a test
case, alas. Could this have to do with picking up libraries (from fink
or elsewhere) and/or different compiler versions? I've got XCode 3 and
gcc 4.0. (I've actually got the apple 4.2 preview release as well but
that craps out even earlier, I assume due to library version mismatches...)

I'm pretty sure what I'm seeing isn't from Fink or other library versions -- this was on a pretty clean 10.5 install. I'm using a custom-built Python 2.5.2 instead of Apple's, so that required installing a new version of readline, but other than that, the system is plain vanilla.

Has nobody else built matplotlib from source on 10.5.2 lately?

Zach

···

Zach

On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote:

Hi,

I got the same problem.
Can you tell me where you specified the -Os option to gcc to escape
the problem?

On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus <zachary.pincus-LrD5EImo2rg@...1455... >>>> wrote:

Hello,

I just tried to compile the SVN head of matplotlib (r4994) from
source
on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head
of
numpy), and ran into an "internal compiler error" in the agg code.
(pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.)

Here's the compile line and error:

building 'matplotlib.backends._backend_agg' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-
fused-
madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/numpy/core/include -I/usr/X11/include/
libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include -
I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/
site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/
X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/
usr/
include -I/usr/X11R6/include -I. -I/Library/Frameworks/
Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o
build/temp.macosx-10.4-i386-2.5/src/_image.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
src/_image.cpp: In member function 'Py::Object
_image_module::from_images(const Py::Tuple&)':
src/_image.cpp:842: error: insn does not satisfy its constraints:
(insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set
(mem:QI (plus:SI (reg/f:SI 6 bp)
             (const_int -280 [0xfffffffffffffee8])) [0 SR.2969+0
S1 A8])
     (reg:QI 5 di)) 56 {*movqi_1} (nil)
(nil))
src/_image.cpp:842: internal compiler error: in
reload_cse_simplify_operands, at postreload.c:391
Please submit a full bug report, with preprocessed source if
appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

This seems to be an agg and OS X error; it's cropped up here:
http://trac.osgeo.org/mapserver/ticket/2368
and John Hunter reported it on the agg list here:
http://article.gmane.org/gmane.comp.graphics.agg/3963

Unfortunately, the error appears to either not have been fixed by the
10.5.1 update, as suggested in the email thread cited above, or the
error re-appeared in 10.5.2.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I tried it after seeing your message. Indeed I got the same internal gcc failure. This is a compiler problem the with the gcc on 10.5.2 (and 10.5.1 I think). I found the same error message on many google hits outside of matplotlib. Your suggestion of compiling with -Os for the two problem files worked fine for me.

  • Charlie
···

On Mon, Mar 24, 2008 at 10:01 AM, Zachary Pincus <zachary.pincus@…1927…> wrote:

Zachary Pincus wrote:

Can you tell me where you specified the -Os option to gcc to escape

the problem?

So the compile that command that failed is printed right above the

error message it generated. (The long line that starts with

‘gcc’ …). I just copied this command, edited the -O3 to an -Os, and

pasted that command-line back into the terminal. Total low-tech hack,

as I didn’t want to much with the setup.py file to fix compile flags

on a per-file basis.

After that file is compiled manually, you can re-run 'python setup.py

build’, and it will start up at the next step after the error.

I got the same error in another step, which was a bit trickier to

fix,

because for some reason, src/_image.cpp gets copied to src/image.cpp

on a temporary basis, and then compiled. (I presume the file isn’t

also modified?) But after the compile errors out, the copy is

deleted,

so just pasting in the offending gcc command doesn’t work. So I had

to

manually copy src/_image.cpp to scr/image.cpp, and then paste in the

modified gcc command.

Ugh! I’d really love some help reducing this to a test case that I

can

send to Apple.

I’ve got the same error(s) in the same situation (10.5.2). I haven’t

seen it any other context nor have had any success in reducing to a

test

case, alas. Could this have to do with picking up libraries (from fink

or elsewhere) and/or different compiler versions? I’ve got XCode 3 and

gcc 4.0. (I’ve actually got the apple 4.2 preview release as well but

that craps out even earlier, I assume due to library version

mismatches…)

I’m pretty sure what I’m seeing isn’t from Fink or other library

versions – this was on a pretty clean 10.5 install. I’m using a

custom-built Python 2.5.2 instead of Apple’s, so that required

installing a new version of readline, but other than that, the system

is plain vanilla.

Has nobody else built matplotlib from source on 10.5.2 lately?

What is the best way to set this flag? Can it be done with an
environment variable or by editing a config file?

JDH

···

On Mon, Mar 24, 2008 at 2:48 PM, Charlie Moad <cwmoad@...287...> wrote:

This is a compiler problem the with the gcc on 10.5.2 (and 10.5.1
I think). I found the same error message on many google hits outside of
matplotlib. Your suggestion of compiling with -Os for the two problem files
worked fine for me.

John Hunter wrote:

···

On Mon, Mar 24, 2008 at 2:48 PM, Charlie Moad <cwmoad@...287...> wrote:

This is a compiler problem the with the gcc on 10.5.2 (and 10.5.1
I think). I found the same error message on many google hits outside of
matplotlib. Your suggestion of compiling with -Os for the two problem files
worked fine for me.

What is the best way to set this flag? Can it be done with an
environment variable or by editing a config file?

http://docs.python.org/inst/tweak-flags.html#SECTION000610000000000000000

Have you tried the methods above? (I have not.) They would apply to the whole build, but for mpl I don't see that as a problem, provided they make the build work.

Eric