[GHC] #14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory"

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 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: -------------------------------------+------------------------------------- I get this error when I run hello world with `ghci` or `runghc`: {{{ $ ghc-stage2 --interactive Hello.hs GHCi, version 8.5.20180117: http://www.haskell.org/ghc/ :? for help gcc: error: libgmp.so: No such file or directory gcc: fatal error: no input files compilation terminated. `gcc' failed in phase `gcc'. (Exit code: 1) }}} It works with 8.2.2's `runghc` and `ghci` so it seems like a regression to me. This also causes validate failure on my laptop, because at one point validate script runs `runghc`. OS: Xubuntu 16.04.2 `libgmp.so` location: {{{ ➜ ~ locate libgmp.so /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 /usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines/libgmp.so }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 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: | -------------------------------------+------------------------------------- Comment (by osa1): `-v3` output: {{{ $ ghc-stage2 --interactive -v3 GHCi, version 8.5.20180117: http://www.haskell.org/ghc/ :? for help Glasgow Haskell Compiler, Version 8.5.20180117, stage 2 booted by GHC version 8.2.2 Using binary package database: /home/omer/haskell/ghc_2/inplace/lib/package.conf.d/package.cache Using binary package database: /home/omer/.ghc/x86_64-linux-8.5.20180117/package.conf.d/package.cache package flags [] loading package database /home/omer/haskell/ghc_2/inplace/lib/package.conf.d loading package database /home/omer/.ghc/x86_64-linux-8.5.20180117/package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.5.2.0 wired-in package integer-gmp mapped to integer-gmp-1.0.1.0 wired-in package base mapped to base-4.11.0.0 wired-in package rts mapped to rts wired-in package template-haskell mapped to template-haskell-2.13.0.0 wired-in package ghc mapped to ghc-8.5 wired-in package dph-seq not found. wired-in package dph-par not found. *** Parser [source]: !!! Parser [source]: finished in 0.51 milliseconds, allocated 0.266 megabytes *** Desugar: *** Simplify [expr]: !!! Simplify [expr]: finished in 0.18 milliseconds, allocated 0.120 megabytes *** CorePrep [expr]: !!! CorePrep [expr]: finished in 15.25 milliseconds, allocated 1.425 megabytes *** ByteCodeGen [Ghci1]: !!! ByteCodeGen [Ghci1]: finished in 0.12 milliseconds, allocated 0.132 megabytes Loading package ghc-prim-0.5.2.0 ... linking ... done. *** gcc: gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE '-fuse-ld=gold' -B/home/omer/haskell/ghc_2/libraries/integer-gmp/dist-install/build -B/home/omer/lib -B/home/omer/lib64 -B --print-file-name libgmp.so gcc: error: libgmp.so: No such file or directory gcc: fatal error: no input files compilation terminated. *** Deleting temp files: Deleting: *** Deleting temp dirs: Deleting: `gcc' failed in phase `gcc'. (Exit code: 1) }}} gcc version: {{{ $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 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: | -------------------------------------+------------------------------------- Comment (by osa1): We debugged this with AndreasK on IRC, it turns out this part of the gcc command: {{{ -B --print-file-name }}} causes gcc to not run in `--print-file-name` mode because `-B` is missing an argument, and `--print-file-name` is parsed as the argument for `-B`. So the question is now "why -B doesn't have an argument?". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 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: | -------------------------------------+------------------------------------- Comment (by osa1): This is caused by a trailing `:` in my env variables. Specifically, {{{ export LIBRARY_PATH=/home/omer/lib:/home/omer/lib64: }}} breaks it. If I remove the trailing `:` it works. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 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:D4330 Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * status: new => patch * differential: => Phab:D4330 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory"
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version:
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:D4330
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 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:D4330 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14695: ghc --interactive error: "gcc: error: libgmp.so: No such file or directory" -------------------------------------+------------------------------------- Reporter: osa1 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 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:D4330 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: 8.4.1 => 8.6.1 Comment: I don't believe the regressing patch is present in `ghc-8.4` and consequently comment:5 shouldn't be necessary. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14695#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC