Wargus / stratagus

The Stratagus strategy game engine
GNU General Public License v2.0
614 stars 115 forks source link

Latest Trunk release (8582) not compiling. #5

Closed timfel closed 8 years ago

timfel commented 8 years ago

I'm trying to compile the latest trunk release for the win32 platform using VC2012, and I'm getting an error several times that involves this "version-generated.h" file not being found. I've done a search in the entire trunk directory and haven't found it, and the file "C:\Games\Stratagus\trunk\build_\Release\genversion.exe" is erroring out as well, and when it goes to run genversion.exe, instead of it looking in the relase/debug directories. it looks for it in the directory above it, like this...

2> genversion.vcxproj -> C:\Games\Stratagus\trunk\build_\Release\genversion.exe <- this is the directory it gets compiled to...

4> 'C:\Games\Stratagus\trunk\build_\genversion' is not recognized as an internal or external command, 4> operable program or batch file.

See how after the "build_" folder there's no "release" or if I was compiling in the debug version, no "debug" folder... Something must be bad in where it's pointing to after it compiles genversion.exe... I'll try compiling the debug version and see what happens.


Imported from Launchpad using lp2gh.

timfel commented 8 years ago

(by dinky-dye-aussie) No luck. I've tried compiling the debug version as well, and even deleted the whole directory and started again with CMAKE and a fresh compile in that but no luck evening finding version-generated.h

timfel commented 8 years ago

(by dinky-dye-aussie) OK so I did a really fresh CMAKE build and this is the list of what if found and what didn't get found just so you guys can let me know if anything is wrong with it.

Could not find program MakeNSIS Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) Could not find Mikmod Could not find MNG Could NOT find OggVorbis libraries Found OpenGL: opengl32 Could not find OpenGL ES 1.1 libraries Could not find SDL_gles Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES) Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) Looking for sys/types.h Looking for sys/types.h - found Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of errno_t Check size of errno_t - done Looking for strcpy_s Looking for strcpy_s - found Looking for strncpy_s Looking for strncpy_s - found Looking for strcasestr Looking for strcasestr - not found <<<<<--------- is this critical to the generation of version-generated.h??????? Looking for strnlen Looking for strnlen - found Looking for getopt Looking for getopt - not found <<<<<--------- is this critical to the generation of version-generated.h??????? Looking for strcat_s Looking for strcat_s - found

All the other things in this build work, I just wanted to get the things it couldn't find, listed for you guys to look at.

I hope I'm making sense I've rushed the explaintion a bit.

timfel commented 8 years ago

(by pali) I commited more patches which cleaning our defines and patches which determinate errno_t, strcpy_s, strcasestr, strnlen, getopt and strcat_s. If these functions is not present in system, we will use implementation in in src/stratagus/util.cpp file. So this is not critical. Next patch is for generating stratagus version strings at compile time. Now stratagus version is present only in cmake file and version-generated.h is generated by program genversion which must be compiled before compiling stratagus. I wrote cmake rules which should do that.

So first question is: is program genversion compiled correctly? If yes, look at CMakelists.txt, find "add_custom_target(version ALL" and try to change path to genversion.

timfel commented 8 years ago

(by iddqd-mail) Well, i'm experiencing the same bug too. I had to compile the genversion.exe manually and place it into solution's directory. The genversion.exe currently is placed into Debug/Release folders, so the system can't find it

timfel commented 8 years ago

(by pali) So genversion.exe is correctly compiled? Try to change path in CMakeLists.txt where is called if it will work.

timfel commented 8 years ago

(by iddqd-mail) Fixed in r8585

timfel commented 8 years ago

(by pali) Thanks for fix. Btw in future please separate commits, because now you commited in rev r8585 more then compile fix...

timfel commented 8 years ago

(by pali) I will need to rewrite this part which generating version, because it breaking also cross compilation.

cybermind, can you test if instead your change this will work (removing full path to genversion)?

add_custom_target(version ALL genversion ...)

Using RUNTIME_OUTPUT_DIRECTORY is not good idea, because this can be changed by global cmake variable. And cmake should know where it has generated binaries.

timfel commented 8 years ago

(by joris-dauphin) Pali wrote:

Btw in future please separate commits, because now you committed in rev r8585 more then compile fix...

I have already tell him without success, I hope he will listen to you...