How to compile the static binary version of openssl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to compile the static binary version of openssl

Yu Chen
Hi,
Currently I'm trying to get a static binary of openssl command via
compilng the openssl-1.1.0e.
I've tried to configure with no-shared, but the bin/openssl is still
dynamic linked.
Thus I added -static to the end of CFLAG, it just can not get compiled.
Anyone know how to get a static openssl command? thanks in advance.
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile the static binary version of openssl

Viktor Dukhovni

> On Mar 7, 2017, at 5:28 AM, Yu Chen <[hidden email]> wrote:
>
> Currently I'm trying to get a static binary of openssl command via
> compilng the openssl-1.1.0e.

What do you mean by "static binary"?  Is it enough for the "ssl" and
"crypto" libraries to be statically linked into the "openssl"
executable?  Or do you also want the C-library to be statically
linked?

You may need to disable support for dynamically loadable engines
(the "no-engine" option) and dynamic loading of any kind (via the
"no-dso" option) in order to get a completely static executable.
Is that what you want?

> I've tried to configure with no-shared, but the bin/openssl is still
> dynamic linked.

But it should have static copies of the "ssl" and "crypto" libraries.

> Thus I added -static to the end of CFLAG, it just can not get compiled.
> Anyone know how to get a static openssl command? thanks in advance.

Perhaps "engine" and/or "dso" support requires a dynamic C-library.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Loading...