-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statically link libfuse.so.2 into runtime #45
Comments
According to #5 (comment), the dynamic Besides, at least in Archlinux there's no static libfuse library to link against:
according to https://patchwork.ozlabs.org/patch/223175/ this is because
and
so it looks like it's not feasible |
musl is an alternative c standard library (a leaner replacement for glibc). The musl team is more static-linking-friendly than the glibc team. Also, binaries compiled with musl are supposed to be significantly smaller. http://sourceforge.net/p/fuse/mailman/message/31326476/ Chat on #musl:
|
If the only problem is https://groups.google.com/forum/#!topic/exfat/2rLN-yhLnoU
I haven't deeply understood the comments below yet, but looks like they were trying to remove libdl rather than removing dlopen. But then there's the pthread issue, which seems to be problematic to link statically as well http://stackoverflow.com/a/10390911/674713
|
So I agree that libdl should not be linked statically. A dependency on libdl is entirely OK. Btw, I don't think the statement "You can't mix static and dynamic linking in the same program" above is correct. I have done it. just provide .a libraries instead of .so libraries and they will be linked staticallly while the rest is still linked dynamically. Also see http://www.murga-linux.com/puppy/viewtopic.php?p=370694&sid=f925b44171e8372377c00c6208e4814c#370694 |
Yes, I do it as well on industrial C++ software, as many hardware providers will only provide you with SDKs that only include a header and a static library, so you can integrate their products without actually disclosing their internal workings. I think what they actually meant is that you can't mix static and dynamic implementations of the same symbol. For instance, you can't have part of your program using the system's |
Good news: It is possible.
Bad news: The resulting binary is too large to fit into the ISO header, even if compressed with |
With type 2 AppImages, we don't have this tight restriction on AppImage runtime size anymore, so we might reconsider it. What do people think? |
Just for fun, here is an AppImage that has libfuse statically linked in.
Runtime is now 3x as large as before. Do you think it is worth it? appimagetool-x86_64.AppImage.zip Note that this breaks ldd which now thinks the runtime is a static binary, probably something is not quite right with this line: |
Since we've implemented #123 already, I think we can close this feature proposal now. |
Agree! |
Is it possible to statically link libfuse.so.2 into runtime and still have a binary small enough to be embedded into the header padding of an ISO file?
This was suggested by @frerich in the discussion thread to Linus Torvalds' "This is just very cool" blog post.
If we attempt this, we should do so in a separate feature branch.
EDIT: Done, you can skip this thread right to #45 (comment)
I tried adding
to the CMakeLists.txt but this did not work, as I get
The text was updated successfully, but these errors were encountered: