Anyone able to compile tools aout of the box on Linux?
by Clemens Eisserer · in Technical Issues · 02/21/2004 (7:56 am) · 6 replies
Hello!
I've just downloaded Torque-SDK via CVS and I'm wondering if anyone is able to compile tht tools out of the box?
If I only say "make" after configuring the build-setting everything works fine, except that my torqueDemo executable crashes. (See "Torque-SDK-Bugs" Forum if you are interrested).
But if I says make tools or make all I get tons of linker-errors that functions of vorbis can not be resolves and stuff like OPenGL-Shutdown and redbook-device stuff can't be resolves.
I had a look at the makefiles and I really dont wonder why it doesnt work.
Take a look at this (conf.UNIX.mk is used for Linux):
LINK.LIBS.TOOLS = -Wl,-static -Wl,/usr/lib/libGLU.so.1 -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
Where are the vorbis-libs, where is the torque-stuff, where is the openGl-lib. This thing cant work.
Have I only downloaded a old version or arent the Linux-Build scripts up-to-date? Do I make anything wrong? Till know I'm only having troubles with the download sources.
Please help, I'm not a Unix-GCC-C**-LINUX Guru so that I can help myself :-(
I've just downloaded Torque-SDK via CVS and I'm wondering if anyone is able to compile tht tools out of the box?
If I only say "make" after configuring the build-setting everything works fine, except that my torqueDemo executable crashes. (See "Torque-SDK-Bugs" Forum if you are interrested).
But if I says make tools or make all I get tons of linker-errors that functions of vorbis can not be resolves and stuff like OPenGL-Shutdown and redbook-device stuff can't be resolves.
I had a look at the makefiles and I really dont wonder why it doesnt work.
Take a look at this (conf.UNIX.mk is used for Linux):
LINK.LIBS.TOOLS = -Wl,-static -Wl,/usr/lib/libGLU.so.1 -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
Where are the vorbis-libs, where is the torque-stuff, where is the openGl-lib. This thing cant work.
Have I only downloaded a old version or arent the Linux-Build scripts up-to-date? Do I make anything wrong? Till know I'm only having troubles with the download sources.
Please help, I'm not a Unix-GCC-C**-LINUX Guru so that I can help myself :-(
#2
The problem of my linker is, that it does not know the -lGLU flag, so I simply hardcoded the GLU-LIb name. I don't understand the problem, dynlibs can be statically linked as far as I know. Does -lGLU anything different than replacing the flag with the full library name.
Of course I did a "make clean" bwfore "make tools".
I edited the makefile to use my system-vorbis-libs and after editing the line exactly like you did the vorbis symbols were found.
However symbols like OpenGLShutdown, CreateReedBookDevice etc were still missing. Any ideas?
Thanks a lot for your help, lg Clemens
02/21/2004 (10:19 am)
Hi again and thank you for your response!The problem of my linker is, that it does not know the -lGLU flag, so I simply hardcoded the GLU-LIb name. I don't understand the problem, dynlibs can be statically linked as far as I know. Does -lGLU anything different than replacing the flag with the full library name.
Of course I did a "make clean" bwfore "make tools".
I edited the makefile to use my system-vorbis-libs and after editing the line exactly like you did the vorbis symbols were found.
However symbols like OpenGLShutdown, CreateReedBookDevice etc were still missing. Any ideas?
Thanks a lot for your help, lg Clemens
#3
That could cause the tools to fail to compile (and it might also cause your crash problem with the torque demo). But other than that, I don't know why the tools won't build on your system. I did "make clean", "make tools" with the head code and it worked. OpenGLShutdown and other functions are defined in the platformX86UNIX code, so if it is compiling correctly, they should be found.
02/21/2004 (1:38 pm)
Dynamic libs cannot be linked statically. You need a libGLU.a file. There may be one in the mesa package provided by SuSE. If not you'll have to get the mesa package and compile it from source.That could cause the tools to fail to compile (and it might also cause your crash problem with the torque demo). But other than that, I don't know why the tools won't build on your system. I did "make clean", "make tools" with the head code and it worked. OpenGLShutdown and other functions are defined in the platformX86UNIX code, so if it is compiling correctly, they should be found.
#4
02/22/2004 (6:29 am)
Make sure that libGLU.so is in /usr/X11R6/lib and not some other location.
#5
I recompilied the whole thing with a static-version of libGLU and wow, it works!! I played a little bit arraound with it and, wow, yes, thats the game engine I ever searched for! Cool!
However, "make tools" still does not work. It seems all symbols of extern libs are found, but Torque-Symbols are causing the troubles.
Note that before make tools I did a normal make so that all the torque-base stuff is compiled (and before make i did make clean).
--> Linking map2dif_DEBUG.bin
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXProcessControl.obj)(.text+0x10c): In function 'Cleanup(bool)':
platformX86UNIX/x86UNIXProcessControl.cc:78: undefined reference to 'OpenGLShutdown'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x541): In function 'ProcessSYSWMEvent':
platformX86UNIX/x86UNIXWindow.cc:206: undefined reference to 'NotifySelectionEvent(_XEvent&)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x9cc): In function 'Platform::AlertOK(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:429: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x9e8):platformX86UNIX/x86UNIXWindow.cc:430: undefined reference to 'XMessageBox::alertOK(char const*, char const*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xa0f):platformX86UNIX/x86UNIXWindow.cc:432: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xa25):platformX86UNIX/x86UNIXWindow.cc:432: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb02): In function 'Platform::AlertOKCancel(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:454: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb1e):platformX86UNIX/x86UNIXWindow.cc:455: undefined reference to 'XMessageBox::alertOKCancel(char const*, char const*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb50):platformX86UNIX/x86UNIXWindow.cc:459: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb86):platformX86UNIX/x86UNIXWindow.cc:459: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xc6c): In function 'Platform::AlertRetry(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:482: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xc88):platformX86UNIX/x86UNIXWindow.cc:483:
.....
.....
.....
02/22/2004 (10:25 am)
Hi again, sorry for nerving that much...I recompilied the whole thing with a static-version of libGLU and wow, it works!! I played a little bit arraound with it and, wow, yes, thats the game engine I ever searched for! Cool!
However, "make tools" still does not work. It seems all symbols of extern libs are found, but Torque-Symbols are causing the troubles.
Note that before make tools I did a normal make so that all the torque-base stuff is compiled (and before make i did make clean).
--> Linking map2dif_DEBUG.bin
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXProcessControl.obj)(.text+0x10c): In function 'Cleanup(bool)':
platformX86UNIX/x86UNIXProcessControl.cc:78: undefined reference to 'OpenGLShutdown'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x541): In function 'ProcessSYSWMEvent':
platformX86UNIX/x86UNIXWindow.cc:206: undefined reference to 'NotifySelectionEvent(_XEvent&)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x9cc): In function 'Platform::AlertOK(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:429: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0x9e8):platformX86UNIX/x86UNIXWindow.cc:430: undefined reference to 'XMessageBox::alertOK(char const*, char const*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xa0f):platformX86UNIX/x86UNIXWindow.cc:432: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xa25):platformX86UNIX/x86UNIXWindow.cc:432: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb02): In function 'Platform::AlertOKCancel(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:454: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb1e):platformX86UNIX/x86UNIXWindow.cc:455: undefined reference to 'XMessageBox::alertOKCancel(char const*, char const*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb50):platformX86UNIX/x86UNIXWindow.cc:459: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xb86):platformX86UNIX/x86UNIXWindow.cc:459: undefined reference to 'XMessageBox::~XMessageBox [in-charge]()'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xc6c): In function 'Platform::AlertRetry(char const*, char const*)':
platformX86UNIX/x86UNIXWindow.cc:482: undefined reference to 'XMessageBox::XMessageBox[in-charge](_XDisplay*)'
../engine/out.GCC3.DEBUG/engine_DEBUG.a(x86UNIXWindow.obj)(.text+0xc88):platformX86UNIX/x86UNIXWindow.cc:483:
.....
.....
.....
#6
02/25/2004 (12:41 am)
I also have Linux Probs.
Torque Owner John Quigley
-Wl,-static -Wl,/usr/lib/libGLU.so.1 -Wl,-dy
This line is trying to statically link a dynamic library. Very bad. Did you add this yourself, or was it in the makefile?
Second, before building the tools, you have to do a "make clean" in your build directory. Then do "make tools".
Third, you're right that the makefiles are out of date. They should be including the vorbis libraries. I've updated the conf.UNIX.mk file in the head to include this. If you don't want to update to the head, you can add the vorbis libs like this:
Note that the tools will still not run unless you have vorbis installed on your system, or the vorbis libraries included with the SDK are in your LD_LIBRARY_PATH environment variable.