Repository navigation
Conversation
* Fixes haskell#4263 and is a direct implementation of the recommendations there
|
/cc @christiaanb I think this can go in once the build bot is green. |
|
This will probably conflict with #4400, but I'm OK with giving this patch priority. More discussion in #4400 (comment) |
|
I'm pretty sure this mostly mitigates the problem. However:
|
|
@christiaanb Good feedback for what's IMHO a silly vendor induced problem in the first place. I'll look into it some more. |
|
I'd really rather avoid shared locations like this. I was under the impression that we can make a scheme work with separate dirs by including the store entry dir name into the library names. Certainly if we do have a shared dir, then we must include the store entry id into the .dynlib library names, otherwise we've broken the properties of the store. |
|
@dcoutts Do you think you can come up with an alternate fix in time for |
|
@23Skidoo @bugthunk The scheme I think we ought to look at is: Note that we do not need the abi in the library file name. Indeed in principle we do not need the package name or version either, since the store dir entry name is included. |
|
I second @dcoutts after having read up on the marvels of |
|
Ah yeah, forgot that @dcoutts and I actually discussed his proposed scheme on IRC; sorry about that. For his scheme to work, all you need to do is make sure the Which is set in here: RPaths are calculated here: cabal/Cabal/Distribution/Simple/GHC.hs Line 1342 in e28abb9 |
|
(Resolved) Blocker: don't know how to get cabal/Cabal/Distribution/Simple/GHC.hs Line 1405 in 3b8ee83 Any pointers about how to go about this? |
|
(Resolved) I realise my request lacks context. Here comes some. Do correct me if I'm wrong. As indicated by @christiaanb, Therefore, it would seem I need the ABI hash but I'm not sure as to how to go about it. Also, I'm not exactly sure that the ABI is at all available at the stage where the build process is at at that point. |
|
The proof-of-concept I have 'implemented' uses the Cabal store (expanding to ~ In this particular instance, there were ~ 450 of these. It adds up. It was way worse when the I don't know how to tackle this I envision either of two approaches:
I'm sincerely open to both. |
|
@bugthunk I don't get what's going on here. Are you saying that:
Or are you saying that:
|
|
@christiaanb : "None of the above"... I just realised it's probably my poor (albeit increasing!) knowledge of cabal itself that was the cause of this. Sorry for the interrupt. 😞 goes back to hacking, enthusiastically |
|
Let me just add that the next time I'll think it through when I'm a little less emotional. |
|
Stubborn as I am, I'm still at it. I might not solve it in the end but I've learned a lot. Current problem: I cannot find how to control Neither can I find any pointers about what this shared object is, which would really help in deciding if the approach will work at all. |
|
Remilestoned. |
|
Since the rpath approach seems to be difficult to implement, perhaps we can go with "dump everything into a single dir" for now and implement the rpath idea later? |
|
Any progress on this? I'm running into this myself, and it's pretty annoying. |
|
@bugthunk is on holiday, I think no-one else is looking into this. |
|
Since |
|
I've just run into this with How about we symlink all libraries to |
|
Alright, building static only trips ghc up if it thinks it is capable of loading dynamic libs. It doesn't gracefully degrade to archives, but goes straight belly up with missing dynamic libraries. Not sure |
|
For the record, here's what I get for
|
|
@angerman It's not just the commands that the output of |
|
Do we know if symlinks work? Maybe I take another stab tomorrow at it, and symlink all libraries into |
|
Looking at the absolute file name of the dylib: Why can't this simply be: what information do we loose? |
|
@angerman Just symlinking won't work, you also need to update the package database entries so that Cabal and GHC know that the Anyhow, as discussed earlier in this thread, putting |
|
@christiaanb what is implement in #4656 doesn't use symlinks. I figured that that was too hard to get right, and left it at changing the dynlib path. It needed some additional plumbing due to the relocatable prefix install assumption. I actually tried to get the Just to be clear, I'm not happy with #4656, but it allows me to work with |
|
The |
|
Just to add this here for reference. The optimal solution might actually be teaching ghc about recursive dylibs (https://github.com/angerman/dylib-linking) and only linking the top level dependencies instead of flattening out the dependency graph. I'd like to implement this eventually. With that in ghc, and cabal using ghc to link anyway, this issue might go away on it's own (even though it's a less prominent issue due to #4656 being merged). |
|
Closing in favour of #4656. |
Fixes #4263 and is a direct implementation of the recommendations there.