Error occured while building vine1.0 on Ubuntu 11.10

140 views
Skip to first unread message

nicko

unread,
Jan 1, 2013, 7:36:47 AM1/1/13
to bitblaz...@googlegroups.com
Following errors occured while compile vine1.0 on Ubuntu 11.10
make 
Making all in VEX
make[1]: Entering directory `/home/user/bitblaze/vine-1.0/VEX'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/user/bitblaze/vine-1.0/VEX'
Making all in libasmir
make[1]: Entering directory `/home/user/bitblaze/vine-1.0/libasmir'
make  all-recursive
make[2]: Entering directory `/home/user/bitblaze/vine-1.0/libasmir'
Making all in src
make[3]: Entering directory `/home/user/bitblaze/vine-1.0/libasmir/src'
g++ -DHAVE_CONFIG_H -I. -I../../libasmir    -I/home/user/bitblaze/vine-1.0/VEX//pub -I./include -fPIC -g -O2 -MT irtoir-i386.o -MD -MP -MF .deps/irtoir-i386.Tpo -c -o irtoir-i386.o `test -f './vex/irtoir-i386.cpp' || echo './'`./vex/irtoir-i386.cpp
./vex/irtoir-i386.cpp: In function ‘std::string reg_offset_to_name(int)’:
./vex/irtoir-i386.cpp:269:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:269:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:269:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:270:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:270:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:270:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:271:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:271:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:271:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:272:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:272:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:272:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:273:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:273:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:273:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:274:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:274:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:274:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:275:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:275:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:275:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:276:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:276:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:276:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:278:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:278:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:278:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:280:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:280:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:280:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:281:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:281:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:281:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:282:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:282:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:282:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:283:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:283:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:283:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:285:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:285:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:285:14: error: an array reference cannot appear in a constant-expression
./vex/irtoir-i386.cpp:285:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:286:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:286:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:286:14: error: an array reference cannot appear in a constant-expression
./vex/irtoir-i386.cpp:286:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:287:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:287:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:287:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:288:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:288:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:288:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:289:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:289:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:289:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:290:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:290:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:290:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:291:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:291:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:291:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:292:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:292:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:292:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:294:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:294:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:294:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:295:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:295:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:295:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:297:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:297:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:297:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:298:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:298:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:298:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:299:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:299:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:299:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:300:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:300:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:300:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:301:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:301:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:301:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:302:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:302:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:302:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:303:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:303:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:303:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:304:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:304:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:304:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:305:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:305:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:305:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:307:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:307:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:307:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:309:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:309:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:309:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:310:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:310:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:310:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:311:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:311:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:311:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp: In function ‘Exp* translate_get_reg_8(int)’:
./vex/irtoir-i386.cpp:343:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:343:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:343:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:344:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:344:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:344:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:345:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:345:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:345:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:346:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:346:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:346:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:347:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:347:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:347:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:348:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:348:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:348:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:349:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:349:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:349:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:350:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:350:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:350:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp: In function ‘Exp* translate_get_reg_16(int)’:
./vex/irtoir-i386.cpp:380:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:380:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:380:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:381:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:381:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:381:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:382:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:382:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:382:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:383:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:383:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:383:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:384:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:384:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:384:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:385:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:385:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:385:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:386:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:386:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:386:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:387:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:387:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:387:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:392:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:392:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:392:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:393:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:393:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:393:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:394:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:394:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:394:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:395:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:395:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:395:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:396:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:396:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:396:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:397:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:397:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:397:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp: In function ‘Stmt* translate_put_reg_8(int, Exp*, IRSB*)’:
./vex/irtoir-i386.cpp:791:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:791:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:791:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:792:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:792:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:792:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:793:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:793:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:793:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:794:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:794:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:794:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:795:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:795:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:795:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:796:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:796:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:796:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:797:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:797:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:797:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:798:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:798:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:798:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:801:10: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:801:10: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:801:10: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp: In function ‘Stmt* translate_put_reg_16(int, Exp*, IRSB*)’:
./vex/irtoir-i386.cpp:847:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:847:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:847:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:848:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:848:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:848:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:849:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:849:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:849:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:850:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:850:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:850:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:851:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:851:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:851:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:852:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:852:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:852:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:853:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:853:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:853:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:854:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:854:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:854:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:859:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:859:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:859:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:860:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:860:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:860:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:861:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:861:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:861:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:862:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:862:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:862:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:863:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:863:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:863:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:864:14: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:864:14: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:864:14: error: ‘&’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:867:10: error: a cast to a type other than an integral or enumeration type cannot appear in a constant-expression
./vex/irtoir-i386.cpp:867:10: error: ‘->’ cannot appear in a constant-expression
./vex/irtoir-i386.cpp:867:10: error: ‘&’ cannot appear in a constant-expression
make[3]: *** [irtoir-i386.o] Error 1
make[3]: Leaving directory `/home/user/bitblaze/vine-1.0/libasmir/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/bitblaze/vine-1.0/libasmir'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/user/bitblaze/vine-1.0/libasmir'
make: *** [all-recursive] Error 1

I followed the standard manual(how-to), try find any solutions, but failed
Hope for help
Regards,
nicko

Stephen McCamant

unread,
Jan 2, 2013, 4:40:16 PM1/2/13
to bitblaz...@googlegroups.com
>>>>> "N" == nicko <ochir...@gmail.com> writes:

N> Following errors occured while compile vine1.0 on Ubuntu 11.10

[...]
N> make[3]: Entering directory `/home/user/bitblaze/vine-1.0/libasmir/src'
N> g++ -DHAVE_CONFIG_H -I. -I../../libasmir
N> -I/home/user/bitblaze/vine-1.0/VEX//pub -I./include -fPIC -g -O2 -MT
N> irtoir-i386.o -MD -MP -MF .deps/irtoir-i386.Tpo -c -o irtoir-i386.o `test
N> -f './vex/irtoir-i386.cpp' || echo './'`./vex/irtoir-i386.cpp
N> ./vex/irtoir-i386.cpp: In function "std::string reg_offset_to_name(int)":
N> ./vex/irtoir-i386.cpp:269:14: error: a cast to a type other than an
N> integral or enumeration type cannot appear in a constant-expression
N> ./vex/irtoir-i386.cpp:269:14: error: '->' cannot appear in a
N> constant-expression
N> ./vex/irtoir-i386.cpp:269:14: error: '&' cannot appear in a
N> constant-expression
[... many similar errors ...]

This compilation failure is caused by a change in the behavior of GCC
(for strict conformance with the C standard) that came after the Vine
1.0 release. The traditional definition of the offsetof() macro was:

#define offsetof(st, m) ((size_t)(&((st *)0)->m))

however this definition is not conformant to the strict C
standard. The standard requires that "offsetof" be an integer constant
expression, but as the errors from modern GCC indicate, it prohibits
the "&" operator, the "->" operator, and pointer casts from those
expressions. (It's also at least arguable that this definition invokes
undefined behavior by dereferencing a null pointer [1].)

VEX's headers contain a traditional definition of "offsetof", with the
comment:

/* This is so useful it should be visible absolutely everywhere. */

and in the version of LibASMIR in Vine 1.0, this version ends up
getting used by the code causing the error, which matches guest state
offsets in a switch statement.

The fix is to include the compiler's definition of offsetof (in
<stddef.h>) first; in recent GCC versions this expands into a magical
__builtin_offsetof that does the right thing. The appended patch shows
how we made this change in our version.

Hope this helps,

-- Stephen

[1] http://en.wikipedia.org/wiki/Offsetof

Index: libasmir/src/vex/irtoir-i386.cpp
===================================================================
--- libasmir/src/vex/irtoir-i386.cpp (old revision)
+++ libasmir/src/vex/irtoir-i386.cpp (new revision)
@@ -9,6 +9,13 @@
web site at: http://bitblaze.cs.berkeley.edu/
*/

+/* Because we use offsetof() for values that go in switch statement
+ cases, we need a definition in terms of __builtin_offsetof so that
+ GCC >= 4.6 can accept the results of offsetof() as a constant
+ expression. They've stopped supporting the traditional definition
+ as a macro &((type*)0)->memb, which appears in VEX's headers. */
+#include <stddef.h>
+
#include <string>
#include <vector>
#include <iostream>
Index: libasmir/src/vex/irtoir-arm.cpp
===================================================================
--- libasmir/src/vex/irtoir-arm.cpp (old revision)
+++ libasmir/src/vex/irtoir-arm.cpp (new revision)
@@ -9,6 +9,12 @@
web site at: http://bitblaze.cs.berkeley.edu/
*/

+/* Because we use offsetof() for values that go in switch statement
+ cases, we need a definition in terms of __builtin_offsetof so that
+ GCC >= 4.6 can accept the results of offsetof() as a constant
+ expression. They've stopped supporting the traditional definition
+ as a macro &((type*)0)->memb, which appears in VEX's headers. */
+#include <stddef.h>

#include "irtoir-internal.h"
#include "libvex_guest_arm.h"
Reply all
Reply to author
Forward
Message has been deleted
0 new messages