Open cesss opened 5 years ago
Update: If you add the -I/mybuilddirectory/kernel flag to CXXFLAGS instead of CFLAGS or CPPFLAGS, it does work. It seems that the build system invokes the C++ compiler instead of the C compiler.
However, there's another problem: it fails when you do 'make install'. The Makefile.in seems to have a really weird (and obscure) way of getting the src directory, and it gets it wrong if you performed an out of source build.
FURTHER UPDATE: It seems that finally I succeeded in the install stage as well: In the Makefiles for the lib and the images directories, all the expressions $(srcdir)/$$i which are inside a loop need to be changed to just $$i (having it as $(srcdir)/$$i means that you have the same path concatenated twice, and this drives to failure in out of source builds).
BUT OOPS: The executable starts up successfully, but it crashes when I try to start a game. The top of the stack trace is as follows:
0 xconq 0x0000000105782a32 imfsample_configure(Tcl_Interp, Imfsample, int, char, int) + 274 (tkisamp.c:552) 1 xconq 0x0000000105781e43 imfsample_cmd(void, Tcl_Interp, int, char) + 419 (tkisamp.c:257) 2 Tcl 0x0000000105b746f3 TclInvokeStringCommand + 124
I'm on MacOS 10.12, which comes with Tcl/Tk 8.5 ...maybe 8.5 is too new for xconq?
@cesss @brentjohnson @Feneric @mikehenry-se
Would you by any chance be knowledgeable in the Xconq source code? I am trying to wrap around my head how the map is codified in the .g files e.g. in earth-50km.g.
Could you perhaps forward me to a part in the code the defines the codification?
Thanks!
If you try to configure and build xconq in an alternate build directory (for an "out of source" build), the compiler fails when building tkmain.c (and probably all other source files as well) because it cannot find acdefs.h. The reason seems to be that acdefs.h is of course created in the kernel subdirectory but in the build directory, rather than in the original src directory (this behaviour is correct: any build files should be created in the build directory... but however the include paths are ignoring the build directory, so the compiler cannot find acdefs.h)
Trying to workaround it by adding the proper -I/mybuilddirectory switch to either CPPFLAGS or CFLAGS environment variables doesn't work (configure seems to discard any -I switches from CFLAGS, and CPPFLAGS seems to be ignored).
Any ideas in how can I make an out of source build succeed?