Generate all-in-one .a archive for static linking

Bug #652883 reported by Dmitry Katsubo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
Won't Fix
Undecided
Unassigned

Bug Description

Dear Cuneiform Developers,

It would be nice to have .a library for static linking against Cuneiform.

Relevant request in Debian bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598616

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Every shared library in Cuneiform has a bazillion global variables, most of which have same names but different contents (sometimes). Converting to a single library would be a huge refactoring/rearchitecting task. I don't have the time or desire to do that, so it won't happen. Sorry.

Changed in cuneiform-linux:
status: New → Won't Fix
Revision history for this message
Dmitry Katsubo (dma-k) wrote :

JussiP, thank you for comments.

1) Having one .a per library (e.g. per .so) is also fine.
2) I don't think the compiler will issue any errors, unless these globals are referred from the code (and they can't to to well-defined public API).

Would would be nice to see is a make rule, that recompiles all objects without -fPIC/-shared and puts all .o files into one "cuneiform.a" file with "ar". When the target program will be linked, compiler will take only those object files from .a, which are actually referred (I used this as a reference: http://stackoverflow.com/questions/1804606/static-initialization-and-destruction-of-a-static-librarys-globals-not-happening).

You don't need to refactor the code. If I am wrong, please, correct me.

Revision history for this message
Dmitry Katsubo (dma-k) wrote :
Revision history for this message
Dmitry Katsubo (dma-k) wrote :

I agree, that creating static libraries is not possible, unless duplicate symbols problem is solved. Having separate .a files does not help (one they are linked into one executable, all symbol collisions come out).
Sorry for my initial confusion.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.