# Experimental Builds and 64-bit

**URL:** <https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719>\
**Category:** The Garage\
**Created:** [July 4, 2014, 4:28pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719 "2014-07-04T16:28:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ace](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Ace](https://discourse.cataclysmdda.org/u/Ace)\
**Post date:** [July 4, 2014, 4:28pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/1 "2014-07-04T16:28:34Z")

</div>

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](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/](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](http://dev.narc.ro/cataclysm/jenkins-latest/Linux/Tiles)” without having to remove some programs.?

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 4, 2014, 7:00pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/2 "2014-07-04T19:00:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ace](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Ace](https://discourse.cataclysmdda.org/u/Ace)\
**Post date:** [July 4, 2014, 10:16pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/3 "2014-07-04T22:16:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 4, 2014, 10:35pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/4 "2014-07-04T22:35:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ace](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Ace](https://discourse.cataclysmdda.org/u/Ace)\
**Post date:** [July 4, 2014, 11:19pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/5 "2014-07-04T23:19:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [July 4, 2014, 11:56pm UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/6 "2014-07-04T23:56:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ace](https://avatars.discourse-cdn.com/v4/letter/a/848f3c/32.png) [@Ace](https://discourse.cataclysmdda.org/u/Ace)\
**Post date:** [July 5, 2014, 12:21am UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/7 "2014-07-05T00:21:35Z")

</div>

[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  
 ![](http://cdn.hark.com/images/000/006/085/6085/original.0)

---

<div class="post-metadata">

**Author:** ![Dare13](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dare13](https://discourse.cataclysmdda.org/u/Dare13)\
**Post date:** [April 6, 2016, 3:17am UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/8 "2016-04-06T03:17:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [April 6, 2016, 4:54am UTC](https://discourse.cataclysmdda.org/t/experimental-builds-and-64-bit/6719/9 "2016-04-06T04:54:35Z")

</div>

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.
