Problems Compiling on Linux
by Michael Frick · in Torque Game Engine · 10/18/2003 (6:23 pm) · 3 replies
I am having trouble compiling on Linux. I have added config_types.h to the proper files and I have made the following change to
conf.UNIX.mk
From:
LINK.LIBS.TOOLS = -Wl,-static -Wl,-lGLU -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
To:
LINK.LIBS.TOOLS = $(LINK.LIBS.VORBIS) -Wl,-static -Wl,-lGLU -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
It compiles just fine until I hit this point...
--> Compiling platformX86UNIX/x86UNIXProcessControl.cc
--> Compiling platformX86UNIX/x86UNIXRedbook.cc
--> Compiling platformX86UNIX/x86UNIXSemaphore.cc
--> Compiling platformX86UNIX/x86UNIXStrings.cc
--> Compiling platformX86UNIX/x86UNIXThread.cc
--> Compiling platformX86UNIX/x86UNIXTime.cc
--> Compiling platformX86UNIX/x86UNIXWindow.cc
--> Compiling platformX86UNIX/x86UNIXUtils.cc
--> Linking out.GCC2.DEBUG/torqueDemo_DEBUG.bin
../lib/vorbis/linux/libvorbis.a(info.o)(.text+0x1ae): In function 'vorbis_comment_query':
: undefined reference to '__ctype_toupper'
../lib/vorbis/linux/libvorbis.a(info.o)(.text+0x286): In function 'vorbis_comment_query_count':
: undefined reference to '__ctype_toupper'
collect2: ld returned 1 exit status
make[1]: *** [out.GCC2.DEBUG/torqueDemo_DEBUG.bin] Error 1
make: *** [default] Error 2
I am on RedHat 9, GCC 3.2.2. I have tried creating a makefile with the GCC3 and GCC2 option with the same result.
Any help would be welcome.
conf.UNIX.mk
From:
LINK.LIBS.TOOLS = -Wl,-static -Wl,-lGLU -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
To:
LINK.LIBS.TOOLS = $(LINK.LIBS.VORBIS) -Wl,-static -Wl,-lGLU -Wl,-dy -L/usr/X11R6/lib -lSDL -lpthread -ldl # -lefence
It compiles just fine until I hit this point...
--> Compiling platformX86UNIX/x86UNIXProcessControl.cc
--> Compiling platformX86UNIX/x86UNIXRedbook.cc
--> Compiling platformX86UNIX/x86UNIXSemaphore.cc
--> Compiling platformX86UNIX/x86UNIXStrings.cc
--> Compiling platformX86UNIX/x86UNIXThread.cc
--> Compiling platformX86UNIX/x86UNIXTime.cc
--> Compiling platformX86UNIX/x86UNIXWindow.cc
--> Compiling platformX86UNIX/x86UNIXUtils.cc
--> Linking out.GCC2.DEBUG/torqueDemo_DEBUG.bin
../lib/vorbis/linux/libvorbis.a(info.o)(.text+0x1ae): In function 'vorbis_comment_query':
: undefined reference to '__ctype_toupper'
../lib/vorbis/linux/libvorbis.a(info.o)(.text+0x286): In function 'vorbis_comment_query_count':
: undefined reference to '__ctype_toupper'
collect2: ld returned 1 exit status
make[1]: *** [out.GCC2.DEBUG/torqueDemo_DEBUG.bin] Error 1
make: *** [default] Error 2
I am on RedHat 9, GCC 3.2.2. I have tried creating a makefile with the GCC3 and GCC2 option with the same result.
Any help would be welcome.
#2
The solution is to change conf.UNIX.mk so that it uses your system's vorbis libs instead of the SDK version. Look for LINK.LIBS.VORBIS in that file, hopefully it should be clear what to do.
10/19/2003 (11:19 am)
It looks like the included libvorbis.a is incompatible with your c library. I had kinda suspected that would happen when I checked in that file. Oh well. The solution is to change conf.UNIX.mk so that it uses your system's vorbis libs instead of the SDK version. Look for LINK.LIBS.VORBIS in that file, hopefully it should be clear what to do.
#3
10/19/2003 (7:23 pm)
Thank you, John. Your suggestion worked just fine. It was able to compile with no problem.
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name