MS3FGX / Spectra

Simple tool for visualizing the output of random number generators (RNGs).
http://www.digifail.com/software/spectra.shtml
GNU General Public License v2.0
10 stars 3 forks source link

Is it possible to statically include the GD library? #2

Open klauern opened 7 years ago

klauern commented 7 years ago

I was able to build this tool on my development machine, but our production servers don't include some of the necessary libraries to run it against:

07:36:53 user@prodserver:~/tmp
$ ./spectra
./spectra: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory

Is it possible to statically link and include the GD library so this can be run in a self-hosted/self-contained way?

MS3FGX commented 7 years ago

I tried to compile it statically, but it is giving me compile errors. Perhaps a tool like Elf Statifier or Ermine? That should make a deployable package with all the dependencies included with the least amount of fuss, assuming you don't have hard filesize limits or something.

klauern commented 7 years ago

I tried out the Elf Statifier, but it appears that it is not entirely useful because of the VDSO randomization that they speak of. I tried running it on a remote server and get segfaults. As for Ermine, I suppose I could try it out, but it doesn't appear to be a free product, and for the limited trial of what I want to test out, I'm not entirely sure I'll need to buy it to test out something that is useful for diagnosing systems irregularly, and wouldn't be something I'd need to use beyond discovery of or absense of randomization.

On Tue, Mar 14, 2017 at 2:19 PM Tom Nardi notifications@github.com wrote:

I tried to compile it statically, but it is giving me compile errors. Perhaps a tool like Elf Statifier http://statifier.sourceforge.net/ or Ermine http://www.magicermine.com/? That should make a deployable package with all the dependencies included with the least amount of fuss, assuming you don't have hard filesize limits or something.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MS3FGX/Spectra/issues/2#issuecomment-286531376, or mute the thread https://github.com/notifications/unsubscribe-auth/AAASf5HwyDDOjIXHeEpqZjRKlHAo_9Mnks5rluhWgaJpZM4MbMz7 .

--

-Nick

MS3FGX commented 7 years ago

Is there an arch difference between the development and production machines? Perhaps you can simply bundle up the libgd.so.3 file from the dev system along with the spectra binary and then symlink it to /usr/lib on production with an install script? Or if you can't modify the production filesystem, you could try adding the current directory to $LD_LIBRARY_PATH so it will load it right there.

This is sort of off the top of my head though, I don't have access to a machine I can test it on at the moment.

Are all the other dependencies present on the production system?