[GHC] #9762: #8696 + #9012
GHC
ghc-devs at haskell.org
Mon Nov 3 16:56:37 UTC 2014
#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
More information about the ghc-tickets
mailing list