Build Errors on Ubuntu 12.04 64-Bit (solved)
Archives Forums/Linux Discussion/Build Errors on Ubuntu 12.04 64-Bit (solved)
| ||
I installed all of the 32-bit dependencies, however the system linker still cannot find some libraries. Building breakout Compiling:breakout.bmx flat assembler version 1.68 (32768 kilobytes memory) 4 passes, 33419 bytes. Linking:breakout.debug /usr/bin/ld: cannot find -lX11 /usr/bin/ld: cannot find -lXxf86vm /usr/bin/ld: cannot find -lGL /usr/bin/ld: cannot find -lGLU /usr/bin/ld: cannot find -lX11 /usr/bin/ld: cannot find -lXxf86vm /usr/bin/ld: cannot find -lGL /usr/bin/ld: cannot find -lfreetype collect2: ld returned 1 exit status Build Error: Failed to link /home/ekkehard/BlitzMax/samples/breakout/breakout.debug Process complete Using locate(1), I found the libraries residing in "/usr/lib/i386-linux-gnu". The loader ld(1) should normally find these, but for some reason, it doesn't. The reason is that the libraries must not have any version numbers after ".so". This must be some misconfiguration of "ld", b/c this problem should not occur normally. Creating symlinks manually can solve the issue, however: sudo bash cd /usr/lib/i386-linux-gnu ln -s libX11.so.6 libX11.so ln -s libXxf86vm.so.1 libXxf86vm.so ln -s libGLU.so.1 libGLU.so cd mesa ln -s libGL.so.1 libGL.so cd .. ln -s mesa/libGL.so libGL.so ln -s libfreetype.so.6 libfreetype.so exit After doing that, the build in MaxIDE succeeds and the program is launched: Building breakout Compiling:breakout.bmx flat assembler version 1.68 (32768 kilobytes memory) 4 passes, 33419 bytes. Linking:breakout.debug Executing:breakout.debug Process complete |
| ||
The reason is that the libraries must not have any version numbers after ".so". This must be some misconfiguration of "ld" Shared objects without a version number are required at compile time by Linux. They are usually supplied in the "dev" packages of the libraries. However, with more recent 64-bit releases of Linux, these 32-bit shared object files may not be included, and you have to create symlinks yourself. You may be able to install 32-bit specific dev packages, but I've found on some Linux versions that it may want to uninstall the equivalent 64-bit version of the dev package first - which is a bit of a pain. Creating symlinks saves you the bother of uninstalling stuff that you may want to use later. |