[erlang-questions] small build

Bjorn Gustavsson bjorn@REDACTED
Thu Apr 17 09:49:41 CEST 2008


"Steve Vinoski" <vinoski@REDACTED> writes:

> Seems that if you turn on OTP_SMALL_BUILD when building, you get a
> very minimal system, but if you leave it out, you get everything.
> Makes sense, but what if you want something in between?
> 
> Is there a way to use OTP_SMALL_BUILD first, do a build and install,
> and then individually build and install any extra packages you might
> want on top of that? Or is it better to do a full build but tell
> configure to leave out the packages you don't want, assuming that's
> possible via --with-package=no? Leaving out Megaco and the ORB seems
> like it would cut out a lot of stuff that I don't need, for example.

If you first do

export ERL_TOP=`pwd`

(from the top-level directory of the source-code tree), you can then
cd to any application and run 'make' to build it.

> Also, how does one build from source (I'm on Linux, BTW) in such a way
> to ensure that C object files, libraries, and executables are not
> debuggable (and are maybe even stripped), erlang sources are compiled
> without +debug_info, etc. in order to minimize system size?

You can strip out debug_info afterwards by running beam_lib:strip/1.
That's what I do in Wings 3D (http://wings3d.com). The source code
package for Wings 3D contains scripts and Erlang code to package the
Wings 3D application and the necessary part of Erlang/OTP into as
small package as possible (for Mac OS X, Linux, and Windows). Those
scripts could be an useful starting point for packaging your application.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list