Odamex Message Boards

Community Discussion => Technical Support => Topic started by: lnxr0x on January 12, 2013, 17:00:00

Title: need help compiling on Linux
Post by: lnxr0x on January 12, 2013, 17:00:00
I'm currently trying to compile Odamex on Debian (squeeze) and getting the following error.

Code: [Select]
Linking CXX executable odamast
[ 94%] Built target odamast
[ 94%] Generating res/xrc_resource.h
/bin/sh: wxWidgets_wxrc_EXECUTABLE-NOTFOUND: not found
make[2]: *** [odalaunch/res/xrc_resource.h] Error 127
make[1]: *** [odalaunch/CMakeFiles/odalaunch.dir/all] Error 2
make: *** [all] Error 2

I believe WxWidgets is installed:
libwxgtk2.8-dev is already the newest version.

any help would be appreciated

Thanks
Title: Re: need help compiling on Linux
Post by: Manc on January 13, 2013, 03:19:53
There are two components to wx, the main build and wxrc.  If you are installing these all from packages, perhaps wxrc is a separate package. 
Title: Re: need help compiling on Linux
Post by: lnxr0x on January 13, 2013, 08:53:31
It looks like the cmake script is referring to /bin/wxrc but on Debian wxrc is in /usr/bin.

Is there a way I can tell cmake to look in /usr/bin for wxrc  ??
Title: Re: need help compiling on Linux
Post by: AlexMax on January 13, 2013, 11:02:17
It looks like the cmake script is referring to /bin/wxrc but on Debian wxrc is in /usr/bin.

Is there a way I can tell cmake to look in /usr/bin for wxrc  ??

Try this:

Code: [Select]
cmake .. -DwxWidgets_wxrc_EXECUTABLE=/usr/bin/wxrc
You can also set this variable from within cmake-gui or ccmake if you prefer.
Title: Re: need help compiling on Linux
Post by: lnxr0x on January 13, 2013, 11:51:39
That did the trick for wxrc !! .. so close !! .. but now I get the following ..
Code: [Select]
[ 97%] Building CXX object odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: initializer expression list treated as compound expression
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:437: error: expected ‘,’ or ‘;’ before ‘{’ token
make[2]: *** [odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o] Error 1
make[1]: *** [odalaunch/CMakeFiles/odalaunch.dir/all] Error 2
make: *** [all] Error 2

Thanks in advance for all the help !!!
Title: Re: need help compiling on Linux
Post by: AlexMax on January 13, 2013, 16:42:28
That did the trick for wxrc !! .. so close !! .. but now I get the following ..
Code: [Select]
[ 97%] Building CXX object odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: initializer expression list treated as compound expression
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:437: error: expected ‘,’ or ‘;’ before ‘{’ token
make[2]: *** [odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o] Error 1
make[1]: *** [odalaunch/CMakeFiles/odalaunch.dir/all] Error 2
make: *** [all] Error 2

Thanks in advance for all the help !!!

Unfortunately, Debian ships with an older version of wxWidgets which doesn't recognize the wxIntPtr type.  Apparently it's a wxWidgets 2.9-ism that was backported to a more recent version of wxWidgets 2.8...more recent than the copy included with Debian, apparently.

I have a headless debian box, and was able to get the program to compile by opening up odalaunch/src/lst_custom.cpp and putting the following line below all of the other #include lines but above the rest of the file:

Code: [Select]
typedef long int wxIntPtr;
See if that works for you.  I'll ping our launcher maintainer with this issue and get his take on it.
Title: Re: need help compiling on Linux
Post by: lnxr0x on January 28, 2013, 20:00:02
That did the trick !! Sorry for the delayed response, been busy. The only thing I couldn't do was get "make install" to work, so I just put the binaries in their own directory and everything works great.

Thanks for the help !!
Title: Re: need help compiling on Linux
Post by: tauro on January 29, 2013, 00:15:26
Hello, I get the same exact error message using Debian Squeeze!

What did the trick for you?? Can you please tell??

Thank you in advance

The error:

Code: [Select]
[ 97%] Building CXX object odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:435: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: ‘wxIntPtr’ was not declared in this scope
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:436: error: initializer expression list treated as compound expression
/home/lnxr0x/odamex-src-0.6.2/odalaunch/src/lst_custom.cpp:437: error: expected ‘,’ or ‘;’ before ‘{’ token
make[2]: *** [odalaunch/CMakeFiles/odalaunch.dir/src/lst_custom.cpp.o] Error 1
make[1]: *** [odalaunch/CMakeFiles/odalaunch.dir/all] Error 2
make: *** [all] Error 2

Title: Re: need help compiling on Linux
Post by: Hekksy on January 29, 2013, 04:49:15
Did you see this part?

Unfortunately, Debian ships with an older version of wxWidgets which doesn't recognize the wxIntPtr type.  Apparently it's a wxWidgets 2.9-ism that was backported to a more recent version of wxWidgets 2.8...more recent than the copy included with Debian, apparently.

I have a headless debian box, and was able to get the program to compile by opening up odalaunch/src/lst_custom.cpp and putting the following line below all of the other #include lines but above the rest of the file:

Code: [Select]
typedef long int wxIntPtr;
See if that works for you.  I'll ping our launcher maintainer with this issue and get his take on it.
Title: Re: need help compiling on Linux
Post by: tauro on March 06, 2013, 11:21:37
Thank you for answering HeX9109. I didn't see it before. Finally, I compiled successfully.