[GHC] #12555: bindist configure checks involving the compiler are broken

#12555: bindist configure checks involving the compiler are broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Commit 6554dc60304bbd4b2edb93be7e1658bff237e067 added this code to `distrib/configure.ac.in`: {{{ BinDistNeedsLibdw=@HaveLibdw@ if test "x$BinDistNeedsLibdw" = "xyes" ; then AC_CHECK_LIB(dw, dwfl_attach_state, [HaveLibdw=YES], [AC_MSG_ERROR([Binary distribution was built with libdw support but target system doesn't have supported libdw version (needs at least 0.158)])] )]; fi }}} It occurs before any other autoconf command involving the compiler. So apparently the expansion of `AC_CHECK_LIB` includes the code responsible for checking how to invoke the compiler, checking the object file suffix, etc. (Yes, this is a crazy way to do it.) Since the official bindist has `BinDistNeedsLibdw=NO`, none of that code ever actually runs. Later (in `FPTOOLS_SET_HASKELL_PLATFORM_VARS`) the configure script uses ` AC_COMPILE_IFELSE` to check for features of the compiler like non- executable stack support, but these checks are broken because autoconf never actually determined basic information about the compiler. So the 8.0.1 bindist produces binaries with executable stacks, which is a problem on some systems. It would be better anyways to move this `AC_CHECK_LIB` later in `distrib/configure.ac.in`, to after where we select flags to be used when invoking the compiler. There are also some other bugs in this code: there is an extra `];` and the correct value of `BinDistNeedsLibdw` is `YES` (not `yes`) so the code currently can never run anyways. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12555 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12555: bindist configure checks involving the compiler are broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * milestone: => 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12555#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12555: bindist configure checks involving the compiler are broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * cc: bgamari, hvr (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12555#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12555: bindist configure checks involving the compiler are broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2510 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D2510 Comment: Oh dear, thank you Reid. I suppose the test plan also should have included testing with a sufficiently new libdw as well. Silly me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12555#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12555: bindist configure checks involving the compiler are broken
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2510
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12555: bindist configure checks involving the compiler are broken -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2510 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 23d60a530e2013b643aaa2de96f8cbbe98feb64e. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12555#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC