Message Boards

Topic: need help compiling on Linux  (Read 16353 times)

Offline lnxr0x

  • Posts: 4
    • View Profile
need help compiling on Linux
« 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

Offline Manc

  • Administrator
  • Posts: 77
  • Fist to the face!
    • View Profile
    • odamex.net
Re: need help compiling on Linux
« Reply #1 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. 
Odamex Web Administrator

Offline lnxr0x

  • Posts: 4
    • View Profile
Re: need help compiling on Linux
« Reply #2 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  ??

Offline AlexMax

  • Developer
  • Posts: 84
    • View Profile
    • AlexMax @ Github
Re: need help compiling on Linux
« Reply #3 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.

Offline lnxr0x

  • Posts: 4
    • View Profile
Re: need help compiling on Linux
« Reply #4 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 !!!

Offline AlexMax

  • Developer
  • Posts: 84
    • View Profile
    • AlexMax @ Github
Re: need help compiling on Linux
« Reply #5 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.

Offline lnxr0x

  • Posts: 4
    • View Profile
Re: need help compiling on Linux
« Reply #6 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 !!

Offline tauro

  • Posts: 2
    • View Profile
Re: need help compiling on Linux
« Reply #7 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


Offline Hekksy

  • Doomin' since '96
  • Administrator
  • Posts: 154
    • View Profile
Re: need help compiling on Linux
« Reply #8 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.
Join the Odamex Steam group! http://steamcommunity.com/groups/odamex
Check out the Odamex Discord as well: https://discord.gg/vHUu236

Offline tauro

  • Posts: 2
    • View Profile
Re: need help compiling on Linux
« Reply #9 on: March 06, 2013, 11:21:37 »
Thank you for answering HeX9109. I didn't see it before. Finally, I compiled successfully.