Summary
Static extensions with inter-component dependencies must be installed twice
Metadata
- Id: ac98fadbd2a77757f184dceece31eec974da78cd
- Trac id: 1468
- Type: defect
- Reporter: evhan
- Owner: evhan
- Cc:
- Status: closed
- Component: core tools
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 5.0
- Version: 5.0.0
- Changetime: 2018-06-12 09:40:53 UTC
- Created: 2018-05-31 00:40:01 UTC
- Keywords:
Description
If an egg has one file `a.scm` that depends on another `b.scm`, the first time the egg is built the generated link file `a.link` won't include `b.o`. Subsequent builds work fine, once the extension has been installed.
There are two reasons for this:
1. The build directory isn't considered when looking for static extensions. 2. Even if it were, object files in the build directory are created with names that include "static" (e.g. `b.static.o`), which aren't found when looking for static objects (e.g. `b.o`). They are installed without the "static" bit, so once they're in the repository everything works OK.
I think the fix for item 1 is to make `find-static-extension` consider `##sys#setup-mode` just like `find-dynamic-extension` already does, and to prepend the current directory to the search path when it's enabled. (It should also append it when disabled, for consistency with its dynamic counterpart.)
I'm less sure what to do about item 2.
Changes and comments
[2018-06-02 11:50:38 UTC] felix wrote:
In setup mode, we could also accept a `.static.o` file extension, when the file exists, but I'm not sure how much uglyness this introduces.
[2018-06-05 11:43:05 UTC] evhan changed status from new to accepted
[2018-06-05 11:43:05 UTC] evhan set owner to evhan
[2018-06-05 11:43:05 UTC] evhan wrote:
That approach doesn't look too bad, I should have something working soon.
Another option would be to put the object files we want to keep around for installation in a subdirectory as they're built, but I think that would be more complicated since it would then have to be created, added to the library path, etc.