Opened 3 years ago

Last modified 19 months ago

#5355 new bug

Link plugins against existing libHSghc

Reported by: batterseapower Owned by:
Priority: normal Milestone: 7.6.2
Component: Compiler Version: 7.0.3
Keywords: Cc: as@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By: #5292
Blocking: Related Tickets:

Description

This ticket split out from #3843 since it was getting too crowded

Once we can safely export all symbols from libHSghc through the executable, we want to link plugins against the loaded GHC library rather than a new copy. This has two benefits:

  1. Linking plugins will be faster
  2. We can make reinitializeGlobals into a no-op

This is currently blocked by #5292 because libHSghc exports more symbols than we can reexport on Windows. There is one suggestions in #3843 to reexport less: exclude more of GHC's dependencies from being reexported, using this snippet to get the package list:

$(foreach p,$(PACKAGES),$p-$(libraries/$p_dist-install_VERSION))

Once we have cut the number of exported symbols down enough, the patches in #3843's attachment 3843-v2.zip can be applied to fix this ticket. (There was a reported validate failure with this patch in annrun01 on x64 linux which should also be checked)

Change History (4)

comment:1 Changed 3 years ago by daniel.is.fischer

Now the 3843-v2 patches produce unexpected failures for annrun01(ghci) and 5313(ghci), both on 32-bit linux and on 64-bit linux. On 32-bits, both tests segfault, on 64-bits, 5313(ghci) once segfaulted (validate) and once (make TEST=5313) produced

===== program output begins here
5313: /home/dafis/GHC/bghc/inplace/lib/ase: openFile: does not exist (No such file or directory)

for stderr.

annrun01 produced similar stderr:

Stderr:
/home/dafis/GHC/bghc/bindisttest/install dir/lib/ghc-7.3.20110730/ypes_ZC_con_info: openFile: does not exist (No such file or directory)

during validate resp.

/home/dafis/GHC/bghc/inplace/lib/rorHandler_closure: openFile: does not exist (No such file or directory)

with make TEST=annrun01.

Maybe that'll help diagnosing the problem.

comment:2 Changed 3 years ago by thoughtpolice

  • Cc as@… added

comment:3 Changed 2 years ago by igloo

  • Milestone set to 7.6.1

comment:4 Changed 19 months ago by igloo

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