Fresh HEAD checkout failing in netEvent.cc with PB 2.1
by Scott Kearney · in Torque Game Engine · 07/19/2003 (2:03 pm) · 37 replies
Hello,
I just licensed the engine a few days ago, and have been spending some time this weekend trying to get it to compile. It was not working, and after reading the README a few more times, checking the online docs, and this forum, I still can not get it to compile.. Here's what I've done:
1. downloaded the CVS HEAD according to the cvs docs for "unix" (command line). (7/19/03)
2. loaded the torque_pb_2_1.pbproj file into PB 2.1 (Dec '02)
3. changed the project info to put build targets into ../example
4. clicked the radio button to put intermediate builds into the same directory as target builds
5. dechecked "activate CVS integration" and "rebuild indexes"
6. Clicked "build" (gets the error)
7. Clicked "build" again (gets same error)
note for those who want to make witty observations on my path names: t2 = temporary2, not tribes2.. I had a previous checkout of release_1_1_2 or whatever it was in t1
Also, I tried applied Dean's patch hosted on Krabbit world, and it did not eliminate the error. Although to be honest, I'm not sure if it was the same error or file. I explicitly remember seeing that it still caused problems with S32 and U32 types, so I assumed it was the same error (since) the patch supposedly changed those types)
I have no experience dealing with a project of this size on a non-linux platform, and even on linux, my experience with large projects (over 30 files) has been compiling stuff, and any errors I found were generally due to library version mismatches, not anything in the code. I really appreciate any help I can get on this.
The full error listed in PB includes the build command line, which is long, and so I put a copy of that + the error message on my home page area. Here is the link skott.homeip.net/temporary/torque_error.html
The pertinent stuff (I think):
../engine/core/dataChunker.h: In constructor 'FreeListChunker::FreeListChunker(int) [with T = NetEventNote]':
../engine/sim/netEvent.cc:14: instantiated from here
../engine/core/dataChunker.h:60: call of overloaded 'getMax(long unsigned int, long unsigned int)' is ambiguous
../engine/platform/types.h:177: candidates are: U32 getMax(unsigned int, unsigned int)
../engine/platform/types.h:183: U16 getMax(short unsigned int, short unsigned int)
../engine/platform/types.h:189: U8 getMax(unsigned char, unsigned char)
../engine/platform/types.h:195: S32 getMax(int, int)
../engine/platform/types.h:201: S16 getMax(short int, short int)
../engine/platform/types.h:207: S8 getMax(signed char, signed char)
../engine/platform/types.h:213: float getMax(float, float)
../engine/platform/types.h:219: double getMax(double, double)
../engine/core/dataChunker.h:60: call of overloaded 'getMax(long unsigned int, long unsigned int)' is ambiguous
../engine/platform/types.h:177: candidates are: U32 getMax(unsigned int, unsigned int)
../engine/platform/types.h:183: U16 getMax(short unsigned int, short unsigned int)
../engine/platform/types.h:189: U8 getMax(unsigned char, unsigned char)
../engine/platform/types.h:195: S32 getMax(int, int)
../engine/platform/types.h:201: S16 getMax(short int, short int)
../engine/platform/types.h:207: S8 getMax(signed char, signed char)
../engine/platform/types.h:213: float getMax(float, float)
../engine/platform/types.h:219: double getMax(double, double)
I just licensed the engine a few days ago, and have been spending some time this weekend trying to get it to compile. It was not working, and after reading the README a few more times, checking the online docs, and this forum, I still can not get it to compile.. Here's what I've done:
1. downloaded the CVS HEAD according to the cvs docs for "unix" (command line). (7/19/03)
2. loaded the torque_pb_2_1.pbproj file into PB 2.1 (Dec '02)
3. changed the project info to put build targets into ../example
4. clicked the radio button to put intermediate builds into the same directory as target builds
5. dechecked "activate CVS integration" and "rebuild indexes"
6. Clicked "build" (gets the error)
7. Clicked "build" again (gets same error)
note for those who want to make witty observations on my path names: t2 = temporary2, not tribes2.. I had a previous checkout of release_1_1_2 or whatever it was in t1
Also, I tried applied Dean's patch hosted on Krabbit world, and it did not eliminate the error. Although to be honest, I'm not sure if it was the same error or file. I explicitly remember seeing that it still caused problems with S32 and U32 types, so I assumed it was the same error (since) the patch supposedly changed those types)
I have no experience dealing with a project of this size on a non-linux platform, and even on linux, my experience with large projects (over 30 files) has been compiling stuff, and any errors I found were generally due to library version mismatches, not anything in the code. I really appreciate any help I can get on this.
The full error listed in PB includes the build command line, which is long, and so I put a copy of that + the error message on my home page area. Here is the link skott.homeip.net/temporary/torque_error.html
The pertinent stuff (I think):
../engine/core/dataChunker.h: In constructor 'FreeListChunker
../engine/sim/netEvent.cc:14: instantiated from here
../engine/core/dataChunker.h:60: call of overloaded 'getMax(long unsigned int, long unsigned int)' is ambiguous
../engine/platform/types.h:177: candidates are: U32 getMax(unsigned int, unsigned int)
../engine/platform/types.h:183: U16 getMax(short unsigned int, short unsigned int)
../engine/platform/types.h:189: U8 getMax(unsigned char, unsigned char)
../engine/platform/types.h:195: S32 getMax(int, int)
../engine/platform/types.h:201: S16 getMax(short int, short int)
../engine/platform/types.h:207: S8 getMax(signed char, signed char)
../engine/platform/types.h:213: float getMax(float, float)
../engine/platform/types.h:219: double getMax(double, double)
../engine/core/dataChunker.h:60: call of overloaded 'getMax(long unsigned int, long unsigned int)' is ambiguous
../engine/platform/types.h:177: candidates are: U32 getMax(unsigned int, unsigned int)
../engine/platform/types.h:183: U16 getMax(short unsigned int, short unsigned int)
../engine/platform/types.h:189: U8 getMax(unsigned char, unsigned char)
../engine/platform/types.h:195: S32 getMax(int, int)
../engine/platform/types.h:201: S16 getMax(short int, short int)
../engine/platform/types.h:207: S8 getMax(signed char, signed char)
../engine/platform/types.h:213: float getMax(float, float)
../engine/platform/types.h:219: double getMax(double, double)
About the author
#2
I did a ...
cvs update -d -A -D "July 1, 2003 10:05pm"
... on my torque source, which was the date prior to one of Mark Frohnmayer's commits that contained the most recent update for netEvent.cc, according to the TGE CVS Change List.
I initially tried building after reverting only the three files in Mark's update to the pre-July 2nd versions, but that resulted in a linking error and caused the build to fail. So I reverted the entire source to the July 1st version.
As it stands now, I can build and run the test, but I am missing out on anything added to the source since July 1st. Anybody have any ideas on what may have broken it?
I'll definitely try looking into it myself, but I'm completely unfamiliar with the code, having just downloaded it, and I've never worked on a big C++ project, so I'd expect myself to be a little slow in figuring it out.
07/19/2003 (5:40 pm)
Ok, here's the news:I did a ...
cvs update -d -A -D "July 1, 2003 10:05pm"
... on my torque source, which was the date prior to one of Mark Frohnmayer's commits that contained the most recent update for netEvent.cc, according to the TGE CVS Change List.
I initially tried building after reverting only the three files in Mark's update to the pre-July 2nd versions, but that resulted in a linking error and caused the build to fail. So I reverted the entire source to the July 1st version.
As it stands now, I can build and run the test, but I am missing out on anything added to the source since July 1st. Anybody have any ideas on what may have broken it?
I'll definitely try looking into it myself, but I'm completely unfamiliar with the code, having just downloaded it, and I've never worked on a big C++ project, so I'd expect myself to be a little slow in figuring it out.
#3
elementSize = getMax(sizeof(T), sizeof(T *));
I changed it to:
elementSize = getMax((S32)sizeof(T), (S32)sizeof(T *));
and it works fine.
07/20/2003 (4:10 pm)
The problem is on line 60 of dataChunker.h:elementSize = getMax(sizeof(T), sizeof(T *));
I changed it to:
elementSize = getMax((S32)sizeof(T), (S32)sizeof(T *));
and it works fine.
#4
Here's a shortened version of my link error. None of these sound really fatal to me. They all show up in PB as only warnings..
ld: warning multiple definitions of symbol _crc32
ld: warning multiple definitions of symbol _get_crc_table
ld: warning multiple definitions of symbol _deflateParams
ld: warning multiple definitions of symbol _deflate
ld: warning multiple definitions of symbol _deflateEnd
ld: warning multiple definitions of symbol _deflateInit_
ld: warning multiple definitions of symbol _deflateInit2_
ld: warning multiple definitions of symbol _deflateCopy
ld: warning multiple definitions of symbol _deflateReset
ld: warning multiple definitions of symbol _deflateSetDictionary
ld: warning multiple definitions of symbol _deflate_copyright
ld: warning multiple definitions of symbol _inflateSync
ld: warning multiple definitions of symbol _inflateInit_
ld: warning multiple definitions of symbol _inflateSetDictionary
ld: warning multiple definitions of symbol _inflate
ld: warning multiple definitions of symbol _inflateSyncPoint
ld: warning multiple definitions of symbol _inflateEnd
ld: warning multiple definitions of symbol _inflateInit2_
ld: warning multiple definitions of symbol _inflateReset
ld: warning multiple definitions of symbol __tr_stored_block
ld: warning multiple definitions of symbol __dist_code
ld: warning multiple definitions of symbol __length_code
ld: warning multiple definitions of symbol __tr_align
ld: warning multiple definitions of symbol __tr_flush_block
ld: warning multiple definitions of symbol __tr_init
ld: warning multiple definitions of symbol __tr_tally
ld: warning multiple definitions of symbol _adler32
ld: warning multiple definitions of symbol _zcfree
ld: warning multiple definitions of symbol _z_errmsg
ld: warning multiple definitions of symbol _zlibVersion
ld: warning multiple definitions of symbol _zError
ld: warning multiple definitions of symbol _zcalloc
ld: warning multiple definitions of symbol _inflate_blocks
ld: warning multiple definitions of symbol _inflate_blocks_free
ld: warning multiple definitions of symbol _inflate_blocks_new
ld: warning multiple definitions of symbol _inflate_blocks_reset
ld: warning multiple definitions of symbol _inflate_blocks_sync_point
ld: warning multiple definitions of symbol _inflate_set_dictionary
ld: warning multiple definitions of symbol _gzsetparams
ld: warning multiple definitions of symbol _gzwrite
ld: warning multiple definitions of symbol _gztell
ld: warning multiple definitions of symbol _gzclose
ld: warning multiple definitions of symbol _gzdopen
ld: warning multiple definitions of symbol _gzeof
ld: warning multiple definitions of symbol _gzerror
ld: warning multiple definitions of symbol _gzflush
ld: warning multiple definitions of symbol _gzgetc
ld: warning multiple definitions of symbol _gzgets
ld: warning multiple definitions of symbol _gzopen
ld: warning multiple definitions of symbol _gzprintf
ld: warning multiple definitions of symbol _gzputc
ld: warning multiple definitions of symbol _gzputs
ld: warning multiple definitions of symbol _gzread
ld: warning multiple definitions of symbol _gzrewind
ld: warning multiple definitions of symbol _gzseek
ld: warning multiple definitions of symbol _inflate_codes
ld: warning multiple definitions of symbol _inflate_codes_free
ld: warning multiple definitions of symbol _inflate_codes_new
ld: warning multiple definitions of symbol _inflate_mask
ld: warning multiple definitions of symbol _inflate_flush
ld: warning multiple definitions of symbol _inflate_trees_dynamic
ld: warning multiple definitions of symbol _inflate_copyright
ld: warning multiple definitions of symbol _inflate_trees_fixed
ld: warning multiple definitions of symbol _inflate_trees_bits
ld: warning multiple definitions of symbol _inflate_fast
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
07/20/2003 (6:02 pm)
I tried making that edit, and now it builds all the way through, but fails to link at the end..Here's a shortened version of my link error. None of these sound really fatal to me. They all show up in PB as only warnings..
ld: warning multiple definitions of symbol _crc32
ld: warning multiple definitions of symbol _get_crc_table
ld: warning multiple definitions of symbol _deflateParams
ld: warning multiple definitions of symbol _deflate
ld: warning multiple definitions of symbol _deflateEnd
ld: warning multiple definitions of symbol _deflateInit_
ld: warning multiple definitions of symbol _deflateInit2_
ld: warning multiple definitions of symbol _deflateCopy
ld: warning multiple definitions of symbol _deflateReset
ld: warning multiple definitions of symbol _deflateSetDictionary
ld: warning multiple definitions of symbol _deflate_copyright
ld: warning multiple definitions of symbol _inflateSync
ld: warning multiple definitions of symbol _inflateInit_
ld: warning multiple definitions of symbol _inflateSetDictionary
ld: warning multiple definitions of symbol _inflate
ld: warning multiple definitions of symbol _inflateSyncPoint
ld: warning multiple definitions of symbol _inflateEnd
ld: warning multiple definitions of symbol _inflateInit2_
ld: warning multiple definitions of symbol _inflateReset
ld: warning multiple definitions of symbol __tr_stored_block
ld: warning multiple definitions of symbol __dist_code
ld: warning multiple definitions of symbol __length_code
ld: warning multiple definitions of symbol __tr_align
ld: warning multiple definitions of symbol __tr_flush_block
ld: warning multiple definitions of symbol __tr_init
ld: warning multiple definitions of symbol __tr_tally
ld: warning multiple definitions of symbol _adler32
ld: warning multiple definitions of symbol _zcfree
ld: warning multiple definitions of symbol _z_errmsg
ld: warning multiple definitions of symbol _zlibVersion
ld: warning multiple definitions of symbol _zError
ld: warning multiple definitions of symbol _zcalloc
ld: warning multiple definitions of symbol _inflate_blocks
ld: warning multiple definitions of symbol _inflate_blocks_free
ld: warning multiple definitions of symbol _inflate_blocks_new
ld: warning multiple definitions of symbol _inflate_blocks_reset
ld: warning multiple definitions of symbol _inflate_blocks_sync_point
ld: warning multiple definitions of symbol _inflate_set_dictionary
ld: warning multiple definitions of symbol _gzsetparams
ld: warning multiple definitions of symbol _gzwrite
ld: warning multiple definitions of symbol _gztell
ld: warning multiple definitions of symbol _gzclose
ld: warning multiple definitions of symbol _gzdopen
ld: warning multiple definitions of symbol _gzeof
ld: warning multiple definitions of symbol _gzerror
ld: warning multiple definitions of symbol _gzflush
ld: warning multiple definitions of symbol _gzgetc
ld: warning multiple definitions of symbol _gzgets
ld: warning multiple definitions of symbol _gzopen
ld: warning multiple definitions of symbol _gzprintf
ld: warning multiple definitions of symbol _gzputc
ld: warning multiple definitions of symbol _gzputs
ld: warning multiple definitions of symbol _gzread
ld: warning multiple definitions of symbol _gzrewind
ld: warning multiple definitions of symbol _gzseek
ld: warning multiple definitions of symbol _inflate_codes
ld: warning multiple definitions of symbol _inflate_codes_free
ld: warning multiple definitions of symbol _inflate_codes_new
ld: warning multiple definitions of symbol _inflate_mask
ld: warning multiple definitions of symbol _inflate_flush
ld: warning multiple definitions of symbol _inflate_trees_dynamic
ld: warning multiple definitions of symbol _inflate_copyright
ld: warning multiple definitions of symbol _inflate_trees_fixed
ld: warning multiple definitions of symbol _inflate_trees_bits
ld: warning multiple definitions of symbol _inflate_fast
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
#5
07/20/2003 (8:07 pm)
Try adding interior/pathedInterior.cc to your project
#6
"Mac OS X already includes zlib as a shared library, and so -lz links the shared library instead of the one that the 'make' compiled. For zlib 1.1.3, the two are incompatible due to different compile-time options. Simply change the -lz in the Makefile to libz.a, and it will use the compiled library instead of the shared one and the 'make test' will succeed."
Source: http://www.gzip.org/zlib/zlib_faq.html#OS-X
07/20/2003 (9:09 pm)
Perhaps this might be pertinent information:"Mac OS X already includes zlib as a shared library, and so -lz links the shared library instead of the one that the 'make' compiled. For zlib 1.1.3, the two are incompatible due to different compile-time options. Simply change the -lz in the Makefile to libz.a, and it will use the compiled library instead of the shared one and the 'make test' will succeed."
Source: http://www.gzip.org/zlib/zlib_faq.html#OS-X
#7
What you posted above is only warnings, not errors. And yes, those are 'standard'.
What 'error' are you getting?
d
07/20/2003 (9:30 pm)
Scott -What you posted above is only warnings, not errors. And yes, those are 'standard'.
What 'error' are you getting?
d
#8
It looks like Kurtis was right, interior/pathedInterior.cc existed, but was not part of the PB_2_1 project file, I added it, and it compiled successfully! I'm getting a "failed to open main.cs" error when I try to run the resultant executable now, though. This did not happen for me with the pre July 2nd data.
07/20/2003 (9:40 pm)
David,It looks like Kurtis was right, interior/pathedInterior.cc existed, but was not part of the PB_2_1 project file, I added it, and it compiled successfully! I'm getting a "failed to open main.cs" error when I try to run the resultant executable now, though. This did not happen for me with the pre July 2nd data.
#9
Looks like I'm good. Thanks for all the help! Will the interior/pathedInterior.cc in the pbproj file and adding typing to dataChunker.cc be added to CVS?
07/20/2003 (10:53 pm)
Ok, just redid everything and ran the executable from within PB. For some reason, it wasn't letting me do that before (icon was shaded) but I re-selected "Torque-MacCarbon-Debug" as the target executable and that seemed to jog things into place. Looks like I'm good. Thanks for all the help! Will the interior/pathedInterior.cc in the pbproj file and adding typing to dataChunker.cc be added to CVS?
#10
07/21/2003 (10:56 am)
Whoops... I'll check these fixes into the head in a bit.
#11
As per the datachunker.h, I understand that the (overloaded) getmax method didn't know how to interpret the call (hence the ambiguous error), but how did you know it was S32 (regular integer's, apparently) as opposed to, say, a float?
How did you know intererior.cc was missing?
--
Scott - what do you mean by "redid everything?" I think I messed up in setting the proj. file as per the readme...guess I'll have to go back and check.
07/22/2003 (11:43 am)
Kurtis - thanks for the help, it got me up to Scott's "failed to open main.cs" . Now, mind explaining how you knew what the solution was?As per the datachunker.h, I understand that the (overloaded) getmax method didn't know how to interpret the call (hence the ambiguous error), but how did you know it was S32 (regular integer's, apparently) as opposed to, say, a float?
How did you know intererior.cc was missing?
--
Scott - what do you mean by "redid everything?" I think I messed up in setting the proj. file as per the readme...guess I'll have to go back and check.
#12
I got the main.cs error because I tried running the Torque Demo Debug App.app (sp?) from the Finder. I tried doing this because I was able to build successfully, but the icon for running the app in PowerBuilder was greyed out and wouldn't work.
To eliminate any screwups on my part, since I'd been working on things somewhat piecemeal, I restarted from a fresh copy of my Head backup, I made the changes to dataChunker.cc, added the pathedInterior.cc and re-did the build. To my dismay, the "run application" icon was still greyed out after a successful build, but then I clicked on the "Target" pulldown in the upper-right-ish area of the build window. It already had "Torque Debug Demo" (whatever) selected, and I just selected it again, but after doing so, the icon lit up, and I was able to run the debug successfully from within PowerBuilder.
I'm guessing that if I tried to run it from the Finder again, it would still give me a main.cs error, but I am assuming that if I build a "release" version, that wouldn't happen? Or maybe I'd have to be more explicit with which "mod" to load.. Haven't gotten that far yet.
07/22/2003 (12:06 pm)
Matthew,I got the main.cs error because I tried running the Torque Demo Debug App.app (sp?) from the Finder. I tried doing this because I was able to build successfully, but the icon for running the app in PowerBuilder was greyed out and wouldn't work.
To eliminate any screwups on my part, since I'd been working on things somewhat piecemeal, I restarted from a fresh copy of my Head backup, I made the changes to dataChunker.cc, added the pathedInterior.cc and re-did the build. To my dismay, the "run application" icon was still greyed out after a successful build, but then I clicked on the "Target" pulldown in the upper-right-ish area of the build window. It already had "Torque Debug Demo" (whatever) selected, and I just selected it again, but after doing so, the icon lit up, and I was able to run the debug successfully from within PowerBuilder.
I'm guessing that if I tried to run it from the Finder again, it would still give me a main.cs error, but I am assuming that if I build a "release" version, that wouldn't happen? Or maybe I'd have to be more explicit with which "mod" to load.. Haven't gotten that far yet.
#13
The undefined symbols mentioned pathedInterior, plus I noticed it was added in the VC6 project.
07/22/2003 (12:15 pm)
On line 52 in dataChunker.h I noticed that elementSize was declared as a S32, so I figured that was what we wanted.The undefined symbols mentioned pathedInterior, plus I noticed it was added in the VC6 project.
#14
Kurtis - thanks, if I had looked harder, I might have figured that out myself.
Both of you, thanks for the generosity in answering my beginner questions. I'm in the midst of learning not only programming in Unix land, but Apple's version of it, as well.
07/22/2003 (1:12 pm)
Scott - Thanks for the clarification. (My main issue I think was the build location had gotten reset in all the madness of getting setup, re-dowloading the current version, etc.) Even if it wasn't my exact issue, it's helping me learn ProjectBuilder.Kurtis - thanks, if I had looked harder, I might have figured that out myself.
Both of you, thanks for the generosity in answering my beginner questions. I'm in the midst of learning not only programming in Unix land, but Apple's version of it, as well.
#15
This said, I haven't built a plain HEAD with no extra code in quite a while, so not sure about its current state.
Hope you guys are up and running
07/22/2003 (4:25 pm)
You shouldn't get the main.cs error when running the demo from the Finder. That's broken behaviour, and was fixed quite a while ago.This said, I haven't built a plain HEAD with no extra code in quite a while, so not sure about its current state.
Hope you guys are up and running
#16
07/22/2003 (8:26 pm)
I'm good for now. I'll worry about the "main.cs" thing when I get to it. I've got to try to get everything to compile on Windows now, and then I can start having some fun. Maybe.
#17
07/22/2003 (9:19 pm)
Well, I did it at work today (during lunch! ;) and about two hours ago here at home. Both finder-launched and PB launched work. (Are you sure the executable you double-clicked wasn't an old one in a different directory?)
#18
07/22/2003 (10:13 pm)
I just ran one of the debug things I built using the finder, and it worked ok, so I don't know what my problem was before. I've got like four copies of the source tree now, time to get organized and maybe set up my own CVS server! Thanks all.
#19
How do I fix this?
tone
07/30/2003 (10:26 am)
I will have issues (after adding PathedInterior.cc) like those like the libz examples shown above. Where (in PB) do I find the linker flags that mnight fix this? Under project settings' linker settings, I see no "-lz" mentioned.How do I fix this?
tone
#20
I don't think that would be a problem. That FAQ on the gzip.org site sounds specific to building the zlib libraries themselves, or testing them, at least.
What error are you getting?
07/30/2003 (11:17 am)
Anthony,I don't think that would be a problem. That FAQ on the gzip.org site sounds specific to building the zlib libraries themselves, or testing them, at least.
What error are you getting?
Torque Owner Scott Kearney
On the laptop, I tried using both 10_2 and the 2_1 .pbproj files, each on a fresh copy from my HEAD backup (checked out today), both had the same result in netEvent.cc