Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5

Author Topic: LCS Compiling Issues  (Read 27106 times)

zaimoni

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #15 on: June 25, 2016, 08:52:19 pm »

Are we sure that's gcc being called by Code::Blocks?  -Og requests debug information to be linked; that's known-good for GCC 3.4.5 (decades old)

Requesting C++11 requires a not-too-archaic GCC.
Logged

Kamal-Sadek

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #16 on: June 30, 2016, 11:54:12 pm »

Yeah, as zaimoni mentioned, the -Og flag not working is pointing to the build system not being correctly set up (because that's definitely never happened to me before!). Updating your compiler might fix the -std=c++11 flag though. Make sure you're actually compiling with g++ and not gcc though, that might be an issue you're having, although without more context I'm not too sure. Assuming you haven't given up yet, is there anything else that might be useful information?
Logged

Sergius

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #17 on: July 01, 2016, 06:40:25 pm »

I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.

Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.
« Last Edit: July 01, 2016, 06:43:02 pm by Sergius »
Logged

Kamal-Sadek

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #18 on: July 08, 2016, 11:11:21 pm »

I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.

Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.


Woo, what that guy said!
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #19 on: July 09, 2016, 12:18:24 pm »

I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.

Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.



So I picked the very first option on the top of this image for TDM-GCC and started installing.



Then this happened.

Logged

Sergius

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #20 on: July 11, 2016, 01:06:34 pm »

Worked for me. Bad download maybe, try getting the file again? Check your internets?
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #21 on: July 13, 2016, 01:57:40 pm »

The second bundle installer and the second install option(Something about 32 bit and 64 bit) installed successfully. Will that work? Also, couldn't find lncurses when I went to Project > Build options

Logged

Sergius

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #22 on: July 13, 2016, 07:46:06 pm »

It's under linker settings tab (don't select Debug or Release but the parent node "Liberal Crime Squad").

Also the TDM setup should work fine if you uncheck "check for updated files".

No idea if it will compile in 64 bit, let us know if it works.
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #23 on: July 15, 2016, 09:30:59 am »

Code: [Select]
"Liberal Crime Squad - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).





Not sure why it points to Dev-Cpp for compilers installation directory. I remember using something like that to try(and fail) to compile LCS in a previous thread before uninstalling it sometime after.

EDIT: Even when clicking auto-detect and it detecting the TDM-GCC-64(Under D:\TDM-GCC-64), it still gives the same message.
EDIT2: Seems like trying to click "Run" instead of build and run gave a message that the project wasn't built, so I clicked yes and it actually seems to work? Will edit if it fails.

Code: [Select]
||=== Build: Debug in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp||In function 'void select_augmentation(Creature*)':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1743|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1743|warning: unused variable 'y' [-Wunused-variable]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1757|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1765|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1818|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1827|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1834|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1941|warning: 'selected_aug' may be used uninitialized in this function [-Wmaybe-uninitialized]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|319|warning: "FE_FONTSMOOTHINGSTANDARD" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5103|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|320|warning: "FE_FONTSMOOTHINGCLEARTYPE" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5104|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|322|warning: "SPI_SETFONTSMOOTHINGTYPE" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5101|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|323|warning: "SPI_GETFONTSMOOTHINGCONTRAST" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5107|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|324|warning: "SPI_SETFONTSMOOTHINGCONTRAST" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5108|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp||In function 'void end_cleartype_fix()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|368|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp||In function 'long unsigned int getSeed()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
||=== Build failed: 2 error(s), 14 warning(s) (0 minute(s), 56 second(s)) ===|

Two errors.
« Last Edit: July 15, 2016, 09:35:57 am by Taberone »
Logged

Sergius

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #24 on: July 15, 2016, 10:19:12 am »

Probably because the long int variable types are different in 64 bit than in 32 bit. Try the 32-bit compilers. (or make sure they're compiling in 32-bit mode, I know there's a flag somewhere but not sure where it goes, maybe there's a checkbox? HOWEVER this would only work if the GNU 32-bit libraries are included in your install...)

The only actual errors in that log are
Code: [Select]
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
« Last Edit: July 15, 2016, 10:23:14 am by Sergius »
Logged

Kamal-Sadek

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #25 on: July 19, 2016, 11:21:52 pm »

Hm, I didn't have a chance to test this on a failing build, so here's a chance to embarrass myself! What happens if you change the header of fnvHash from
Code: [Select]
void fnvHash(unsigned long &fnv_hash,unsigned long num)
to
Code: [Select]
void fnvHash(unsigned long &fnv_hash,intptr_t num)
It's worth the try, I suppose! It really should've been that type in the first place, from what I can gather at a glance. Fingers crossed!
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #26 on: July 20, 2016, 11:33:44 am »

Probably because the long int variable types are different in 64 bit than in 32 bit. Try the 32-bit compilers. (or make sure they're compiling in 32-bit mode, I know there's a flag somewhere but not sure where it goes, maybe there's a checkbox? HOWEVER this would only work if the GNU 32-bit libraries are included in your install...)

The only actual errors in that log are
Code: [Select]
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
Hm, I didn't have a chance to test this on a failing build, so here's a chance to embarrass myself! What happens if you change the header of fnvHash from
Code: [Select]
void fnvHash(unsigned long &fnv_hash,unsigned long num)
to
Code: [Select]
void fnvHash(unsigned long &fnv_hash,intptr_t num)
It's worth the try, I suppose! It really should've been that type in the first place, from what I can gather at a glance. Fingers crossed!



Not sure where the void fnvhash part is, and trying the first bundle installer for tdm-gcc this time(5.1.0.3) gave that error.
Logged

Sergius

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #27 on: July 21, 2016, 08:26:01 am »

Like I said, unchecking the option to look for updates in the install should get rid of the error.
Logged

Taberone

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #28 on: July 21, 2016, 09:48:58 am »

Like I said, unchecking the option to look for updates in the install should get rid of the error.

I remember unchecking it, though. Clicked tdm-gcc again and this time the "Check for updates" box was still checked. Tried unchecking the box and clicking the option to manage a tdm-gcc installation before opening it again, the box was checked again. Can't seem to get that box to actually stay unchecked.


Going back to the previous tdm-gcc-64, searching for void fnvHash(unsigned long &fnv_hash,unsigned long num) and replacing it with void fnvHash(unsigned long &fnv_hash,intptr_t num) seemed to work but now there's a new error:




Code: [Select]
||=== Build: Release in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp||In function 'long unsigned int getSeed()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
« Last Edit: July 21, 2016, 09:53:59 am by Taberone »
Logged

zaimoni

  • Bay Watcher
    • View Profile
Re: Code::Blocks "Easy Mode" compile doesn't give the latest LCS Version?
« Reply #29 on: July 21, 2016, 11:18:53 am »

The non-use of the intptr_t typedef probably is a systematic error...lather, rinse, repeat.

Sourceforge's mirror system doesn't even work properly in a web browser.  The automatic mirror selection pointed me at the nearest dead mirror.  Even with that manually overridden, the cloudfront frontend is choking every few minutes.  (I am intentionally downloading the archives rather than the installer, to allow proper backing up of the full install archive set locally.)

With this much of a version jump, I'll have to test to see whether current binutils works with the last-known-good MingW32 GCCs (4.3.3 and 4.2.1; later ones in the 4.x series die on syntax errors in compiler-generated assembly for just about anything significant, e.g. libpng).  I'm assuming, since TDM GCC 5.1.0 builds LCS, that it is "sane".
Logged
Pages: 1 [2] 3 4 5