[erlang-questions] Erlang static linked interpreter

Ciprian Dorin Craciun <>
Wed Jan 19 21:10:19 CET 2011

On Wed, Jan 19, 2011 at 21:57, Mikael Pettersson <> wrote:
> Ciprian Dorin Craciun writes:
>  >     Hello all!
>  >
>  >     I was just wondering if anyone was able to build a static linked
>  > Erlang interpreter?
>  >
>  >     I've tried today to use `LDFLAGS=-static`, but unfortunately when
>  > linking it complains of finding `__sigaction` duplicated, once in
>  > Erlang's own source code, and once in `pthread` library.
>  >
>  >     Any ideas? Thanks,
> If you're on x86, then disable HiPE.  HiPE on x86 needs to override
> sigaction(), but that only works with dynamic linkage.

    But if disabling HiPE, I'll have a performance penalty, or? (BTW
what is the performance gain of using HiPE?)

    And I'm a little bit confused about overriding `sigaction`. Does
the code inside Erlang call `sigaction` -- in which case then these
references could be renamed -- or there is a need to subvert the
`sigaction` calls in other system libraries. (Isn't there an option
for GCC to override a symbol?)

More information about the erlang-questions mailing list