Somebody can help me on this:
Archives Forums/Linux Discussion/Somebody can help me on this:
| ||
I've been on this for two days now... but thins do not turn out well. I downloaded BMax and installed it on a MintBox. I installed the dependencies as noted in the thread and (after a long struggle) I got them installed. Tried to build the modules with bmk and that works.... So far so good, but now the trouble. MaxIDE won't start up, but return the error ./MaxIDE: error while loading shared libraries: libXft.so.2: cannot open shared object file: No such file or directory in stead Well, I thought, let's see if we can get around MaxIDE and I decided to make a HelloWorld test program and see if that would work. graphics 640,480 drawtext "Hello World!",5,5 flip waitkey end When I try to compile this I get the next response: ~/Apps/BlitzMax $ bin/bmk makeapp /home/rachel/Apps/BlitzMax/Test/test.bmx Compiling:test.bmx flat assembler version 1.68 (32768 kilobytes memory) 3 passes, 3136 bytes. Linking:test /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: error: ld returned 1 exit status Build Error: Failed to link /home/rachel/Apps/BlitzMax/Test/test I tried to fix this before, but ended up having to re-install Linux completely, so I'm not going to dig into it again... Let's hear from you guys what I can do to fix this.... |
| ||
Try installing the -dev versions of each library listed. In your package manager, search for libX11-dev, libXxf86vm-dev, libGL-dev, etc. You'll probably find that some of these libraries depend on others and the package manager will include them automatically. So, if it says "cannot find -lSomeLibrary", replace "-l" with "lib" and add "-dev" -- that is, search for "libSomeLibrary-dev". For the MaxIDE error, you probably need to search for "libXft" (and possibly the -dev version too). Keep going until you don't get any more libraries listed in the error messages! Also, you'll have more chance of success on a 32-bit OS (not sure what you have here) as quite often the 64-bit distros don't include the 32-bit libraries any more. |
| ||
I installed the dependencies as noted in the thread By this I take it you mean this. Which is hasn't had an update in ages.All the errors you're getting tell me one of two things that either you haven't installed the developer library files or your OS is a 64bit version. If the developer files are installed and it's a 64bit OS then the system links haven't been set up correctly. Try see if this works this Ubuntu and Mint are near enough the same. |
| ||
Okay... I first tried apt-get to get all these, but it said all were there and up-to-date Now with the GUI-based software manager.... I could not find libGL-dev, libGLU-dev and libFreeType-dev, though I did find some packages which name came close to it, but I'm not sure which ones would do so I didn't yet install anything. As for libXft.... It made MaxIDE work, but at a price. Now the compiler doesn't work anymore as it can't find g++ any more. |
| ||
your OS is a 64bit version. Well, yeah, the Linux installed is the 64 bit version, indeed. |
| ||
I could not find libGL-dev, libGLU-dev and libFreeType-dev You wont find those packages as the don't exist.Installing on Mint 14 / Ubuntu 12.10 (I don't know about the new ones yet as things may have changed) For the compiler: ia32-libs-multiarch g++-multilib build-essential For max: libglu1-mesa-dev x11proto-core-dev x11proto-gl-dev x11proto-kb-dev libxxf86vm-dev libasound2-dev libfreetype6-dev libxpm-dev libxft-dev Symbolic links needed to compile with BMax on 64bit. In a terminal copy and paste each line: sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib32/libGL.so sudo ln -s /usr/lib/i386-linux-gnu/libGLU.so.1 /usr/lib32/libGLU.so sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib32/libX11.so sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/lib32/libfreetype.so sudo ln -s /usr/lib/i386-linux-gnu/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so sudo ln -s /usr/lib/i386-linux-gnu/libXft.so.2 /usr/lib32/libXft.so sudo ln -s /usr/lib/i386-linux-gnu/libXpm.so.4 /usr/lib32/libXpm.so Should get Max to compile |
| ||
Hey, thanks a lot, pal.... I'm short on time now, but I'll get to this as soon as I got my hands completely free |
| ||
We're getting closer. The sample program I made in the example above results into: Building test Compiling:test.bmx flat assembler version 1.68 (32768 kilobytes memory) 3 passes, 2678 bytes. Linking:test /usr/bin/ld: /home/rachel/Apps/BlitzMax/mod/pub.mod/lua.mod/lua.release.linux.x86.a(loadlib.c.release.linux.x86.o): undefined reference to symbol 'dlopen@@...' /usr/bin/ld: note: 'dlopen@@...' is defined in DSO /lib/i386-linux-gnu/libdl.so.2 so try adding it to the linker command line /lib/i386-linux-gnu/libdl.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status Build Error: Failed to link /home/rachel/Apps/BlitzMax/Test/test Process complete However when I framework this to use only Max2D (via the GL driver) this sample code works. I've tried a few real projects of mine and they result in similar errors with either Lua or MaxGUI. Point is that I use both very extremely much.... And Lua in particular is very important to me in my current project. I did try to rebuild all modules from scratch but this error remains.... Any ideas? |
| ||
You will need to add Import "-ldl"to your BlitzMax file. Or you could add it to BlitzMax/mod/brl.mod/appstub.mod/apstub.bmx and rebuild the modules. |
| ||
Ok.... It works indeed, thanks for telling me that or I would never have found that one out. Okay, that leaves me one problem, but that's not really a true BMax problem, but a problem I've been encountering in Linux all the time. I have all my projects on a FAT32 device... Reason is easy, I need to access them all in Windows, Mac AND Linux and FAT32 is the only system I know to be compatible with all three of them. The problem is that FAT32 doesn't support the "x" permission for executables. MacOS X just brands all files on a FAT32 device as executable so no problem there at all. Linux however does not and so I am now a bit condemned to copy my binaries to my Main HD to try if they actually work. Do you guys know a way around this so that Linux just sees all files as executables on my FAT32 device, like Mac does? I´ve been googling on this a lot, but none of the answers I found there appear to work, so far. When I got that one out of the way I guess all my trouble in Linux is solved. Well if I need to I can always code a quick app that keeps my main HD version the same as the one on my FAT32 device, but I think that's an 'ugly' solution ;) |
| ||
I have all my projects on a FAT32 device... Reason is easy, I need to access them all in Windows, Mac AND Linux and FAT32 is the only system I know to be compatible with all three of them. The problem is that FAT32 doesn't support the "x" permission for executables. MacOS X just brands all files on a FAT32 device as executable so no problem there at all. Linux however does not and so I am now a bit condemned to copy my binaries to my Main HD to try if they actually work. Do you guys know a way around this so that Linux just sees all files as executables on my FAT32 device, like Mac does? This should work but you wont get the file explorer to open usb flash drives automatically. Haven't figured out why yet it complains that the device is already mounted guess there's a script somewhere that I haven't found.Edit: Found the answer and it's related to Udisk2 and caja file browser and seems to relate to caja trying to mount any drive to /media/$HOME/$DEVICE. As Super user open the file explorer. For Mint/Ubuntu press Alt+F2 to open a run program dialog. Depending on the OS distribution: type gksu cajafor mint or gksu nautilusEnter the root password in the next dialog. You will need to create a file in /etc/udev/rules.d and name it 11-usb-flash.rules. Then copy and past the code be low #Assume that the USB devices are linked to /dev/sd* use mount or dmesg to list devices KERNEL!="sd[a-z]*", GOTO="auto_mount_end" SUBSYSTEMS=="usb",ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="auto_mount_end" # Set environment SUBSYSTEMS=="usb",ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p -s TYPE -s LABEL %N" # Global mount options SUBSYSTEMS=="usb",ACTION=="add", ENV{mount_options}="relatime,users,umask=0" # Filesystem specific options SUBSYSTEMS=="usb",ACTION=="add", ENV{ID_FS_TYPE}=="vfat", ENV{mount_options}="%E{mount_options},users,exec,noatime,umask=000" SUBSYSTEMS=="usb",ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", ENV{mount_options}="%E{mount_options},utf8,users,exec,noatime,umask=000" # Get mount point # use basename to correctly handle labels such as ../mnt/foo SUBSYSTEMS=="usb",ACTION=="add", ENV{ID_FS_LABEL}=="?*", PROGRAM="/usr/bin/basename '%E{ID_FS_LABEL}'", ENV{dir_name}="%c" SUBSYSTEMS=="usb",ACTION=="add", ENV{dir_name}!="?*", ENV{dir_name}="usbhd-%k" # Main action SUBSYSTEMS=="usb",ACTION=="add", ENV{dir_name}=="?*", RUN+="/bin/mkdir -p '/media/usb/%E{dir_name}'", RUN+="/bin/mount -o %E{mount_options} /dev/%k '/media/usb/%E{dir_name}'" SUBSYSTEMS=="usb",ACTION=="remove", ENV{dir_name}=="?*", RUN+="/bin/umount -l '/media/usb/%E{dir_name}'", RUN+="/bin/rmdir '/media/usb/%E{dir_name}'" LABEL="auto_mount_end" Once done save it and open and type in a terminal sudo udevadm control --reload-rules |