Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm developing a cross-platform application and I'm having trouble with distributing a Linux binary. In Windows the dll's were - libsndfile-1.dll lua5.1.dll lua51.dll openal32.dll sfml-audio.dll sfml-graphics.dll sfml-network.dll sfml-system.dll sfml-window.dll

This is a very early pre-release, so I don't want to write a package. I'm just interested in having the user download a tarball and run the binary inside. What are the typical ways for users to get these dependencies in Linux, w/o writing a package?

P.S. Also I have Linux 64-bit, and one user reported that the application didn't run on their 32-bit Linux. What could be the issue? I didn't have this issue with Windows (built on a 64-bit system, works on 32-bits).

share|improve this question
1  
This should go to SO. –  Shiki Jul 17 '10 at 15:37
add comment

4 Answers 4

You can statically link the program to all libraries but libc and libm. (Heck, you can even link in them).

share|improve this answer
add comment

You can get the dependencies of a binary by using the ldd command

Eg :

ldd program_binary

        libctest.so.1 => /opt/lib/libctest.so.1 (0x00002aaaaaaac000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x0000003aa4e00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003aa4c00000)

But it is better to share as source because libs could be of different versions having different symbols or from different architecture.

share|improve this answer
add comment

I'm not sure if this is quite what you're looking for, but typically what's done for Linux programs is that you list the dependencies on the web page where you offer the product for download. In your case, something like

You will need to have the following installed:

(Obviously specify version numbers as well, if your program only works with certain versions) Then a Linux user would check their package manager to make sure they have all those before trying to install your program.

Some programs are distributed the way Ignacio explained, i.e. include all the dependencies you need inside the archive you distribute. That tends to annoy some people a bit because they're stuck with extra copies of the libraries that can't be upgraded, and may even clash with the system versions.

share|improve this answer
add comment

The equivalent in Linux is to include the .so files in a directory within the package, and have a shell script set $LD_LIBRARY_PATH to point to this directory and then run the binary executable.

The problem with 32 vs. 64 is that the compiler generates 64-bit code, and links against 64-bit libraries. You'll need to install a 32-bit toolchain in order to build a 32-bit binary. You can run file against the various binaries in order to confirm this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.