0

On a Linux machine I can do:

./configure

make install

to build from source.

However, when I copy that build to another machine, obviously some libraries will be missing. I've Googled to the best of my abilities but I can't seem to find a way to build a "fat" binary, with all dependencies packaged with it.

Havnar
  • 2,558
  • 7
  • 33
  • 62
  • 1
    The term you are looking for is "static", as in "static library", "static build", "static link", etc. It generally involves at least compiler options to tell the build system not to use shared libraries/linking/etc., but may require quite a bit more than that if the package in question wasn't created with that requirement in mind... – twalberg Apr 20 '15 at 17:33
  • The --enable-static command doesn't seem to include all the libraries I need. I can manually copy in the missing libs, but that's not really good practice. – Havnar Apr 21 '15 at 07:12

1 Answers1

0

you can run configure like this:

./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" CPP="gcc -E" CXXCPP="g++ -E"

see this for detailed info:

https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Multiple-Architectures.html

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103