[GHC] #7992: Wrong invocation of configure script in libffi and integer-gmp

#7992: Wrong invocation of configure script in libffi and integer-gmp --------------------------------+------------------------------------------- Reporter: merijn | Owner: Type: bug | Status: new Priority: normal | Component: Build System Version: 7.7 | Keywords: patch Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Building GHC failed | Blockedby: Blocking: | Related: --------------------------------+------------------------------------------- Similar to the fixed cabal issue: https://github.com/haskell/cabal/pull/1021 The autoconf generated configure script tries to automatically determine the location of the configure script. If the name (argv[0]) of the configure script does not include a path separator autoconf will first scan the path for a file named "configure" before defaulting to the current directory. The libffi and integer-gmp make files previously called configure by doing "$(SHELL) configure" this will result in it finding any files named "configure" in the path and using the location of that file as the basedir to look for the build's sub directoris. The result is that the libffi /integer-gmp header files, etc. are not found, resulting in a build failure when trying to compile GHC. Changing the makefiles to use "$(SHELL) ./configure" will avoid this behaviour, the presence of a path separator causes autoconf to default to checking the current directory first. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp --------------------------------+------------------------------------------- Reporter: merijn | Owner: Type: bug | Status: patch Priority: normal | Component: Build System Version: 7.7 | Keywords: patch Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Building GHC failed | Blockedby: Blocking: | Related: --------------------------------+------------------------------------------- Changes (by merijn): * status: new => patch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp ---------------------------------+------------------------------------------ Reporter: merijn | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 7.7 Keywords: patch | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Building GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * difficulty: => Unknown Comment: What version of autoconf do you have? Can you attach a configure script it generated, and clarify which bit of code in it you're talking about please? Also, what does {{{ make show VALUE=SHELL }}} say for you in your GHC tree? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp ---------------------------------+------------------------------------------ Reporter: merijn | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 7.7 Keywords: patch | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Building GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by merijn): This is not about the generated configure script, it's an upstream issue with the behaviour of autoconf. Autoconf tries to determine the location from which a configure script is run and then set paths based on that. Due to the behaviour I described, running configure without the ./ and another configure script *anywhere in your path* will lead autoconf to conclude that configure is being run from *within that directory on your path*. This of course leads it to refer to all sorts of wrong paths. This change makes autoconf decide to check the current working directory for the location of the configure script before it tries looking in your path, as a result it uses the correct directory even if there's another configure script in your path anywhere. The output of "make show VALUE=SHELL" should be irrelevant, but is: {{{ make -r --no-print-directory -f ghc.mk show SHELL="/bin/sh" }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp ---------------------------------+------------------------------------------ Reporter: merijn | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 7.7 Keywords: patch | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Building GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by igloo): How curious: {{{ ghc/libffi/build$ cat `which configure` #!/bin/sh echo Hello, this is my configure ghc/libffi/build$ sh configure --help Hello, this is my configure ghc/libffi/build$ sh ./configure --help `configure' configures libffi 3.0.11 to adapt to many kinds of systems. [...] }}} configure seems to try to find the location of the configure script, and re-exec itself. This goes wrong if there's a configure script in `$PATH` and we use `sh configure`. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp
---------------------------------+------------------------------------------
Reporter: merijn | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Build System | Version: 7.7
Keywords: patch | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Building GHC failed
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by ian@…):
commit 499d6988663043d0e0a0732f865324e959139927
{{{
Author: Ian Lynagh

#7992: Wrong invocation of configure script in libffi and integer-gmp ----------------------------------+----------------------------------------- Reporter: merijn | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: fixed | Keywords: patch Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Building GHC failed | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: ----------------------------------+----------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed Comment: Applied; thanks for the patches and diagnosis! -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7992: Wrong invocation of configure script in libffi and integer-gmp ----------------------------------+----------------------------------------- Reporter: merijn | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Build System | Version: 7.7 Resolution: fixed | Keywords: patch Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Building GHC failed | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: ----------------------------------+----------------------------------------- Changes (by igloo): * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7992#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC