|
From: Bernhard W. <be...@bl...> - 2012-12-06 16:49:24
|
Hi Charles Ok, I can show you what I do in such cases: 1. Cut out the failing program from config.log (attached), failing tests show the code in the config.log. 2. Try to compile it on the command line with the given command from config.log (adopted to the filename where you have saved the code, for me this is now: g++ -o conftest -g -O2 -Wall -fPIC -O2 -DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES -L test.cpp -lm Result: /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/crt1.o: In function `_start': /home/abuild/rpmbuild/BUILD/glibc-2.14.1/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: ld returned 1 exit status AHA! 3. Fiddle with the command, I added -v to get more information: g++ -o conftest -g -O2 -Wall -fPIC -O2 -DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES -L test.cpp -lm -v Result: COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.6 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.6.2 (SUSE Linux) COMPILER_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.6/:/usr/lib64/gcc/x86_64-suse-linux/4.6/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.6/:/usr/lib64/gcc/x86_64-suse-linux/:/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ LIBRARY_PATH=/usr/lib64/gcc/x86_64-suse-linux/4.6/:/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib/:/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-o' 'conftest' '-g' '-O2' '-Wall' '-fPIC' '-O2' '-D' 'USE_RANDR_EXT' '-D' 'GL_GLEXT_PROTOTYPES' '-Ltest.cpp' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib64/gcc/x86_64-suse-linux/4.6/collect2 --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/crt1.o /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.6/crtbegin.o -Ltest.cpp -L/usr/lib64/gcc/x86_64-suse-linux/4.6 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib64/gcc/x86_64-suse-linux/4.6/crtend.o /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/crtn.o /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/crt1.o: In function `_start': /home/abuild/rpmbuild/BUILD/glibc-2.14.1/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: ld returned 1 exit status 4. Analyse carefully: ... -Ltest.cpp ... oh? -L is for giving linking directories, so this -L might be the cause (maybe this worked with old gcc versions or comes in for some weird reason on your system, maybe old autotools put this into the TORCS 1.2.4 configure script, I can just guess from here)? 5. Try changed command: g++ -o conftest -g -O2 -Wall -fPIC -O2 -DUSE_RANDR_EXT -DGL_GLEXT_PROTOTYPES test.cpp -lm Result: Works like a charm Now how to resolve this, possibilities: - Edit directly "configure" (might be delicate, but just try) - or regenerate configure script (cd into the torcs source directory, where configure is located, run the commands in sequence (this might fail because your autotools might not work with the old configure.in etc.): aclocal autoheader automake autoconf - or use a more recent TORCS version (1.3.4) Best regards Bernhard On 12/04/2012 10:25 PM, cha...@ao... wrote: > > First of all, my apologiesbecause I emailed about this same problem a > few weeks ago. > The thing isI didn't get very far and pretty much gave up. > My problem is that the config.log file says it can't find find libm. > I've found "libm.so.6" and "libm-2.15.so" under /lib/i386-linux-gnu. > - Are they part of the solution? If so how do I get them in the > configure process? > - Also, how can I use the config.log file myself if there are any > problems later? I don't wantto have to use this mailing list everytime > I have a problem. > > The bigger problem here may be the fact that I'm completely new to > ubuntu and this style of computing. For instance I think I've only just > figured out what repositories and dependencies are (I think), so please > talk to me like I'm an absolute idiot if you're going to reply:) > > > This is for a university project so any help would be very much appreciated. > > Thanks :) > Charles > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > > > _______________________________________________ > Torcs-users mailing list > Tor...@li... > https://lists.sourceforge.net/lists/listinfo/torcs-users > |