monolithic-lib-op broken for ECL

Bug #1647391 reported by Daniel Kochmański on 2016-12-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Medium
Faré

Bug Description

It may be also broken for other linking implementations (mkcl, clasp). In ECL static library can't be build from other static libraries (because `ar' can work properly only on object files) and as far as I can see ECL has never planned to do that.

This effectively breaks also FASL bundles under certain conditions (monolithic-compile-bundle-op?).

For steps to reproduce see:
https://gitlab.com/embeddable-common-lisp/ecl/issues/274
https://gitlab.com/embeddable-common-lisp/ecl/issues/177

Since next release instead of allowing such combination[1] into C::BUILDER (which leads to broken binary) ECL will signal an error.

Proper solution is to use object files which were used to build static library used as input right now. Recently I've added documentation[2] for proper transition of input files into their build output.

[1] Static library being input file for :static-library target.
[2] https://common-lisp.net/project/ecl/static/ecldoc/Extensions.html#System-building

Daniel Kochmański (jackdaniel) wrote :

duplicate of #1626994

description: updated
Changed in asdf:
status: New → Fix Committed
Daniel Kochmański (jackdaniel) wrote :

My bad, #1626994 is about dll-op, this one is still valid

Changed in asdf:
status: Fix Committed → In Progress
Faré (fahree) wrote :

I remember hitting the very same issue long ago when I re-wrote asdf-ecl and wrote asdf/bundle, and when I ported it to MKCL, where indeed, a .so is built from the .o's not the .a's.

So, what behavior do you want? When shall .a's ever be used as input?

Daniel Kochmański (jackdaniel) wrote :

It's useful target for fasl and program (and of course monolithic static libraries are very useful as a final target in case of ECL if embedded in C application).

Daniel Kochmański (jackdaniel) wrote :

s/useful target/valid input/

Daniel Kochmański (jackdaniel) wrote :

Fix in the MR !59 seems to work for me.

Faré (fahree) wrote :

The fix in !59 eschews using libraries as input, except when linking an executable, at which point they use individual libraries and not a monolithic one — because that's how (so far) bundle.lisp determines whether uiop, asdf, cmp have already been linked (or not).

All the combinations are possible. If you tell me which ones you want, I'll make it happen.

Daniel Kochmański (jackdaniel) wrote :

The current behaviour looks alright.

Faré (fahree) wrote :

Slated for release 3.2

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → Medium
milestone: none → 3.2
status: In Progress → Fix Committed
Faré (fahree) on 2017-01-13
Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers