
#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- As of the patch for #9012, we create a static reference to an HPC ticks label if and only if it is in the same package, which is correct for building normally, but not for building libraries that are to be loaded piecemeal by GHCi/TH (as was the issue in #8696). See http://lpaste.net/113689 for an example error. I also wonder whether the other cases of `CLabel.labelDynamic` that check for "same package" could result in similar issues. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by nh2): * cc: nh2, niklash@…, aehlig@… (added) * related: => #8696, #9012 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by nh2): Some discussion from #ghc for readers who'd like context: '''nh2''': thoughtpolice, '''rwbarton''': I am getting the "recompile with -fPIC" message in my `ghc -M` based setup, which you discussed in https://ghc.haskell.org/trac/ghc/ticket/8696. If I get this message, does it really mean that I need -fPIC or that I'm calling something wrong? '''rwbarton''': you probably don't want -fPIC specifically, but rather whichever one of -shared and -dynamic is the one you want '''rwbarton''': however, we can't know without more context '''rwbarton''': or possibly something is just broken :) '''nh2''': so, in the end I don't want any dynamic linking at all, but I understand it that I need some form of it for GHCI to load modules during TH evaluation, right? carter: yeah '''rwbarton''': yes carter: at least for onw carter: i think luite got his TH patch ready? '''nh2''': so I'm not sure which one of -shared and -dynamic I want for ghci to "just work" '''rwbarton''': you will need to build both ways '''nh2''': so I'm already compiling with -dynamic-too; in this case, what do I have to add? '''rwbarton''': well then we need to see a real error '''nh2''': http://lpaste.net/113689 '''rwbarton''': oh, and you are using hpc too '''rwbarton''': I thought I fixed this... '''rwbarton''': what version of ghc? '''rwbarton''': that should be fixed in 7.8.3 I think '''nh2''': 7.8.3, unfortunately '''rwbarton''': hm '''rwbarton''': oh, right '''rwbarton''': I knew about this when I fixed it :) '''rwbarton''': but I wrote the test in the same form as the surrounding code '''rwbarton''': hpc and TH won't interact well currently '''rwbarton''': I think you are one of 3 people to use HPC '''nh2''': we are a 4 person team '''nh2''': define "won't interact well" between [works if you disable it somehow for the libs loaded in ghci .... and .... you got no chance] :) '''rwbarton''': basically your bug is the bastard child of #9012 and #8696 '''rwbarton''': well if you could build the dynamic objects without HPC then it should work '''nh2''': do you reckon there is also a full solution to this? Also, is this now a bug, should I file one? '''rwbarton''': there's a bunch of trivial fixes to every individual problem of this form '''rwbarton''': each one also costs a little performance in the associated situation '''rwbarton''': I guess if you are building with hpc then you don't care about this level of overhead '''nh2''': is there a way to tell the -dynamic-too invocation that I don't want HPC only for the dynamic files? Or will I have to stop using -dynamic-too and create the dynamic ones manually to achieve that? '''rwbarton''': but really we should find a better way to deal with the underlying issue, since it does cost a measurable amount of performance on anything built dynamically '''rwbarton''': probably the latter -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by rwbarton): * owner: => rwbarton -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9903, #9909 Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by rwbarton): * related: #8696, #9012 => #8696, #9012, #9903, #9909 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by rwbarton): * related: #8696, #9012, #9903, #9909 => #8696, #9012, #9909 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Changes (by rwbarton): * differential: => Phab:D583 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Comment (by rwbarton): Given that you are using one-shot mode, you can probably work around this bug for now with `-fomit-interface-pragmas` (this must go ''after'' `-O`). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: rwbarton
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #8696, #9012,
Test Case: | #9909
Blocking: |
Differential Revisions: Phab:D583 |
-------------------------------------+-------------------------------------
Comment (by Reid Barton

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: merge Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => merge * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Comment (by nomeata): The test is broken in a non-dynamic build of GHC. Not serious, but this affects travis, and it would be nice if travis would also give thumbs-up on the 7.10 branch, hence my request to also merge 1dcef98a77afa0f9dc73896b8d8cc7444e2e0039 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: merge Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Changes (by nomeata): * status: closed => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9762: #8696 + #9012 -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8696, #9012, Test Case: | #9909 Blocking: | Differential Revisions: Phab:D583 | -------------------------------------+------------------------------------- Changes (by hvr): * status: merge => closed Comment: Replying to [comment:11 nomeata]:
..., hence my request to also merge 1dcef98a77afa0f9dc73896b8d8cc7444e2e0039
cherry-picked via 62a6d14be0076da0adb3524e5ef70352beb4ee13 to ghc-7.10 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9762#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC