Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 6 Nov 2014 20:47:02 +0100
From: Szabolcs Nagy <>
Subject: Re: Compiling openssl static with musl

* Tim Tassonis <> [2014-11-06 19:30:31 +0100]:
> I just managed to compile an openssl (openssl-1.0.1i) static binary on
> 64 bit linux which works fine, it seems.


> However, it was quite a PITA, as openssl always wanted to link against
> -ldl and always ignored my "-static" whichever way i tried to provide it.

-ldl should not be a problem with musl
(it has an empty libdl.a)

> I only got successful after I patched openssl's Configure to add the
> following line after line 363:
> "linux-x86_64-musl", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3
> DES_UNROLL:${x86_64_asm}\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
> and then called
> ./Configure --prefix=$PFX --openssldir=/etc/ssl no-hw zlib no-engines
> no-dso no-threads linux-x86_64-musl

unfortunately you have to work around their build system

(for musl it would be enough if they used standard interfaces instead
of doing several layers of incorrect configurations and ifdefs)

> Did I miss something or might this be something to document somewhere or
> maybe even forward to the openssl people?

you should report openssl build system bugs to openssl, there are plenty
of open ones, eg you could bump these:

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.