Problems at building cafu from svn

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
rellig
Posts:4
Joined:2011-11-24, 11:59
Problems at building cafu from svn

Post by rellig » 2011-11-24, 12:08

I am getting this error, when I try building cafu from svn (Revision 429).
Unfortunately my knowledge in C++ isn't good enough and google didn't help me, too. So I need your help now. :)

Edit:

Code: Select all

rellig@mobile-horst ~ $ gcc --version
gcc (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) 4.5.3

Code: Select all

rellig@mobile-horst ~/svn/Cafu $ scons
scons: Reading SConscript files ...

Checking for C library png... (cached) yes
Checking for C library z... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o Libs/build/linux2/g++/release/FileSys/FileManImpl.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs -IExtLibs/lua/src -IExtLibs/lwo -IExtLibs/jpeg Libs/FileSys/FileManImpl.cpp
In file included from ExtLibs/minizip/unzip.h:57:0,
                 from Libs/FileSys/FileSys_ZipArchive_GV.hpp:26,
                 from Libs/FileSys/FileManImpl.cpp:24:
ExtLibs/minizip/ioapi.h:38:44: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:39:44: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:40:45: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:41:44: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:42:44: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:43:45: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:44:49: error: expected initializer before 'OF'
ExtLibs/minizip/ioapi.h:48:5: error: 'open_file_func' does not name a type
ExtLibs/minizip/ioapi.h:49:5: error: 'read_file_func' does not name a type
ExtLibs/minizip/ioapi.h:50:5: error: 'write_file_func' does not name a type
ExtLibs/minizip/ioapi.h:51:5: error: 'tell_file_func' does not name a type
ExtLibs/minizip/ioapi.h:52:5: error: 'seek_file_func' does not name a type
ExtLibs/minizip/ioapi.h:53:5: error: 'close_file_func' does not name a type
ExtLibs/minizip/ioapi.h:54:5: error: 'testerror_file_func' does not name a type
ExtLibs/minizip/ioapi.h:60:26: error: expected initializer before 'OF'
In file included from Libs/FileSys/FileSys_ZipArchive_GV.hpp:26:0,
                 from Libs/FileSys/FileManImpl.cpp:24:
ExtLibs/minizip/unzip.h:122:45: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:135:32: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:146:33: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:153:29: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:160:37: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:168:40: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:181:37: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:187:36: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:194:34: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:226:42: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:252:39: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:258:47: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:266:40: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:279:40: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:294:40: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:300:39: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:314:32: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:319:27: error: expected initializer before 'OF'
ExtLibs/minizip/unzip.h:324:42: error: expected initializer before 'OF'
scons: *** [Libs/build/linux2/g++/release/FileSys/FileManImpl.o] Error 1
scons: building terminated because of errors.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Problems at building cafu from svn

Post by Carsten » 2011-11-24, 22:38

Hi rellig,
welcome to the Cafu forums! :welcome:
rellig wrote:I am getting this error, when I try building cafu from svn (Revision 429).
Unfortunately my knowledge in C++ isn't good enough and google didn't help me, too. So I need your help now. :)
I don't have or use Gentoo here, but I think this is essentially caused by this change in Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=383179

Can you please svn update to r430 and see if that helps?
Best regards,
Carsten
rellig
Posts:4
Joined:2011-11-24, 11:59

Re: Problems at building cafu from svn

Post by rellig » 2011-11-25, 01:32

Thanks a lot Carsten!

ioapi.h compiles now, but the error in unzip.h stays.

It looks to me like you just kicked out 'OF' but as I don't understand it I prefer not to mess with your code and try to edit unzip.h myself.

edit: regarding the bugreport: would it be better if i just downgraded zlib to get rid of these issues?


Thanks for your great support!
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Problems at building cafu from svn

Post by Carsten » 2011-11-25, 17:15

Hm, sorry, I didn't realize the full extend of the problem yesterday, which is complicated by the fact that I have no Gentoo system available to reproduce this locally.

Technically, the Gentoo zlib maintainer is right in renaming the OF macro, but he seems to be willing to break a lot of existing code along the way as well (his action is not necessarily a bad move though).

If you downgrade zlib, it would be the quickest solution, but the next Gentoo user will have the same issue. So if you bear with me, I'd rather fix the root of the problem, which is that the Cafu-external "minizip" library uses the OF macro when it shouldn't (Cafu itself doesn't use this macro at all).
I'll post again later today as soon as I finish the related changes.
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Problems at building cafu from svn

Post by Carsten » 2011-11-26, 02:14

Well, done now, can you please retry with r432?
Best regards,
Carsten
rellig
Posts:4
Joined:2011-11-24, 11:59

Re: Problems at building cafu from svn

Post by rellig » 2011-11-26, 02:28

Thanks again, Carsten!

But you still missed a few.

Code: Select all

rellig@mobile-horst ~/svn/Cafu $ scons -j3
scons: Reading SConscript files ...

Checking for C library png... (cached) yes
Checking for C library z... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/linux2/g++/debug build/linux2/g++/release
g++ -o Libs/build/linux2/g++/release/FileSys/FileManImpl.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs -IExtLibs/lua/src -IExtLibs/lwo -IExtLibs/jpeg Libs/FileSys/FileManImpl.cpp
g++ -o Libs/build/linux2/g++/release/FileSys/FileSys_ZipArchive_GV.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs -IExtLibs/lua/src -IExtLibs/lwo -IExtLibs/jpeg Libs/FileSys/FileSys_ZipArchive_GV.cpp
g++ -o Libs/build/linux2/g++/release/FileSys/Password.o -c -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs -IExtLibs -IExtLibs/lua/src -IExtLibs/lwo -IExtLibs/jpeg Libs/FileSys/Password.cpp
In file included from Libs/FileSys/FileSys_ZipArchive_GV.hpp:26:0,
                 from Libs/FileSys/FileSys_ZipArchive_GV.cpp:22:
ExtLibs/minizip/unzip.h:122:45: error: expected initializer before 'OF'
In file included from Libs/FileSys/FileSys_ZipArchive_GV.hpp:26:0,
                 from Libs/FileSys/FileManImpl.cpp:24:
ExtLibs/minizip/unzip.h:122:45: error: expected initializer before 'OF'
scons: *** [Libs/build/linux2/g++/release/FileSys/FileSys_ZipArchive_GV.o] Error 1                                                                                                  
scons: *** [Libs/build/linux2/g++/release/FileSys/FileManImpl.o] Error 1                                                                                                            
scons: building terminated because of errors.  
I almost feel sorry for using gentoo now :/
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Problems at building cafu from svn

Post by Carsten » 2011-11-26, 11:55

Sorry. Please try r433. :up:
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests