TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Static Linux

154 点作者 joseflavio超过 10 年前

13 条评论

zackmorris超过 10 年前
I wish Linux would replace dynamic libraries (especially ones referencing specific paths) with a system based on the library&#x27;s hash. Then we could have a single lib folder with 1 copy of each library, and get ourselves out of dependency hell by just making dynamic loading act like static loading. We could even download libraries from the web on the fly, if needed. Heck it would even remove a lot of the need to compile every_single_time because apps could reference binaries.<p>The notion of being able to fix an app by merely upgrading a library it depends on has not worked out in practice. More often than not, when I upgrade a library, I find myself having to upgrade my app’s code because so much has changed. The burden of having to constantly backup, upgrade, manually tweak config files, over and over and over again for days&#x2F;weeks&#x2F;months was SO not worth the few hundred megabytes or whatever dynamic loading was supposed to have saved.
评论 #8821288 未加载
评论 #8821241 未加载
评论 #8821558 未加载
评论 #8821710 未加载
ultramancool超过 10 年前
Cool idea. Not enough people seem aware of executable packers like UPX <a href="http://upx.sourceforge.net/" rel="nofollow">http:&#x2F;&#x2F;upx.sourceforge.net&#x2F;</a> though.<p>These are excellent tools to keep the size down when using large static binaries. By compressing the file on disk and decompressing in memory you often wind up with a smaller and sometimes even faster loading (depending on disk IO speed vs decompression speed) package. I got a static Qt binary from 4 MB down to 1.3 with upx --lzma. Very nice stuff.
评论 #8820910 未加载
评论 #8822086 未加载
评论 #8821566 未加载
stonogo超过 10 年前
I have been keeping an eye on this &quot;project&quot; for years and have yet to see anything come of it except lightning talks.<p>suckless.org seems to focus on their web browser and their xterm clone these days, judging by the listserv traffic.
评论 #8820526 未加载
TsukasaUjiie超过 10 年前
&quot;Of course Ulrich Drepper thinks that dynamic linking is great, but clearly that’s because of his lack of experience and his delusions of grandeur.&quot; I find these kind of comments reflect veerryyy poorly on their authors..
dfc超过 10 年前
<p><pre><code> &gt; Because dwm is customized through editing its source code, it’s &gt; pointless to make binary packages of it. This keeps its userbase &gt; small and elitist. No novices asking stupid questions. </code></pre> I never understood why the authors of dwm thought this was a &quot;nice&quot; feature of configuration via source code.
评论 #8821497 未加载
评论 #8822609 未加载
评论 #8823408 未加载
评论 #8821523 未加载
leakybucket超过 10 年前
An advantage of dynamic libraries is that the memory used to hold the library&#x27;s executable pages can be shared across processes. So using static only binaries will lead to less free memory on the OS.
评论 #8821355 未加载
评论 #8821275 未加载
gnufx超过 10 年前
Apart from the general system management advantages of dynamic libraries, they provide an important extensibility&#x2F;customization mechanism (e.g. <a href="https://www.gnu.org/software/emacs/emacs-paper.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;emacs-paper.html</a> for an early mention).<p>High performance computing systems typically use dynamic linking extensively for that. One example: The hooks for profiling and tool support in the MPI standard for parallel programming pretty much depend on an LD_PRELOAD-type mechanism to be useful. Another: You can cope with the mess due to missing policy on BLAS libraries in Fedora&#x2F;EPEL (unlike Debian) by using OpenBLAS replacements for the reference and ATLAS libraries; have them preferred by ld.so.conf and get a worthwhile system-wide speed increase on your Sandybridge nodes with EPEL packages.<p>Anyhow, rebuilding a static system to address a problem with a library ignores all its uses in user programs. The ability to adjust things via properly-engineered dynamic libraries really has a lot more pros than cons in my non-trivial experience. The use of rpath (&quot;ones referencing specific paths&quot;?) is mostly disallowed by packaging rules in the GNU&#x2F;Linux distributions I know, so I&#x27;m not sure where that comment came from, and it tends to defeat the techniques above.
curlyquote超过 10 年前
Static linking OpenSSL is probably not a good idea
评论 #8821084 未加载
w8rbt超过 10 年前
One downside to static linking is security vulnerabilities. Say, for example that all the programs on your computer that use OpenSSL statically link. When OpenSSL has a security flaw, you have to not only update OpenSSL, but all of those other programs too.
proveanegative超过 10 年前
Are there any static BSDs?
评论 #8822752 未加载
评论 #8820781 未加载
kkedacic超过 10 年前
I would like to see &quot;static&quot; USE flag in Gentoo for all packages with ability to statically link whole system. Also profiles or env with other libc&#x27;s would be nice. Dunno why they need to crate new distribution instead of expanding ones that are already there.
enthdegree超过 10 年前
Stali has been in &#x27;planning&#x27; for as long as I can remember. At least 4 years.
spiritplumber超过 10 年前
Wonder if it helps with dep hell...
评论 #8820582 未加载