(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?
link|improve this question

feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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