Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

How can I build a static lepton binary #55

Closed
pstibrany opened this issue Aug 4, 2016 · 6 comments
Closed

How can I build a static lepton binary #55

pstibrany opened this issue Aug 4, 2016 · 6 comments

Comments

@pstibrany
Copy link

Is there a way to build static lepton binary to avoid library dependencies issues across machines?

@danielrh
Copy link
Contributor

danielrh commented Aug 4, 2016

Yes: I've done so before--
the CMakeLists should do so by default

otherwise I believe you can pass
LD_FLAGS=-static ./configure

@pstibrany
Copy link
Author

Using cmake as described in README has indeed produced static binary. Thanks!
Maybe it would be worth mentioning in README? :)

@pstibrany
Copy link
Author

It turns out that lepton compiled with cmake+make is much slower at compression (0.34 MiB/sec on my Linux machine) than lepton compiled with autogen.sh + configure + make (2.75 MiB/sec, same machine, same input).

Any idea why what may be the case?
Thanks.

@pstibrany
Copy link
Author

LDFLAGS=-static ./configure && make also produces statically linked lepton, which is as fast as dynamically linked one produced by configure and make. Still I think it would be good to fix slowness of lepton when using cmake, so that others don't run into it.

@danielrh
Copy link
Contributor

danielrh commented Aug 7, 2016

sorry for the late response
with cmake you need to specifically tell it to build in RELEASE mode without debug flags
cmake .. -DCMAKE_BUILD_TYPE=Release
otherwise it will build with a ton of self check features enabled. Not a great default to have, I suppose

@pstibrany
Copy link
Author

pstibrany commented Aug 7, 2016

Ah, ok. I have never used cmake before, and living mostly in Java and Go worlds, I have long forgotten about concept of release builds :-) Thanks for help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants