Stack Build error: Undefined symbols for architecture x86_64
up vote
0
down vote
favorite
I am trying to run stack build
and get the following errors:
bartosz $ stack setup
The GHC located at /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc failed to compile a sanity check. Please see:
http://docs.haskellstack.org/en/stable/install_and_upgrade/
for more information. Exception was:
Received ExitFailure 1 when running
Raw command: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs -no-user-package-db
Run from: /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/
Standard output:
[1 of 1] Compiling Main ( /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs, /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.o )
Linking /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main ...
Standard error:
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_hs_iconv in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding8_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding12_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_info , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding13_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding14_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_bytes , _hs_iconv_close , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_open)
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_locale_charset", referenced from:
_localeEncoding in libHSbase-4.11.1.0.a(PrelIOUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Here is the output from stack path
:
stack-root: /Users/evanzamir/.stack
project-root: /Users/evanzamir/Code/Haskell/bartosz
config-location: /Users/evanzamir/Code/Haskell/bartosz/stack.yaml
bin-path: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/bin:/Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin/stack:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/evanzamir/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/bin:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/usr/local/share/npm/bin/jitsu :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/sbin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/local/share/npm/bin
programs: /Users/evanzamir/.stack/programs/x86_64-osx
compiler-exe: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc
compiler-bin: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin
compiler-tools-bin: /Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin
local-bin: /Users/evanzamir/.local/bin
extra-include-dirs:
extra-library-dirs:
snapshot-pkg-db: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb
local-pkg-db: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb
global-pkg-db: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
ghc-package-path: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
snapshot-install-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4
local-install-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4
snapshot-doc-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/doc
local-doc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/doc
dist-dir: .stack-work/dist/x86_64-osx/Cabal-2.2.0.1
local-hpc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/hpc
local-bin-path: /Users/evanzamir/.local/bin
ghc-paths: /Users/evanzamir/.stack/programs/x86_64-osx
Been trying to figure this out all day. I'm on OS X Mojave 14.1. I've tried installing stack using the script, Brew, directly from the binary, and even the Haskell Platform installer, and all are giving me errors.
haskell ghc haskell-stack
add a comment |
up vote
0
down vote
favorite
I am trying to run stack build
and get the following errors:
bartosz $ stack setup
The GHC located at /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc failed to compile a sanity check. Please see:
http://docs.haskellstack.org/en/stable/install_and_upgrade/
for more information. Exception was:
Received ExitFailure 1 when running
Raw command: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs -no-user-package-db
Run from: /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/
Standard output:
[1 of 1] Compiling Main ( /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs, /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.o )
Linking /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main ...
Standard error:
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_hs_iconv in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding8_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding12_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_info , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding13_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding14_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_bytes , _hs_iconv_close , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_open)
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_locale_charset", referenced from:
_localeEncoding in libHSbase-4.11.1.0.a(PrelIOUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Here is the output from stack path
:
stack-root: /Users/evanzamir/.stack
project-root: /Users/evanzamir/Code/Haskell/bartosz
config-location: /Users/evanzamir/Code/Haskell/bartosz/stack.yaml
bin-path: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/bin:/Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin/stack:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/evanzamir/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/bin:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/usr/local/share/npm/bin/jitsu :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/sbin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/local/share/npm/bin
programs: /Users/evanzamir/.stack/programs/x86_64-osx
compiler-exe: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc
compiler-bin: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin
compiler-tools-bin: /Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin
local-bin: /Users/evanzamir/.local/bin
extra-include-dirs:
extra-library-dirs:
snapshot-pkg-db: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb
local-pkg-db: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb
global-pkg-db: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
ghc-package-path: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
snapshot-install-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4
local-install-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4
snapshot-doc-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/doc
local-doc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/doc
dist-dir: .stack-work/dist/x86_64-osx/Cabal-2.2.0.1
local-hpc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/hpc
local-bin-path: /Users/evanzamir/.local/bin
ghc-paths: /Users/evanzamir/.stack/programs/x86_64-osx
Been trying to figure this out all day. I'm on OS X Mojave 14.1. I've tried installing stack using the script, Brew, directly from the binary, and even the Haskell Platform installer, and all are giving me errors.
haskell ghc haskell-stack
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided bylibiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I havelibiconv
installed on my Mac, so I assume I installed it in response to errors like these.
– bergey
Nov 12 at 17:36
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to run stack build
and get the following errors:
bartosz $ stack setup
The GHC located at /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc failed to compile a sanity check. Please see:
http://docs.haskellstack.org/en/stable/install_and_upgrade/
for more information. Exception was:
Received ExitFailure 1 when running
Raw command: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs -no-user-package-db
Run from: /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/
Standard output:
[1 of 1] Compiling Main ( /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs, /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.o )
Linking /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main ...
Standard error:
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_hs_iconv in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding8_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding12_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_info , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding13_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding14_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_bytes , _hs_iconv_close , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_open)
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_locale_charset", referenced from:
_localeEncoding in libHSbase-4.11.1.0.a(PrelIOUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Here is the output from stack path
:
stack-root: /Users/evanzamir/.stack
project-root: /Users/evanzamir/Code/Haskell/bartosz
config-location: /Users/evanzamir/Code/Haskell/bartosz/stack.yaml
bin-path: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/bin:/Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin/stack:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/evanzamir/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/bin:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/usr/local/share/npm/bin/jitsu :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/sbin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/local/share/npm/bin
programs: /Users/evanzamir/.stack/programs/x86_64-osx
compiler-exe: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc
compiler-bin: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin
compiler-tools-bin: /Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin
local-bin: /Users/evanzamir/.local/bin
extra-include-dirs:
extra-library-dirs:
snapshot-pkg-db: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb
local-pkg-db: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb
global-pkg-db: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
ghc-package-path: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
snapshot-install-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4
local-install-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4
snapshot-doc-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/doc
local-doc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/doc
dist-dir: .stack-work/dist/x86_64-osx/Cabal-2.2.0.1
local-hpc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/hpc
local-bin-path: /Users/evanzamir/.local/bin
ghc-paths: /Users/evanzamir/.stack/programs/x86_64-osx
Been trying to figure this out all day. I'm on OS X Mojave 14.1. I've tried installing stack using the script, Brew, directly from the binary, and even the Haskell Platform installer, and all are giving me errors.
haskell ghc haskell-stack
I am trying to run stack build
and get the following errors:
bartosz $ stack setup
The GHC located at /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc failed to compile a sanity check. Please see:
http://docs.haskellstack.org/en/stable/install_and_upgrade/
for more information. Exception was:
Received ExitFailure 1 when running
Raw command: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs -no-user-package-db
Run from: /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/
Standard output:
[1 of 1] Compiling Main ( /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.hs, /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main.o )
Linking /private/var/folders/rj/vrrtj8094qb8gf4ky_r_mxq80000gn/T/stack-sanity-check4255/Main ...
Standard error:
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_hs_iconv in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding8_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding12_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_info , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding13_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding14_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_bytes , _hs_iconv_close , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_open)
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-4.11.1.0.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_locale_charset", referenced from:
_localeEncoding in libHSbase-4.11.1.0.a(PrelIOUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Here is the output from stack path
:
stack-root: /Users/evanzamir/.stack
project-root: /Users/evanzamir/Code/Haskell/bartosz
config-location: /Users/evanzamir/Code/Haskell/bartosz/stack.yaml
bin-path: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/bin:/Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin/stack:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/evanzamir/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/evanzamir/.rvm/bin:/usr/local/smlnj-110.77/bin:/opt/local/bin:/opt/local/sbin:/usr/local/share/npm/bin/jitsu :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/sbin:/usr/local/share/npm/bin:/usr/local/sbin:/usr/local/share/npm/bin
programs: /Users/evanzamir/.stack/programs/x86_64-osx
compiler-exe: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin/ghc
compiler-bin: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/bin
compiler-tools-bin: /Users/evanzamir/.stack/compiler-tools/x86_64-osx/ghc-8.4.4/bin
local-bin: /Users/evanzamir/.local/bin
extra-include-dirs:
extra-library-dirs:
snapshot-pkg-db: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb
local-pkg-db: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb
global-pkg-db: /Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
ghc-package-path: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/pkgdb:/Users/evanzamir/.stack/programs/x86_64-osx/ghc-8.4.4/lib/ghc-8.4.4/package.conf.d
snapshot-install-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4
local-install-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4
snapshot-doc-root: /Users/evanzamir/.stack/snapshots/x86_64-osx/lts-12.17/8.4.4/doc
local-doc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/doc
dist-dir: .stack-work/dist/x86_64-osx/Cabal-2.2.0.1
local-hpc-root: /Users/evanzamir/Code/Haskell/bartosz/.stack-work/install/x86_64-osx/lts-12.17/8.4.4/hpc
local-bin-path: /Users/evanzamir/.local/bin
ghc-paths: /Users/evanzamir/.stack/programs/x86_64-osx
Been trying to figure this out all day. I'm on OS X Mojave 14.1. I've tried installing stack using the script, Brew, directly from the binary, and even the Haskell Platform installer, and all are giving me errors.
haskell ghc haskell-stack
haskell ghc haskell-stack
asked Nov 10 at 22:10
Evan Zamir
2,51123252
2,51123252
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided bylibiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I havelibiconv
installed on my Mac, so I assume I installed it in response to errors like these.
– bergey
Nov 12 at 17:36
add a comment |
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided bylibiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I havelibiconv
installed on my Mac, so I assume I installed it in response to errors like these.
– bergey
Nov 12 at 17:36
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided by
libiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I have libiconv
installed on my Mac, so I assume I installed it in response to errors like these.– bergey
Nov 12 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided by
libiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I have libiconv
installed on my Mac, so I assume I installed it in response to errors like these.– bergey
Nov 12 at 17:36
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243925%2fstack-build-error-undefined-symbols-for-architecture-x86-64%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried installing libiconv ?
– bergey
Nov 11 at 13:59
@bergey No I haven't tried that. Is that something that is required but not documented anywhere? Also, is this necessary on OS X?
– Evan Zamir
Nov 11 at 17:36
Those are errors from the linker, and I think the functions it's looking for are provided by
libiconv
. It's one of those problems that I only run into every few years, when setting up a new computer, so I'm not sure which OSes require it or how I figured this out. I havelibiconv
installed on my Mac, so I assume I installed it in response to errors like these.– bergey
Nov 12 at 17:36