|
From: Bernhard W. <be...@bl...> - 2013-01-12 14:00:34
|
Hi again Ok, I found something interestin, I will dig further into this later: from http://ubuntuforums.org/showthread.php?t=1525607 "the reason is the linker option --as-needed which is default since ubuntu 11.10" This might explain the difference to other systems, but I have to look closer. Best regards Bernhard On 01/09/2013 09:35 AM, Jasper van de Ven wrote: > Hello, > while preparing a system in order to develop a robot for torcs, I came > across two minor problems. > I am using a Ubuntu 12.10 64Bit system and the "For Linux and FreeBSD > from "all-in-one" Source Package". > > The first is a small bug in the make-setup of torcs-1.3.4. When > executing the 'make' command I got a linker error stating: > > g++ main.o linuxspec.o -L/home/<...>/torcs-1.3.4/export/lib -lopenal > -lalut -lvorbisfile -L/usr/lib -lracescreens -lrobottools -lclient > -lconfscreens -ltgf -ltgfclient -ltxml -lplibul -lraceengine > -lmusicplayer -llearning -lplibjs -lplibssgaux -lplibssg -lplibsm > -lplibsl -lplibsg -lplibul -lglut -lGLU -lGL -lpng -lz -ldl -lXrandr > -lXrender -lXxf86vm -lXmu -lXi -lXt -lSM -lICE -lXext -lX11 -lm -o > torcs-bin > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmShowStandings(void*, RmInfo*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmDriversSelect(void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmPitMenuStart(CarElt*, void*, void (*)(void*))' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RtTrackGetSeg(tTrkLocPos*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmLoadingScreenSetText(char const*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RtTrackHeightL(tTrkLocPos*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmFourStateScreen(char const*, char const*, char const*, void*, char > const*, char const*, void*, char const*, char const*, void*, char > const*, char const*, void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmRaceParamMenu(void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmShowResults(void*, RmInfo*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmTriStateScreen(char const*, char const*, char const*, void*, char > const*, char const*, void*, char const*, char const*, void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RtTrackLocal2Global(tTrkLocPos*, float*, float*, int)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmFileSelect(void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmTrackSelect(void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmLoadingScreenStart(char const*, char const*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmDisplayStartRace(RmInfo*, void*, void*)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RtTrackGetWidth(trackSeg*, float)' > /home/<...>/torcs-1.3.4/export/lib/libraceengine.so: undefined reference > to `RmShutdownLoadingScreen()' > collect2: error: ld returned 1 exit status > make[3]: *** [torcs-bin] Error 1 > > I was able to trace the error to a pair of missing linker option > (-lracescreens -lrobottools) while linking libraceengine.so. I fixed it > by adding the required options to the local Makfile and adding the > general call to the Make-default.mk template. > > The second bug I encountered addresses the robotgen script. Simply using > the provided script, directly compiling and installing the freshly and > unchanged driver, starting torcs and clicking "Race -> Quick Race -> > Configure Race" leads to a segmentation fault. For that matter all race > types have this problem as it is related to loading the freshly > generated robot. I was able to find the error in the <Robotname>.cpp > file where the name and description are set. I fixed the problem by > adding a string-duplication command to the robotgen script. > > All proposed fixes can be found in the attached patch. It can be easily > applied (supposed one is using a Linux system) by executing the command > 'patch -p1 -i torcs-1.3.4-fixes.patch' in the base folder. The patch was > generated against a unchanged version of the "For Linux and FreeBSD from > "all-in-one" Source Package". Hope this helps anyone experiencing > similar difficulties. > Greetings > Jasper > > > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > > > > _______________________________________________ > Torcs-users mailing list > Tor...@li... > https://lists.sourceforge.net/lists/listinfo/torcs-users > |