|
From: <pl...@pi...> - 2010-05-04 03:16:21
|
Hi, I'm trying to cross-compile gnuplot with maverick crunch fpu on ARM. I have it building without the fpu code generation but it falls at the first hurdle if I use the FPU. CFLAGS="-O2 -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp" CXXFLAGS="-O2 -mcpu=ep9312 " ./configure --host=arm --prefix=/rar/root --without-x --without-pdf --without-cairo --without-documentation --disable-wxwidgets --without-lua --without-tutorial --disable-volatile-data --disable-objects make make all-recursive make[1]: Entering directory `/back/ts/ct-wkg/gnuplot' Making all in config make[2]: Entering directory `/back/ts/ct-wkg/gnuplot/config' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/back/ts/ct-wkg/gnuplot/config' Making all in m4 make[2]: Entering directory `/back/ts/ct-wkg/gnuplot/m4' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/back/ts/ct-wkg/gnuplot/m4' Making all in term make[2]: Entering directory `/back/ts/ct-wkg/gnuplot/term' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/back/ts/ct-wkg/gnuplot/term' Making all in src make[2]: Entering directory `/back/ts/ct-wkg/gnuplot/src' Making all in wxterminal make[3]: Entering directory `/back/ts/ct-wkg/gnuplot/src/wxterminal' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/back/ts/ct-wkg/gnuplot/src/wxterminal' make[3]: Entering directory `/back/ts/ct-wkg/gnuplot/src' arm-maverick-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -I../term -I../term -DBINDIR=\"/rar/root/bin\" -DX11_DRIVER_DIR=\"/rar/root/libexec/gnuplot/4.3\" -DGNUPLOT_PS_DIR=\"/rar/root/share/gnuplot/4.3/PostScript\" -DGNUPLOT_JS_DIR=\"/rar/root/share/gnuplot/4.3/js\" -DCONTACT=\"gnu...@li...\" -DHELPFILE=\"/rar/root/share/gnuplot/4.3/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\" -O2 -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -MT alloc.o -MD -MP -MF .deps/alloc.Tpo -c -o alloc.o alloc.c mv -f .deps/alloc.Tpo .deps/alloc.Po arm-maverick-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -I../term -I../term -DBINDIR=\"/rar/root/bin\" -DX11_DRIVER_DIR=\"/rar/root/libexec/gnuplot/4.3\" -DGNUPLOT_PS_DIR=\"/rar/root/share/gnuplot/4.3/PostScript\" -DGNUPLOT_JS_DIR=\"/rar/root/share/gnuplot/4.3/js\" -DCONTACT=\"gnu...@li...\" -DHELPFILE=\"/rar/root/share/gnuplot/4.3/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\" -O2 -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -MT axis.o -MD -MP -MF .deps/axis.Tpo -c -o axis.o axis.c axis.c: In function 'gen_tics': axis.c:1163: internal compiler error: Segmentation fault Please submit a full bug report, gen_tics seems to make heavy use of floats , is there any areas that may be a bit flakey on an unusual arch? Clearly this is a major problem with the compiler itself but I'm wondering if there's anything likely to trip it up. Thanks for any suggestions, Peter. |
|
From: Ethan M. <merritt@u.washington.edu> - 2010-05-04 05:24:47
|
On Monday 03 May 2010, pl...@pi... wrote:
> Hi,
>
> I'm trying to cross-compile gnuplot with maverick crunch fpu on ARM.
>
> I have it building without the fpu code generation but it falls at the
> first hurdle if I use the FPU.
>
> CFLAGS="-O2 -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp"
> CXXFLAGS="-O2 -mcpu=ep9312 " ./configure --host=arm --prefix=/rar/root
> --without-x --without-pdf --without-cairo --without-documentation
> --disable-wxwidgets --without-lua --without-tutorial
> --disable-volatile-data --disable-objects
>
> make
[...]
> arm-maverick-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -I../term
> -I../term -DBINDIR=\"/rar/root/bin\"
> -DX11_DRIVER_DIR=\"/rar/root/libexec/gnuplot/4.3\"
^^^^^
So your source must be about a year old? Without a precise date on the source
it's hard to comment on what pitfalls may lie in that routine. On the other
hand, your compiler failure seems to come from the last line of the routine
so I'm not sure that more precise line numbers would help.
> -DGNUPLOT_PS_DIR=\"/rar/root/share/gnuplot/4.3/PostScript\"
> -DGNUPLOT_JS_DIR=\"/rar/root/share/gnuplot/4.3/js\"
> -DCONTACT=\"gnu...@li...\"
> -DHELPFILE=\"/rar/root/share/gnuplot/4.3/gnuplot.gih\"
> -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\" -O2 -mcpu=ep9312
> -mfpu=maverick -mfloat-abi=softfp -MT axis.o -MD -MP -MF .deps/axis.Tpo
> -c -o axis.o axis.c
> axis.c: In function 'gen_tics':
> axis.c:1163: internal compiler error: Segmentation fault
> Please submit a full bug report,
>
>
> gen_tics seems to make heavy use of floats , is there any areas that may
> be a bit flakey on an unusual arch?
Have you tried with -O0 ?
> Clearly this is a major problem with the compiler itself but I'm
> wondering if there's anything likely to trip it up.
The code tests for loss-of-precision errors that "shouldn't happen".
I can imagine that this might confuse a software fp library.
Somewhere around line 1068 you may see a code section that begins
if (1) /* (some-test-for-range-and-or-step-size) */
You could try setting that to if (0) instead, thus disabling the
tests for (x + fabs(delta) <= x).
|
|
From: <pl...@pi...> - 2010-05-04 12:40:00
|
On 04/05/10 07:24, Ethan Merritt wrote:
> On Monday 03 May 2010, pl...@pi... wrote:
>> Hi,
>>
>> I'm trying to cross-compile gnuplot with maverick crunch fpu on ARM.
>>
>> I have it building without the fpu code generation but it falls at the
>> first hurdle if I use the FPU.
>>
>> CFLAGS="-O2 -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp"
>> CXXFLAGS="-O2 -mcpu=ep9312 " ./configure --host=arm --prefix=/rar/root
>> --without-x --without-pdf --without-cairo --without-documentation
>> --disable-wxwidgets --without-lua --without-tutorial
>> --disable-volatile-data --disable-objects
>>
>> make
>
> [...]
>> arm-maverick-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -I../term
>> -I../term -DBINDIR=\"/rar/root/bin\"
>> -DX11_DRIVER_DIR=\"/rar/root/libexec/gnuplot/4.3\"
> ^^^^^
> So your source must be about a year old? Without a precise date on the source
> it's hard to comment on what pitfalls may lie in that routine. On the other
> hand, your compiler failure seems to come from the last line of the routine
> so I'm not sure that more precise line numbers would help.
>
>> -DGNUPLOT_PS_DIR=\"/rar/root/share/gnuplot/4.3/PostScript\"
>> -DGNUPLOT_JS_DIR=\"/rar/root/share/gnuplot/4.3/js\"
>> -DCONTACT=\"gnu...@li...\"
>> -DHELPFILE=\"/rar/root/share/gnuplot/4.3/gnuplot.gih\"
>> -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\" -O2 -mcpu=ep9312
>> -mfpu=maverick -mfloat-abi=softfp -MT axis.o -MD -MP -MF .deps/axis.Tpo
>> -c -o axis.o axis.c
>> axis.c: In function 'gen_tics':
>> axis.c:1163: internal compiler error: Segmentation fault
>> Please submit a full bug report,
>>
>>
>> gen_tics seems to make heavy use of floats , is there any areas that may
>> be a bit flakey on an unusual arch?
>
> Have you tried with -O0 ?
>
>> Clearly this is a major problem with the compiler itself but I'm
>> wondering if there's anything likely to trip it up.
>
> The code tests for loss-of-precision errors that "shouldn't happen".
> I can imagine that this might confuse a software fp library.
> Somewhere around line 1068 you may see a code section that begins
> if (1) /* (some-test-for-range-and-or-step-size) */
> You could try setting that to if (0) instead, thus disabling the
> tests for (x + fabs(delta)<= x).
>
>
Thanks very much Ethan.
-O0 does compile! That at least means I can get eabi crunch working.
Os O1 and O2 all fail in exactly the same way.
Those ideas enabled me to track down where it's happening. The for-loop
even with the guts ripped out causes the segfault.
/* {{{ process minitics */
double mplace, mtic;
mtic=0;
/*
for (mplace = ministart; mplace < miniend; mplace += ministep) {
mtic=0;
}
*/
/* }}} */
The above compiles , with the for-loop it segs.
It looks pretty innocuous on the face of it but the compiler spits the
dummy.
There are more if I continue the build. graphics:606
if (lkey) {
TBOOLEAN key_panic = FALSE;
BTW this is gcc arm eabi with maverick-crunch FPU support enabled, not
software fp emulation. -mfloat-abi=softfp does not mean what one may
expect ;)
I'll test it built with -O0 and FPU, hopefully it will still be faster
than software fp.
best regards.
|