[erlang-questions] Difference between ei.a and ei_st.a?

Per Hedeland <>
Mon Sep 3 15:05:48 CEST 2012


Björn-Egil Dahlberg <> wrote:
>
>Note also that in the non-windows case the name can change meaning.
>
>If thread lib detected
>libei_st = not thread safe (single threaded)
>libei = thread safe
>
>if no thread lib is detected
>libei = not thread safe (single threaded)

(and ditto for liberl_interface). Thanks, I was just about to point this
out, since we got bitten by the silent build of a non-thread-safe
version called liberl_interface.a (on QNX...).

>I'm unsure if this is a wise convention. Probably just to be able to say 
>"link with libei.a and liberl_interface.a" regardless.

Right, who wants to link with an unsafe version.:-) It makes superficial
sense, but is a really bad idea if you need to build for many different
OSes and don't dig deeply into the configure/Makefile logic when it just
"seems to work", nor specifically test thread-safeness of the result
(may not be simple).

What I did - besides teaching lib/erl_interface/configure.in to look for
pthreads support in libc (where it can be found on QNX) - was a minor
tweak such that this configure *fails* if you pass --enable-threads and
no pthreads support can be found (and then made sure to pass this option
in our builds, of course). Unfortunately I never got around to offer
those changes back to OTP, and as reward I now find that they were lost
in one of our OTP upgrades.:-( (I still have the original ones of
course.)

--Per



More information about the erlang-questions mailing list