Problem with cabal's --enable-library-coverage on 7.8.1rc2

Federico Mastellone fmaste at gmail.com
Mon Mar 10 16:04:07 UTC 2014


Found the problem,

I did not have the modules that were used but not exposed enumerated under "other-modules” on cabal's library definition. This builds OK on 7.6.3 even with a correct code coverage report, but fails to build with the linking error under 7.8-rc2. When I add the “other-modules” it works on both.


On Mar 9, 2014, at 17:26, Carter Schonwald <carter.schonwald at gmail.com> wrote:

> great!
> Thanks for taking the time to shrink the bug, look forward to helping on the ticket
> 
> 
> On Sun, Mar 9, 2014 at 12:32 PM, Federico Mastellone <fmaste at gmail.com> wrote:
> With a package of mine that I reduced it to just two modules, the one on the link below. 
> I did not file a bug, I wanted to ask here first. I'll do it now
> 
> On 09/03/2014, at 11:41, Carter Schonwald <carter.schonwald at gmail.com> wrote:
> 
>> Ok. What cabal package?  Have you filed a bug report on ghc trac?
>> 
>> On Sunday, March 9, 2014, Federico Mastellone <fmaste at gmail.com> wrote:
>> Downloaded gcc-4.9 binary from http://hpc.sourceforge.net and tested again with both 7.6.3 and 7.8-rc2
>> 
>> Fails with the same error with 7.8-rc2 and does not fail with 7.6.3
>> 
>> ld: illegal text reloc in '_enablezmlibraryzmcoveragezm0zi0zi1_Library_sendMsg2_info' to '__hpc_tickboxes_enablezmlibraryzmcoveragezm0zi0zi1_Util_hpc' for architecture x86_64
>> collect2: error: ld returned 1 exit status
>> 
>> On Mar 7, 2014, at 16:58, Carter Schonwald <carter.schonwald at gmail.com> wrote:
>> 
>>> No.  Try real GCC.  Follow my linked directions.  Xcode GCC is fake.  It's clang.  Follow my directions please. 
>>> 
>>> On Friday, March 7, 2014, Federico Mastellone <fmaste at gmail.com> wrote:
>>> It’s the same error with and without the clang-xcode5-wrapper that is named as an alternative solution 
>>> 
>>> On Mar 7, 2014, at 13:10, Carter Schonwald <carter.schonwald at gmail.com> wrote:
>>> 
>>>> try using real GCC
>>>> 
>>>> i have these directions https://gist.github.com/cartazio/7131371
>>>> 
>>>> 
>>>> On Fri, Mar 7, 2014 at 10:47 AM, Federico Mastellone <fmaste at gmail.com> wrote:
>>>> Hi,
>>>> 
>>>> On Mac OS X 10.9.2 with ghc 7.8.0.20140228 and cabal 1.18.0.3
>>>> 
>>>> Doing:
>>>> cabal configure --enable-library-coverage
>>>> cabal build
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Fails with:
>>>>> ld: illegal text reloc in '_enablezmlibraryzmcoveragezm0zi0zi1_Library_sendMsg2_info' to '__hpc_tickboxes_enablezmlibraryzmcoveragezm0zi0zi1_Util_hpc' for architecture x86_64
>>>>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>>> 
>>>> But without the coverage flag it’s OK.
>>>> 
>>>> I found it when switching from 7.6.3 to 7.8.1RC2 on a project I have and was able to strip it to this:
>>>> https://github.com/fmaste/ghc-7.8.0.20140228-enable-library-coverage
>>>> 
>>>> Don’t know if this is a cabal or ghc problem and I don’t know how to continue.
>>>> 
>>>> Thanks!
>>>> 
>>>> My ghc —info:
>>>>  [("Project name","The Glorious Glasgow Haskell Compilation System")
>>>>  ,("GCC extra via C opts"," -fwrapv")
>>>>  ,("C compiler command","/usr/bin/gcc")
>>>>  ,("C compiler flags"," -m64 -fno-stack-protector")
>>>>  ,("C compiler link flags"," -m64")
>>>>  ,("ld command","/usr/bin/ld")
>>>>  ,("ld flags"," -arch x86_64")
>>>>  ,("ld supports compact unwind","YES")
>>>>  ,("ld supports build-id","NO")
>>>>  ,("ld supports filelist","YES")
>>>>  ,("ld is GNU ld","NO")
>>>>  ,("ar command","/usr/bin/ar")
>>>>  ,("ar flags","clqs")
>>>>  ,("ar supports at file","NO")
>>>>  ,("touch command","touch")
>>>>  ,("dllwrap command","/bin/false")
>>>>  ,("windres command","/bin/false")
>>>>  ,("libtool command","libtool")
>>>>  ,("perl command","/usr/bin/perl")
>>>>  ,("target os","OSDarwin")
>>>>  ,("target arch","ArchX86_64")
>>>>  ,("target word size","8")
>>>>  ,("target has GNU nonexec stack","False")
>>>>  ,("target has .ident directive","True")
>>>>  ,("target has subsections via symbols","True")
>>>>  ,("Unregisterised","NO")
>>>>  ,("LLVM llc command","llc")
>>>>  ,("LLVM opt command","opt")
>>>>  ,("Project version","7.8.0.20140228")
>>>>  ,("Booter version","7.6.3")
>>>>  ,("Stage","2")
>>>>  ,("Build platform","x86_64-apple-darwin")
>>>>  ,("Hos
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20140310/0b62b5f9/attachment.html>


More information about the Glasgow-haskell-users mailing list