Opened 16 years ago

Closed 15 years ago

Last modified 6 years ago

#3710 closed defect (outdated)

M4: compilation error

Reported by: SF/bellut Owned by: sev-
Priority: low Component: Engine: M4
Version: Keywords:
Cc: Game:

Description

In SVN 31660 compiling of the M4 engine fails with

g++ -Wp,-MMD,"engines/m4/.deps/globals.d",-MQ,"engines/m4/globals.o",-MP -Wall -g -ansi -W -Wno-unused-parameter -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings -fno-rtti -fno-exceptions -fcheck-new -DHAVE_CONFIG_H -DUNIX -DDATA_PATH=\"/usr/local/share/scummvm\" -DSDL_BACKEND -I. -I. -I./engines -I/usr/include/SDL -D_REENTRANT -c engines/m4/globals.cpp -o engines/m4/globals.o In file included from engines/m4/globals.cpp:31: engines/m4/script.h: In member function `const T& M4::ScriptInterpreter::toData(const M4::ScriptValue&)': engines/m4/script.h:303: parse error before `;' token make: *** [engines/m4/globals.o] Error 1

g++ 3.2

Ticket imported from: #1949230. Ticket imported from: bugs/3710.

Change History (21)

comment:1 by SF/bellut, 16 years ago

This doesn't happen with g++ 4.1.3, if that's any help.

comment:2 by SF/mthreepwood, 16 years ago

I've spoken with Eugene about this, but I haven't gotten around to posting my errors. I have had a similar error under 3.1, but there are other places where it happens.

Versions of GCC under 3.3 can't seem to handle the extensive use of templates. I get a similar error for MADE, kyra, and Parallaction, as well as the Functor code.

I will post my errors later.

comment:3 by SF/bellut, 16 years ago

With g++ 3.2 I only get this error in M4. MADE, kyra, and Parallaction compile and run just fine.

comment:4 by fingolfin, 16 years ago

What is the status of this item?

comment:5 by SF/bellut, 16 years ago

As of r32119 there's no change, at least for me (g++ 3.2). M4 doesn't compile, all other engines do.

comment:6 by bluegr, 16 years ago

I've made a slight change which might fix this, but I don't have GCC 3.2, so I'm unable to test. Could you check again with the latest SVN to see if this issue has been corrected?

comment:7 by SF/bellut, 16 years ago

Unfortunately, the error still persists. With r32289 it's exactly the same as in the original report.

comment:8 by bluegr, 16 years ago

The error can't be exactly the same. Could you please paste it over again?

comment:9 by SF/bellut, 16 years ago

g++ -Wp,-MMD,"engines/m4/.deps/globals.d",-MQ,"engines/m4/globals.o",-MP -Wall -g -ansi -W -Wno-unused-parameter -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings -fno-rtti -fno-exceptions -fcheck-new -DHAVE_CONFIG_H -DUNIX -DDATA_PATH=\"/usr/local/share/scummvm\" -DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DSDL_BACKEND -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_CINE=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_IGOR=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN -DENABLE_M4=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TOUCHE=STATIC_PLUGIN -I. -I. -I./engines -I/usr/include/SDL -D_REENTRANT -c engines/m4/globals.cpp -o engines/m4/globals.o In file included from engines/m4/globals.cpp:31: engines/m4/script.h: In member function `const T& M4::ScriptInterpreter::toData(const M4::ScriptValue&)': engines/m4/script.h:303: parse error before `;' token make: *** [engines/m4/globals.o] Error 1

comment:10 by sev-, 16 years ago

Status: newpending

comment:11 by sev-, 16 years ago

What is the status of this item?

comment:12 by SF/bellut, 16 years ago

With r33816 the error still persists:

g++ -Wp,-MMD,"engines/m4/.deps/globals.d",-MQ,"engines/m4/globals.o",-MP -Wall -g -ansi -W -Wno-unused-parameter -Wconversion -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings -fno-rtti -fno-exceptions -fcheck-new -DHAVE_CONFIG_H -DUNIX -DDATA_PATH=\"/usr/local/share/scummvm\" -DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DSDL_BACKEND -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_CINE=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_IGOR=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN -DENABLE_M4=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOUCHE=STATIC_PLUGIN -I. -I. -I./engines -I/usr/include/SDL -D_REENTRANT -c engines/m4/globals.cpp -o engines/m4/globals.o In file included from engines/m4/globals.cpp:31: engines/m4/script.h: In member function `const T& M4::ScriptInterpreter::toData(const M4::ScriptValue&)': engines/m4/script.h:303: parse error before `;' token make: *** [engines/m4/globals.o] Error 1

comment:13 by SF/bellut, 16 years ago

Status: pendingnew

comment:14 by fingolfin, 16 years ago

So, apparently G++ 3.2 has troubles with the usage of C++ templates in that code. Techincally speaking, this is not a bug in ScummVM but rather one in GCC 3.2 -- so the ideal solution would be to update to a better compiler, like GCC 3.3 or GCC 4.x. Lowering priority because of this.

There is no point in us asking for a status update again and again, it won't go away magically. However, we could try to either add a GCC 3.3 specific workaround, or to restructure the code to be more friendly towards semi-broken C++ compilers (there are plenty out there, anyway).

comment:15 by fingolfin, 16 years ago

Priority: normallow

comment:16 by sev-, 15 years ago

What is the status of this item?

comment:17 by sev-, 15 years ago

Status: newpending

comment:18 by SF/bellut, 15 years ago

Status: pendingnew

comment:19 by SF/bellut, 15 years ago

At least I wouldn't know. After more and more parts of ScummVM were uncompilable with g++ 3.2 I finally jumped the gun and switched to g++ 4.2.1 which compiles all parts of ScummVM.

Feel free to close this bug and invest your time in other parts of ScummVM.

comment:20 by sev-, 15 years ago

Owner: set to sev-
Resolution: outdated
Status: newclosed

comment:21 by digitall, 6 years ago

Component: --Unset--Engine: M4
Note: See TracTickets for help on using tickets.