1.4RC2 won't compile on GCC3.3 or GCC4.0.1 under Fedora Core 4
by Mike Stoddart · in Torque Game Engine · 09/09/2005 (4:24 pm) · 47 replies
I'm trying to compile 1.4RC2 on Fedora Core 4 with either GCC 3.3 or GCC 4.0.1.
I always get:
--> Compiling zlib/infblock.c
In file included from zlib/infblock.c:7:
zlib/infblock.h:14: error: syntax error before 'check_func'
In file included from zlib/infblock.c:9:
zlib/infcodes.h:14: error: syntax error before 'inflate_huft'
In file included from zlib/infblock.c:10:
zlib/infutil.h:16: error: redeclaration of enumerator 'LENS'
zlib/inftrees.h:49: error: previous definition of 'LENS' was here
zlib/infutil.h:21: error: redeclaration of enumerator 'CODES'
zlib/inftrees.h:48: error: previous definition of 'CODES' was here
zlib/infutil.h:41: error: syntax error before 'inflate_huft'
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:42: warning: data definition has no type or storage class
zlib/infutil.h:47: error: syntax error before '}' token
zlib/infutil.h:47: warning: data definition has no type or storage class
zlib/infutil.h:53: error: syntax error before '*' token
zlib/infutil.h:53: warning: data definition has no type or storage class
zlib/infutil.h:58: error: syntax error before 'checkfn'
zlib/infutil.h:58: warning: data definition has no type or storage class
zlib/infutil.h:61: error: syntax error before '}' token
zlib/infblock.c: In function 'inflate_blocks_reset':
zlib/infblock.c:74: error: dereferencing pointer to incomplete type
zlib/infblock.c:75: error: dereferencing pointer to incomplete type
zlib/infblock.c:75: error: dereferencing pointer to incomplete type
zlib/infblock.c:76: error: dereferencing pointer to incomplete type
I've tried using:
GCC 4.0.1 --> GCC3.4+ (conf.GCC3.4+.LINUX.mk)
GCC 3.3 --> GCC3 (conf.GCC3.LINUX.mk)
Anyone succeeded with this?
Thanks
(I'm assuming RC2 is available through HEAD).
I always get:
--> Compiling zlib/infblock.c
In file included from zlib/infblock.c:7:
zlib/infblock.h:14: error: syntax error before 'check_func'
In file included from zlib/infblock.c:9:
zlib/infcodes.h:14: error: syntax error before 'inflate_huft'
In file included from zlib/infblock.c:10:
zlib/infutil.h:16: error: redeclaration of enumerator 'LENS'
zlib/inftrees.h:49: error: previous definition of 'LENS' was here
zlib/infutil.h:21: error: redeclaration of enumerator 'CODES'
zlib/inftrees.h:48: error: previous definition of 'CODES' was here
zlib/infutil.h:41: error: syntax error before 'inflate_huft'
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:41: warning: no semicolon at end of struct or union
zlib/infutil.h:42: warning: data definition has no type or storage class
zlib/infutil.h:47: error: syntax error before '}' token
zlib/infutil.h:47: warning: data definition has no type or storage class
zlib/infutil.h:53: error: syntax error before '*' token
zlib/infutil.h:53: warning: data definition has no type or storage class
zlib/infutil.h:58: error: syntax error before 'checkfn'
zlib/infutil.h:58: warning: data definition has no type or storage class
zlib/infutil.h:61: error: syntax error before '}' token
zlib/infblock.c: In function 'inflate_blocks_reset':
zlib/infblock.c:74: error: dereferencing pointer to incomplete type
zlib/infblock.c:75: error: dereferencing pointer to incomplete type
zlib/infblock.c:75: error: dereferencing pointer to incomplete type
zlib/infblock.c:76: error: dereferencing pointer to incomplete type
I've tried using:
GCC 4.0.1 --> GCC3.4+ (conf.GCC3.4+.LINUX.mk)
GCC 3.3 --> GCC3 (conf.GCC3.LINUX.mk)
Anyone succeeded with this?
Thanks
(I'm assuming RC2 is available through HEAD).
#42
11/15/2005 (5:47 pm)
:) Wow just got home and i got a gem waiting for me thank you very much gregory. After locking myself out of my car tonight (LOL) this is great you saved me a couple hours of digging around to get it working :)
#43
11/17/2005 (6:26 pm)
I finally found the main culprit for all my problems. In mk/conf.UNIX.mk the first line reads O=.obj and i had that change to O=.o for some reason it was killing off make preventing it from setting/using the cflags/link flags/etc.
#44
Edit: Btw i added some magic to fix it so it automatically creates the symlinking in the patch.
11/17/2005 (7:22 pm)
Gregory i have finally got it all work thanks. I have made a new patch with all your changes and added some makefile magic to handle creating 32bit binaries on the AMD64/EMT64 platform. Can i mail you the file so you can host it, i don't current have a site setup?Edit: Btw i added some magic to fix it so it automatically creates the symlinking in the patch.
#45
And if anyone wants this patch we are talking about:
slyvester.gxsnmp.org/torque/patches/torque-1.4-cvs-mega.patch
11/18/2005 (4:35 am)
Benoit, sure email is in my profile. I'll stick it on slyvester.And if anyone wants this patch we are talking about:
slyvester.gxsnmp.org/torque/patches/torque-1.4-cvs-mega.patch
#46
09/20/2006 (11:34 pm)
How do you apply this patch file?
#47
09/21/2006 (12:12 am)
You don't. This is way old information. Just download 1.4.2, it'll work fine in linux.
Torque Owner Gregory "Centove" McLean
Yes I got the tools to build.
1. engine/targets.torque.mk
Find this:
----
ifeq "$(OS)" "WIN32"
SOURCE.ENGINE += $(SOURCE.PLATFORM$(OS))
else
SOURCE.ENGINE += $(SOURCE.PLATFORM$(OS)DEDICATED)
endif
----
Change to:
----
SOURCE.ENGINE += $(SOURCE.PLATFORM$(OS))
----
Change the $(SOURCE.GAME.I18N) to $(SOURCE.I18N)
Should be a line or two above the previous change.
2. tools/targets.map2dif.mk
map2dif$(EXT.EXE): CFLAGS
Add -I../engine/dgl to the CFLAGS
(Should read)
3. Grab:
slyvester.gxsnmp.org/torque/patches/targets.langc.mk
and
slyvester.gxsnmp.org/torque/patches/targets.map2difplus.mk
And plop em in the tools directory.
4. GNU Make has a problem with file names with spaces so.
ln -s map2dif\ plus map2dif_plus
5. Edit tools/Makefile
Find the all: target (around line 23)
Make it read as such:
Around line 36 you'll see include targets.buildWad.mk
Add
6. cross your fingers and type make
If you did the dance right,
----
--> Linking map2dif_DEBUG.bin
--> Linking map2difplus_DEBUG.bin
--> Linking buildWad_DEBUG.bin
--> Linking langc_DEBUG.bin
----
I know nothing about the use of said tools, but this will build em, I think map2dif will be disappearing in the future superceeded by the map2dif plus thing.
buildWad seems to be really ancient.
I don't own max or maya so I have no way to test or even build those bits or if they even build under linux and I don't have truck loads of $$$ laying around to experiment on em either ;)