From: Yann L. <ya...@le...> - 2005-08-10 23:21:35
|
Paul, Start lush and do: (libload "sdl/sdl-config") Then look at the content of the variable sdl-libs. It should show a list like this: ? sdl-libs = ("/usr/lib/libSDL.so" "/usr/lib/libSDL_image.so") In your case, this would probably look more like = ("/emul/linux/x86/usr/lib/libSDL.so" "/emul/linux/x86/usr/lib/libSDL_image.so") Now do: (setq sdl-libs '("/usr/lib/libSDL.so" "/usr/lib/libSDL_image.so")) or wherever your correct 64-bit libraries are. Now do (libload "sdl/libsdl") and see if Lush still complains. If Lush doesn't complain, then something is wrong with your library path. Lush uses the function find-shared-library to find .so. You can look at the function definition with ^Pfind-shared-library It uses a global variable called shared-library-path, and looks into the content of /etc/ld.so.conf for a list of library directories. Is it possible that your LD_LIBRARY_PATH environment variable contains /emul/... before the directory of the normal 64-bit libs? A quick fix would be to do (setq shared-library-path '(......)) with the correct list of directories in your .lush/lushrc.lsh This will override the default setting. -- Yann On Wednesday 10 August 2005 05:55 pm, Paul Furber wrote: > Hi all, > First up - congrats on lush. It is exactly the tool I need for lots of > things and I'm really looking forward to using it! > > I've run into a snag with loading the external libraries though. When I > run: > > (libload "sdl/libsdl") > > I get this: > > [libsdl.lsh] > [libc.lsh] > [constants.lsh] > [idx-macros.lsh] > [idx-int.lsh] > [rgbaimage.lsh] > [idx-sort.lsh] > [image-transform.lsh] > [SDL.lsh] > [sdl-config.lsh] > [SDL_active.lsh] > [SDL_audio.lsh] > [SDL_byteorder.lsh] > [SDL_cdrom.lsh] > [SDL_copying.lsh] > [SDL_endian.lsh] > [SDL_error.lsh] > [SDL_events.lsh] > [SDL_getenv.lsh] > [SDL_joystick.lsh] > [SDL_keyboard.lsh] > [SDL_keysym.lsh] > [SDL_main.lsh] > [SDL_mouse.lsh] > [SDL_mutex.lsh] > [SDL_quit.lsh] > [SDL_rwops.lsh] > [SDL_syswm.lsh] > [SDL_thread.lsh] > [SDL_timer.lsh] > [SDL_types.lsh] > [SDL_version.lsh] > [SDL_video.lsh] > [SDL_image.lsh] > > *** module-load : dld/bfd error > *** /emul/linux/x86/usr/lib/libSDL.so: cannot open shared object file: > No such file or directory : "/emul/linux/x86/usr/lib/libSDL.so" > > This is a 64-bit machine running Gentoo for AMD64 and Lush is compiled > from source to be 64-bit. That library in the emul dir *is* there but > it's for 32-bit apps that are running under emulation. This error also > happens when I try loading OpenGL apps: it complains > that /emul/linux/x86/usr/lib/opengl/libGL.so is missing when it's a) > really there and b) for 32-bit apps only. > > How can I tell Lush to go look in the 64-bit library directories *only*? > I know Lush works - if I (temporarily) uninstall the 32-bit versions of > SDL and GL , it all works brilliantly (lisp + libraries that actually > work! drool drool - I could tell you some stories about Common Lisp and > graphics libraries but you've probably heard them :)) and finds the > right libs in /usr/lib64. But that unfortunately breaks a bunch of other > mission-critical stuff on this box. > > Any ideas? |