Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Note: I'm just using ffmpeg as an example, I have often wondered the same thing with other programs)

I have a build script for ffmpeg which compiles in support for a few non-standard features. Now I want to use that encoder on several other machines. Is it OK just to copy the /usr/local/bin/ffmpeg executable over, or should I prefer to run the build script on the other machines?

  • Are there likely to be any hardware-dependent optimisations in the compilation?
  • Is it possible to have any hidden dependencies which I also need to copy, apart from the executable itself and anything I can find with ldd?
share|improve this question
up vote 4 down vote accepted

yes and yes :)

if you want your compiled binary to run on a number of machines, you have to compile it in a way that it matches the architecture and setup (library-wise) on these machines. that normally means:

  • link everything you can statically
  • ship the libs your binary needs
  • 32bit stuff runs on 64bit machines, but not the other way around

so, if you do not want to think about if it might run or if it wont: compile and link the binary on the machine you want it to run.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .