Closed luispedro closed 3 years ago
Can you retest this on the latest version if it is still relevant to you? Otherwise I would close this.
Yes. This is still happening.
conda create -n ghc-test
conda activate ghc-test
conda install -c conda-forge ghc
ghc-pkg recache
ghc Hello.hs -o hello
returns an error:
[1 of 1] Compiling Main ( Hello.hs, Hello.o )
<no location info>: error:
Warning: Couldn't figure out C compiler information!
Make sure you're using GNU gcc, or clang
ghc: could not execute: /home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-gcc
The file Hello.hs
is very simple:
module Main where
main = putStrLn "Hello World"
Again, the /home/luispedro/.anaconda/envs/ghc-test/lib/ghc-8.10.4/settings
file references these paths:
[("GCC extra via C opts", "")
,("C compiler command", "/home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-gcc")
,("C compiler flags", "")
,("C++ compiler flags", "")
,("C compiler link flags", "")
,("C compiler supports -no-pie", "YES")
,("Haskell CPP command", "/home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-gcc")
,("Haskell CPP flags", "-E -undef -traditional")
,("ld command", "/home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-ld")
,("ld flags", "")
,("ld supports compact unwind", "NO")
,("ld supports build-id", "YES")
,("ld supports filelist", "NO")
,("ld is GNU ld", "YES")
,("Merge objects command", "/home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-ld")
,("Merge objects flags", "-r")
,("ar command", "x86_64-unknown-linux-gnu-ar")
,("ar flags", "q")
,("ar supports at file", "YES")
,("ranlib command", "/home/conda/feedstock_root/build_artifacts/ghc_1631487753784/_build_env/bin/x86_64-conda-linux-gnu-ranlib")
,("otool command", "otool")
,("install_name_tool command", "install_name_tool")
,("touch command", "touch")
,("dllwrap command", "/bin/false")
,("windres command", "/bin/false")
,("libtool command", "libtool")
,("unlit command", "$topdir/bin/unlit")
,("cross compiling", "NO")
,("target platform string", "x86_64-unknown-linux")
,("target os", "OSLinux")
,("target arch", "ArchX86_64")
,("target word size", "8")
,("target has GNU nonexec stack", "YES")
,("target has .ident directive", "YES")
,("target has subsections via symbols", "NO")
,("target has RTS linker", "YES")
,("Unregisterised", "NO")
,("LLVM target", "x86_64-unknown-linux")
,("LLVM llc command", "llc")
,("LLVM opt command", "opt")
,("LLVM clang command", "clang")
,("integer library", "integer-gmp")
,("Use interpreter", "YES")
,("Use native code generator", "YES")
,("Support SMP", "YES")
,("RTS ways", "l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn thr_debug_p debug_p")
,("Tables next to code", "YES")
,("Leading underscore", "NO")
,("Use LibFFI", "NO")
,("Use Threads", "YES")
,("Use Debugging", "NO")
,("RTS expects libdw", "NO")
]
Compiling a simple test fails (this is on a fresh env with only GHC installed):
I believe the issue is that the
settings
file installed with ghc lists paths from the build environment, which (obviously) do not exist on my machine. Here is thelib/ghc-8.2.2/settings
file:Environment (
conda list
):Details about
conda
and system (conda info
):