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.

(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
add comment

1 Answer

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
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.