Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0002056Dwarf FortressGeneralpublic2010-05-24 02:032010-06-09 06:45
rofl0r 
Baughn 
normaltweakN/A
closednot fixable 
Linux
 
 
0002056: Linux libs not linked statically
since in linux all compilers use the same object format, libraries can be linked statically instead of dynamically.

you just have to download the devel version of those libraries (this will give the .a libraries). these can then be linked statically, so everything is included in the binary, DLL-hell is minded, AND x64 users can also simply start the program without downloading all required 32 bit libraries.
http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html [^]
No tags attached.
Issue History
2010-05-24 02:03rofl0rNew Issue
2010-05-24 09:09FootkerchiefAssigned To => Baughn
2010-05-24 09:09FootkerchiefStatusnew => assigned
2010-05-24 09:11FootkerchiefNote Added: 0007285
2010-05-24 12:07QuietustNote Added: 0007290
2010-05-25 02:01FalldogNote Added: 0007319
2010-05-25 03:48CubittusNote Added: 0007320
2010-05-25 04:37rofl0rNote Added: 0007321
2010-05-26 13:13BaughnNote Added: 0007351
2010-05-26 13:20BaughnStatusassigned => resolved
2010-05-26 13:20BaughnResolutionopen => not fixable
2010-06-09 06:45Toady OneStatusresolved => closed

Notes
(0007285)
Footkerchief   
2010-05-24 09:11   
Baughn: dunno what you want to do with this one.
(0007290)
Quietust   
2010-05-24 12:07   
The downside, of course, is that the binary will likely become significantly larger, as well as the usual downsides of not using dynamic linking.
(0007319)
Falldog   
2010-05-25 02:01   
Consider making one compiled statically for those "exotic" operating systems out there. A lot of time the generic "for all versions of unix" software is done with static libraries in order to give maximum compatibility.
(0007320)
Cubittus   
2010-05-25 03:48   
Please bear in mind the licence that these libraries are distributed under.

Many prohibit distribution of static linked binaries if they are not distributed under the same licence. E.g. with the LGPL it would require either open-sourcing the whole of DF, or distribution of the unlinked object files along with the binary.

See http://www.google.co.uk/search?q=lgpl+static+linking [^] for many topics on this subject.
(0007321)
rofl0r   
2010-05-25 04:37   
Quietust: since ToadyOne distributes all the *.so files with the linux download (libs folder), the size of the download will get smaller, since only the needed parts of the library are linked to the binary
(0007351)
Baughn   
2010-05-26 13:13   
I tried doing this. Didn't really work out.

A lot of libraries turned out to be system-specific adapters, and statically linking them would break DF on many non-toady systems. It's far better to have the distributors deal with the mess, overall.