Ticket #4451 (new bug)

Opened 3 years ago

Last modified 8 months ago

Re-linking avoidance is too aggressive

Reported by: simonmar Owned by: simonmar
Priority: normal Milestone: 7.6.2
Component: Compiler Version: 7.1
Keywords: Cc: jwlato@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm constantly annoyed by having to rm the binary when I want to relink with different options (-rtsopts, -threaded, etc.). We only check the date of the binary against the date of the object files and relink if it is out of date, we should really check whether the options have changed or not too.

Similar problems exist in ordinary .hs recompilation (see #437), but the solutions will be different, so it makes sense to have a separate ticket.

One solution is to store information about what settings were in effect when linking in the binary, perhaps in a special section that isn't loaded during execution. We already compile a C file during linking to support -rtsopts, so we could add some magic asm to it, and then use objdump during linking to extract the information from the existing binary if there is one.

Change History

Changed 3 years ago by simonpj

Maybe we should always re-link? Simple, if brutal.

Changed 3 years ago by simonmar

We could do that, but if I recall correctly the current relinking avoidance was added because people complained about unnecessary relinking happening every time they said cabal build.

Changed 2 years ago by simonmar

  • priority changed from normal to high

I'm getting more annoyed by the lack of this, so bumping priority.

Changed 2 years ago by simonmar

  • owner set to simonmar

Changed 2 years ago by simonmar

Fixed (for Linux). changeset:814edf44433801e37318ce79082ac6991dbc87dd

Still ToDo?: Windows, OS X, and add a test.

Changed 20 months ago by jwlato

  • cc jwlato@… added

Changed 18 months ago by simonmar

  • priority changed from high to normal
  • milestone changed from 7.4.1 to 7.6.1

Not doing anything about this for 7.4.1.

Changed 8 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.