[GHC] #8790: rts: unrust 'libbfd' debug symbols parser

#8790: rts: unrust 'libbfd' debug symbols parser ------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- For quite a long while you might have seen such ./configure output: {{{ checking bfd.h usability... yes checking bfd.h presence... yes checking for bfd.h... yes ... checking for bfd_uncompress_section_contents in -lbfd... no }}} which means very interesting debug bit in rts (+RTS -Di) is disabled. It's because most of functions in bfd.h are actually macros, thus test fails: config.log: {{{ configure:9545: checking for bfd_uncompress_section_contents in -lbfd configure:9570: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx -mtune=corei7-avx -O2 -pipe -fdiagnostics-show-option -frecord-gcc- switches -ggdb3 -march=corei7-avx -march=corei7-avx -m tune=corei7-avx -mtune=corei7-avx -ggdb3 -fno-stack-protector -Wa,-- noexecstack -Wa,--noexecstack -fno-stack-protector -Wl,-O1 -Wl,--as- needed -Wl,--hash-style=gnu -Wl,--hash-size=31 -Wl,--r educe-memory-overheads conftest.c -lbfd -liberty >&5 /tmp/portage/dev-lang/ghc-7.6.3-r1/temp/ccCEvDZ7.o: In function `main': /tmp/portage/dev-lang/ghc-7.6.3-r1/work/ghc-7.6.3/conftest.c:99: undefined reference to `bfd_uncompress_section_contents' }}} We don't use that function anyways, thus i've picked '''bfd_init'''. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8790: rts: unrust 'libbfd' debug symbols parser ----------------------------+---------------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.6.3 Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Moderate (less than a day) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Changes (by trommler): * cc: ptrommler@… (added) * difficulty: Unknown => Moderate (less than a day) Comment: The test for {{{bfd_uncompress_section_contents}}} is there to work around a statically linked libbfd that depends on libz. In that case the test intentionally fails. See #3756. Should we reopen #3756? I could work on a fix. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8790: rts: unrust 'libbfd' debug symbols parser ----------------------------+---------------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.6.3 Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Moderate (less than a day) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by simonmar): So your patch re-creates #3756 - is there a way to fix both at the same time? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8790: rts: unrust 'libbfd' debug symbols parser
----------------------------+----------------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: | Version: 7.6.3
Compiler | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Moderate (less than a day)
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
----------------------------+----------------------------------------------
Comment (by slyfox):
I think to make it work properly we need to use real code used by ghc with
AC_TRY_LINK.
Something like that:
{{{
AC_TRY_LINK([#include

#8790: rts: unrust 'libbfd' debug symbols parser ----------------------------+---------------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.6.3 Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Moderate (less than a day) Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by simonmar): All sounds good to me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8790: rts: unrust 'libbfd' debug symbols parser -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Moderate (less Type of failure: | than a day) None/Unknown | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: D193 | -------------------------------------+------------------------------------- Changes (by slyfox): * differential: => D193 Comment: Added manual knob, but did not fix that one-time leak: https://phabricator.haskell.org/D193 I propose to fix leak as another changeset with support for dynamic libs symbol loading. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8790: rts: unrust 'libbfd' debug symbols parser
-------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Moderate (less
Type of failure: | than a day)
None/Unknown | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: D193 |
-------------------------------------+-------------------------------------
Comment (by Sergei Trofimovich

#8790: rts: unrust 'libbfd' debug symbols parser -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Moderate (less Type of failure: | than a day) None/Unknown | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: D193 | -------------------------------------+------------------------------------- Changes (by slyfox): * status: new => closed * resolution: => fixed * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8790#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC