Stack Build error: Undefined symbols for architecture x86_64










0















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.










share|improve this question






















  • Have you tried installing libiconv ?

    – bergey
    Nov 11 '18 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 '18 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 '18 at 17:36















0















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.










share|improve this question






















  • Have you tried installing libiconv ?

    – bergey
    Nov 11 '18 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 '18 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 '18 at 17:36













0












0








0


1






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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 '18 at 22:10









Evan ZamirEvan Zamir

2,56633353




2,56633353












  • Have you tried installing libiconv ?

    – bergey
    Nov 11 '18 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 '18 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 '18 at 17:36

















  • Have you tried installing libiconv ?

    – bergey
    Nov 11 '18 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 '18 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 '18 at 17:36
















Have you tried installing libiconv ?

– bergey
Nov 11 '18 at 13:59






Have you tried installing libiconv ?

– bergey
Nov 11 '18 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 '18 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 '18 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 '18 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 '18 at 17:36












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















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

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














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





















































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







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế