Experimental Builds and 64-bit

Greetings fellow survivors…
Ok let’s get straight to the problem.

Running on Xubuntu 14.04 64-bit
Both SDL
0.A-4150-ga71c4d2-dirty ( Github version.)
0.A-1715 ( Experimental build version http://dev.narc.ro/cataclysm/jenkins-latest/Linux/Tiles )

When I run cataclysm-tiles it outputs an error:
./cataclysm-tiles: error while loading shared libraries: libSDL2_mixer-2.0.so.0: cannot open shared object file: No such file or directory
"libSDL2_mixer-2.0.so.0" comes from the lib. “libsdl2-mixer-2.0-0:i386”.
If I try to install “libsdl2-mixer-2.0-0:i386” I get this:

The following packages will be REMOVED:
gstreamer0.10-plugins-bad gstreamer1.0-plugins-bad libmodplug1
libsdl2-mixer-2.0-0 vlc vlc-nox vlc-plugin-notify vlc-plugin-pulse

Downloaded from http://dev.narc.ro/cataclysm/jenkins-latest/Linux/Tiles/ ( The latest ).
It compiled just fine on github, but that’s too experimental. ( Segmentation fault all the way! )

The question: Is there a way for me to download & execute an experimental build from “http://dev.narc.ro/cataclysm/jenkins-latest/Linux/Tiles” without having to remove some programs.?

Yes, there’s a really easy way, you can just grab the .deb for the package, unpack it, and stick the .so file somewhere that cataclysm will find it. This assumes you have the appropriate dependencies of the library installed.

In short, it looks like your package management won’t let you do what you want, so go around it.

Protip, if you invoke cataclysm as “LD_LIBRARY_PATH=/path/to/library ./cataclysm-tiles”, it will add /path/to/library to the linker search path, so you can stick the .so somewhere guaranteed to not cause problems, like inside the cataclysm directory.

I guess that would be just statically linking shared objects (.so files.).
I’d be handy if there were experimental 64-bit builds of Cataclysm: DDA.
Thanks for your help.

No, the linker just uses LD_LIBRARY_PATH to find them, it’s dynamically linked exactly as usual.
ld actually takes a huge number of environment variables for debugging various things.

I don’t get it.
If I use LD_LIBRARY_PATH to overwrite the normal path of the shared objects, wouldn’t it be statically linked?
Then again, I am just estimating what statically and dynamically means.

NOTE: ( As always am I taking no responsibility for my scripts so use with caution! ) ( Run it in your Cataclysm DDA directory if you get the same error as me. )

apt-get download libmodplug1:i386
apt-get download libsdl2-mixer-2.0-0:i386
dpkg-deb -x libmod* pwd && dpkg-deb -x libsdl* pwd
mv usr/lib/libmodplug.so.1.0.0 ./libmodplug.so.1 && mv usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0.0.0 ./libSDL2_mixer-2.0.so.0
rm -R usr/ && rm *.deb

Replace this “TARGET_FILE=$0” with this
" TARGET_FILE=$0 && export LD_LIBRARY_PATH=pwd "
In the “cataclysm-launcher” file.

And then just run it like ./cataclysm-launcher

Glad you got it working, and thanks for the script for others.

Your conclusions are understandable if you’re guessing, Here are the details you are missing.

  1. LD_LIBRARY_PATH adds to the linker path, it doesn’t replace it. It’s still linking against all your other system libraries other than libmodplug and libsdl2-mixer.
  2. Shared vs static refers to how the linking happens, not how it finds the libraries.
    Shared linking happens when you start a program, and it has metadata telling the system it needs some shared libraries, that makes the system call ld to satisfy that linkage. ld then looks through your system paths and the list of already-loaded libraries for matching libraries. when if finds them it does some magic to make them available to your program.
    Static linkage on the other hand happens at compile time, all the code for a static library is added to the executable produced by the compilation/linking process. If all your libraries are linked statically, you have a much larger executable, but it can run anywhere because you don’t have to worry about the libraries being available on the system.

[quote=“Kevin Granade, post:6, topic:6719”]Glad you got it working, and thanks for the script for others.

Your conclusions are understandable if you’re guessing, Here are the details you are missing.

  1. LD_LIBRARY_PATH adds to the linker path, it doesn’t replace it. It’s still linking against all your other system libraries other than libmodplug and libsdl2-mixer.
  2. Shared vs static refers to how the linking happens, not how it finds the libraries.
    Shared linking happens when you start a program, and it has metadata telling the system it needs some shared libraries, that makes the system call ld to satisfy that linkage. ld then looks through your system paths and the list of already-loaded libraries for matching libraries. when if finds them it does some magic to make them available to your program.
    Static linkage on the other hand happens at compile time, all the code for a static library is added to the executable produced by the compilation/linking process. If all your libraries are linked statically, you have a much larger executable, but it can run anywhere because you don’t have to worry about the libraries being available on the system.[/quote]
    Nicely explained, and well

Hi Kevin or ACE,
My nephew just introduced Cataclysm DDA to me and I’m having fun with it on my
windows computer. but I want it on my laptop and I am having the same problem as ACE, same error msgs. Im running Ubuntu 14.04 LTS, if that makes a difference. I don’t quite understand the script. I understand this: “apt-get download libmodplug1:i386
apt-get download libsdl2-mixer-2.0-0:i386.” I downloaded the files into the cataclysm folder I have on my desktop. I don’t quite completely understand this: "dpkg-deb -x libmod* pwd && dpkg-deb -x libsdl* pwd" I think dpkg command unpacks and installs the files above, right? What does -deb -x do? What does ‘pwd’ do? does it install them in the folder where they are or somewhere else? I’m afraid to just try it and mess something up. what does this do: “mv usr/lib/libmodplug.so.1.0.0 ./libmodplug.so.1 && mv usr/lib/i386-linux-gnu/libSDL2_mixer-2.0.so.0.0.0 ./libSDL2_mixer-2.0.so.0” I read that mv moves or renames a file. It looks like in this case it’s renaming the files and it looks like it installed them in usr/lib/ what does this do: “rm -R usr/ && rm *.deb"
I think I understand this except for the ‘pwd’ part: Replace this “TARGET_FILE=$0” with this
” TARGET_FILE=$0 && export LD_LIBRARY_PATH=pwd "
In the “cataclysm-launcher” file.
Thank you for any help.

PS I tried running the windows version with Wine but it crashes a lot.

dpkg-deb -x libmod* pwd
Will extract (-x) the file starting with libmod to the current directory.
pwd does “print working directory”, the backtick (`) symbols tell your terminal to run the command between them and insert its output into the command line, so it’s something like "dpkg-deb -x libsdl* /home/username/cataclysm-directory"
After you run this you’ll have a usr directory in the current directory. in addition to the .deb files the previous command downloaded.

You then mv the library files from the new usr directory into the cataclysm directory.

rm -R usr/ && rm *.deb
is just cleaning up the files and directories that were created as a side effect of this process.

pwd is the same as the previous usage, you’re telling the system to look in the local directory for the library files.