[erlang-questions] R14B04 and OpenSSL 1.0.1c

Bogdan Andu bog495@REDACTED
Thu May 23 11:46:15 CEST 2013


I have applied the patches:
cd $OTP_SRC_DIR_R14B04
patch -p0 <
/usr/ports/lang/erlang/patches/patch-erts_configure_in
patch -p0 <
/usr/ports/lang/erlang/patches/patch-erts_emulator_Makefile_in
patch -p0 <
/usr/ports/lang/erlang/patches/patch-erts_lib_src_Makefile_in
patch -p0 <
/usr/ports/lang/erlang/patches/patch-lib_tools_c_src_Makefile_in
patch -p0 <
/usr/ports/lang/erlang/patches/patch-make_target_mk

*all patches succedded,
and then:

./configure
sudo gmake install
the same error

I modified
erts/configure.in:
from:
openbsd*)
                DED_LD="$CC"

DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
                DED_LDFLAGS="-shared"
        ;;
in:
openbsd*)

DED_LD="$CC"

DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"

DED_LDFLAGS="-shared /usr/lib/crtbeginS.o /usr/lib/crtbegin.o"
        ;;
because:
$ nm /usr/lib/crtbegin.o
         U _GLOBAL_OFFSET_TABLE_
         U
_Jv_RegisterClasses
00000000 D __dso_handle
00000000 T __fini
00000000 D
__guard_local
00000000 T __init
00000000 W __register_frame_info
         U
atexit
$ nm /usr/lib/crtbeginS.o
         U _GLOBAL_OFFSET_TABLE_
         U
_Jv_RegisterClasses
         U __cxa_finalize
00000000 D __dso_handle
00000000
D __guard_local
00000000 T _fini
00000000 T _init

gmake clean
./configure
sudo gmake install
the same error

Does anyone has an idea of how to solve this
issue, because I really need R14B04.

Please help. I am really out of ideas.
Maybe I should link against other libraries but I do not know what they are.
How can I dicover these libraries that I should link erlang against?

Bogdan

On Wed, May 22, 2013 at 12:23 PM, Bogdan Andu <bog495@REDACTED> wrote:

> Thank you for the pointers.
>
> I'll give it a try to see what happens.
>
> It seems that linking erlang against a previous, working ssl library would
> give the same error.
>
> Bogdan
>
>
> On Wed, May 22, 2013 at 11:46 AM, Stanislav Sedov <stas@REDACTED>wrote:
>
>>
>> On May 22, 2013, at 12:34 AM, Bogdan Andu <bog495@REDACTED> wrote:
>>
>> > The os is OpenBSD 5.3 amd64 with preinstalled opensssl library
>> /usr/lib/libssl.so.19.0
>> >
>> > $ /usr/sbin/openssl
>> > OpenSSL> version
>> > OpenSSL 1.0.1c 10 May 2012
>> > OpenSSL>
>> > ^D
>> >
>> > This is the only ssl library in the system, and erlang was configured
>> with this ssl library
>> > and no complaints at ./configure time.
>> >
>> > On the other hand:
>> >
>> > On OpenBSD 5.2 amd64 with preinstalled opensssl library
>> /usr/lib/libssl.so.18.0
>> >
>> > $ /usr/sbin/openssl
>> > OpenSSL> version
>> > OpenSSL 1.0.0f 4 Jan 2012
>> > OpenSSL>
>> > ^D
>> >
>> > everything works perfect, and Erlang was also configured againsat this
>> preinstalled library
>> >
>>
>> I found this message on the mailing list, which seems to be relevant:
>>
>> http://www.mail-archive.com/cdesktopenv-devel@lists.sourceforge.net/msg00598.html
>>
>> It looks like the __guard_local symbol is generated by new
>> stack_protector code,
>> and according to the patch it seems that linking against libcrtbeginS.o
>> and
>> libcrtendS.o fixes the issue for CDE.  It might be worth trying to modify
>> the
>> erlang linker flags (or at least crypto linking flags) to link against
>> these
>> objects.
>>
>> However, I don't really understand what's going on here.  According to
>> [1],
>> the new __guard_local symbol should be present in crtbegin.o.  But maybe
>> crypto.so
>> is being linked manually by erlang build system (i.e. not via cc(1)), in
>> which case
>> applying the same fix as was provided for CDE might help.
>>
>> [1]:
>> http://openbsd.7691.n7.nabble.com/GCC-diff-needs-testing-on-multiple-arches-td167891.html
>>
>> --
>> ST4096-RIPE
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130523/57ddc428/attachment.htm>


More information about the erlang-questions mailing list