|
|
I built pov 3.7 rc6 on my Raspberry PI. There are a couple of issues.
Here's the blurb from configure (source was povray-3.7.0.RC6.tar.gz):
POV-Ray 3.7.0.RC5 has been configured.
Built-in features:
I/O restrictions: enabled
X Window display: enabled (using SDL)
Supported image formats: gif tga iff ppm pgm hdr png jpeg tiff
Unsupported image formats: openexr
Compilation settings:
Build architecture: armv6l-unknown-linux-gnueabi
Built/Optimized for: armv6l-unknown-linux-gnueabi
Compiler vendor: gnu
Compiler version: g++ 4.6
Compiler flags: -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -s -O3 -ffast-math -pthread
I got the following compiler errors:
shape/poly.cpp:188:3: warning: this decimal constant is unsigned only
in ISO C90 [enabled by default]
shape/poly.cpp:188:3: warning: this decimal constant is unsigned only
in ISO C90 [enabled by default]
shape/poly.cpp:188:3: warning: this decimal constant is unsigned only
in ISO C90 [enabled by default]
processoptions.cpp:1180:9: warning: case label value is less than
minimum value for type [enabled by default]
povms.cpp:304:3: warning: anonymous type with no linkage used to
declare variable '<anonymous struct> POVMSStreamOrderTables' with
linkage [enabled by default]
renderfrontend.cpp:1165:57: warning: trigraph ??) ignored, use
-trigraphs to enable [-Wtrigraphs]
vfesession.cpp:594:11: warning: case label value is less than minimum
value for type [enabled by default]
Of the above, the errors in processoptions.cpp & vfesession.cpp are
significant. On this platform a 'char' is unsigned by default. Here's a
test program that exhibits the same error message and shows that there
are actual errors:
#include <stdio.h>
enum badT { bAA, bBB } bad_e;
enum goodT { gAA, gBB, xx=-1 } good_e;
main( int ac, char ** av )
{
char ch = EOF;
signed char sch = EOF;
printf( "ch=%d, sch=%d\n", ch, sch );
bad_e = (badT) -1;
good_e = (goodT) -1;
printf( "bad_e=%d, good_e=%d\n", bad_e, good_e );
switch( bad_e ) {
case bAA: printf( "case bad_e == bAA\n" ); break;
case -1: printf( "case bad_e == -1\n" ); break;
default: printf( "case bad_e == ? (default)\n" ); break;
}
switch( good_e ) {
case gAA: printf( "case good_e == gAA\n" ); break;
case -1: printf( "case good_e == -1\n" ); break;
default: printf( "case good_e == ? (default)\n" ); break;
}
}
$ g++ t.cpp
t.cpp: In function 'int main(int, char**)':
t.cpp:19:11: warning: case label value is less than minimum value for
type [enabled by default]
$ ./a.out
ch=255, sch=-1
bad_e=-1, good_e=-1
case bad_e == ? (default)
case good_e == -1
Thus you can see that neither the 'case EOF:' at line 1180 of
processoptions.cpp nor the 'case -1:' at line 594 of vfesession.cpp will
match unless the patches below are applied.
Here are a couple of patches that fix those two significant errors. For
simplefrontend.h someone who understands why the enum variable gets
assigned a '-1' will have to rework the patch and fix the actual
assignment rather the kludging the declaration.
--- ./source/base/processoptions.cpp.orig 2012-02-05
14:54:15.000000000 -0600
+++ ./source/base/processoptions.cpp 2012-08-16 11:17:19.773490094 -0500
@@ -1167,7 +1167,7 @@
str[0] = 0;
for (int i = 0; i < 65536; i++, *pos = 0)
{
- char ch = file->getchar();
+ int ch = file->getchar();
if (hadEscape && (ch == '"' || ch == '\'' || ch == '\\'))
{
hadEscape = false;
--- ./source/frontend/simplefrontend.h.orig 2012-02-05
14:54:18.000000000 -0600
+++ ./source/frontend/simplefrontend.h 2012-08-16 11:22:46.244738423 -0500
@@ -124,7 +124,8 @@
kStopping,
kStopped,
kFailed,
- kDone
+ kDone,
+ kminusone = -1
};
Post a reply to this message
|
|