GregorySchwartz/too-many-cells

Error in installation with stack

ghoshal opened this issue · 14 comments

Hi,

I am getting an error in installation with stack. Please see the error message. I am using MacOS Mojave 10.14.4. Please let me know the solution.

WARNING: Ignoring out of range dependency (allow-newer enabled): monoid-extras-0.5. dual-tree requires: >=0.2 && <0.5
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.2.0.1. gtk requires: >=1.24 && <2.1
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.2.0.1. gio requires: >=1.24 && <2.1
WARNING: Ignoring out of range dependency (allow-newer enabled): transformers-compat-0.6.2. mmorph requires: >=0.3 && <0.6
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-commons-0.2.1.0. pipes-text requires: >=0.1 && <0.2
WARNING: Ignoring out of range dependency (allow-newer enabled): async-2.2.1. typed-spreadsheet requires: >=2.0 && <2.2
WARNING: Ignoring out of range dependency (allow-newer enabled): foldl-1.4.2. typed-spreadsheet requires: >=1.1 && <1.4
WARNING: Ignoring out of range dependency (allow-newer enabled): aeson-1.4.0.0. streaming-utils requires: >0.8 && <1.2
WARNING: Ignoring out of range dependency (allow-newer enabled): json-stream-0.4.2.3. streaming-utils requires: >0.4.0 && <0.4.2
WARNING: Ignoring out of range dependency (allow-newer enabled): resourcet-1.2.1. streaming-utils requires: >1.0 && <1.2
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-0.2.1.0. streaming-utils requires: >=0.1.4.0 && <0.1.4.8
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-bytestring-0.1.6. streaming-utils requires: >=0.1.4.0 && <0.1.4.8
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-commons-0.2.1.0. streaming-utils requires: >0.1.0 && <0.1.18
WARNING: Ignoring out of range dependency (allow-newer enabled): transformers-0.5.5.0. streaming-utils requires: >=0.4 && <0.5.3
hierarchical-spectral-clustering-0.3.0.0: configure
diagrams-1.4: download
hierarchical-spectral-clustering-0.3.0.0: build
inline-r-0.9.2: configure
gtk-0.14.7: configure
Could not find custom-setup dep: Cabal
diagrams-1.4: configure
diagrams-1.4: build
diagrams-1.4: copy/register
Progress 4/9

-- While building package hierarchical-spectral-clustering-0.3.0.0 using:
/Users/biba/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/hierarchical-spectral-clustering-0.3.0.0.log

Configuring hierarchical-spectral-clustering-0.3.0.0...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for hierarchical-spectral-clustering-0.3.0.0..
Building library for hierarchical-spectral-clustering-0.3.0.0..
[ 1 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Types ( src/Math/Clustering/Hierarchical/Spectral/Types.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Types.o )
[ 2 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Load ( src/Math/Clustering/Hierarchical/Spectral/Load.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Load.o )
[ 3 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Utility ( src/Math/Clustering/Hierarchical/Spectral/Utility.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Utility.o )
[ 4 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Sparse ( src/Math/Clustering/Hierarchical/Spectral/Sparse.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Sparse.o )
[ 5 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Eigen.FeatureMatrix ( src/Math/Clustering/Hierarchical/Spectral/Eigen/FeatureMatrix.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Eigen/FeatureMatrix.o )
[ 6 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Eigen.AdjacencyMatrix ( src/Math/Clustering/Hierarchical/Spectral/Eigen/AdjacencyMatrix.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Eigen/AdjacencyMatrix.o )
[ 7 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Dense ( src/Math/Clustering/Hierarchical/Spectral/Dense.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Dense.o )
[ 8 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Test ( src/Math/Clustering/Hierarchical/Spectral/Test.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Test.o )
[ 9 of 10] Compiling Math.Graph.Types ( src/Math/Graph/Types.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Graph/Types.o )
[10 of 10] Compiling Math.Graph.Components ( src/Math/Graph/Components.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Graph/Components.o )
ignoring (possibly broken) abi-depends field for packages
Preprocessing executable 'cluster-tree' for hierarchical-spectral-clustering-0.3.0.0..
Building executable 'cluster-tree' for hierarchical-spectral-clustering-0.3.0.0..
[1 of 1] Compiling Main             ( app/Main.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/cluster-tree/cluster-tree-tmp/Main.o )
Linking .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/cluster-tree/cluster-tree ...
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_iconvEncoding12_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding18_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_info , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding17_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding14_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding18_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding16_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _hs_iconv_close , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding16_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding14_info )
  "_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)

-- While building package gtk-0.14.7 using:
/private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-2c47c2d5ae83912e/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/biba/.stack/snapshots/x86_64-osx/lts-12.0/8.4.3/pkgdb --package-db=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb --libdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib --bindir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin --datadir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share --libexecdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec --sysconfdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc --docdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --htmldir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --haddockdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --dependency=Cabal=Cabal-2.2.0.1 --dependency=array=array-0.5.2.0 --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=cairo=cairo-0.13.5.0-FlHMbXIytdkJ24AuhwTIIm --dependency=containers=containers-0.5.11.0 --dependency=gio=gio-0.13.4.1-uwR5pDtPrk9QgHfqqjx3G --dependency=glib=glib-0.13.6.0-8v3ZoQEqpf3Ib0SRPzybZI --dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.4.0-BeTuALJn73yF2BRI2iGnJc --dependency=mtl=mtl-2.2.2 --dependency=pango=pango-0.13.5.0-9Ppj0iNVrww8InFTamPfKW --dependency=text=text-1.2.3.0 -fdeprecated -ffmode-binary -fhave-gio -f-have-quartz-gtk --exact-configuration
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/gtk-0.14.7.log

[1 of 2] Compiling Main             ( /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-2c47c2d5ae83912e/gtk-0.14.7/Setup.hs, /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-2c47c2d5ae83912e/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/Main.o )
[2 of 2] Compiling StackSetupShim   ( /Users/biba/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-2c47c2d5ae83912e/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/StackSetupShim.o )
Linking /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-2c47c2d5ae83912e/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Configuring gtk-0.14.7...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
setup: The pkg-config package 'gtk+-2.0' is required but it could not be
found.

-- While building package inline-r-0.9.2 using:
/Users/biba/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/biba/.stack/snapshots/x86_64-osx/lts-12.0/8.4.3/pkgdb --package-db=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb --libdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib --bindir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin --datadir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share --libexecdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec --sysconfdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc --docdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --htmldir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --haddockdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --dependency=aeson=aeson-1.4.0.0-EAbp2GiwrvTH27nXdJzV0g --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.5.11.0 --dependency=data-default-class=data-default-class-0.1.2.0-2kYzERBLX3wJoPfj7mwVvW --dependency=deepseq=deepseq-1.4.3.0 --dependency=exceptions=exceptions-0.10.0-DmsI5QMvE6e6QgVkMINEKb --dependency=inline-c=inline-c-0.6.1.0-FM9gF7RqOpoLWRlok3Pud0 --dependency=mtl=mtl-2.2.2 --dependency=pretty=pretty-1.1.3.6 --dependency=primitive=primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C --dependency=process=process-1.6.3.0 --dependency=reflection=reflection-2.1.4-ET4Qfoy5lmWBopRK3ezJIQ --dependency=setenv=setenv-0.1.1.3-H1xmIqlPy4yIDquO6eJhBl --dependency=singletons=singletons-2.4.1-FDzlisNNwplIrNjegYYDdD --dependency=template-haskell=template-haskell-2.13.0.0 --dependency=text=text-1.2.3.0 --dependency=th-lift=th-lift-0.7.10-88ozaMeoe8eDZSlyIjheFa --dependency=th-orphans=th-orphans-0.13.6-6mvRAE1wQLBDXpoe3PtgV3 --dependency=transformers=transformers-0.5.5.0 --dependency=unix=unix-2.7.2.2 --dependency=vector=vector-0.12.0.1-GGZqQZyzchy8YFPCF67wxL --exact-configuration
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/inline-r-0.9.2.log

Configuring inline-r-0.9.2...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3: The pkg-config package 'libR' version
>=3.0 is required but it could not be found.

Thanks a lot in advance!!

This looks like tweag/HaskellR#200. It looks like they are having success with installing R with Homebrew, as also stated on their website in the OSX section (https://tweag.github.io/HaskellR/docs/build-and-install.html). Can you try that to see if it will work? If not let me know! The TooManyCells Docker may be the easiest solution with these kinds of dependency errors, but this might solve it.

Hi Greg,

I am getting an error while installing HaskellR.

Executable named nix-shell not found on path: ["/Users/biba/anaconda3/bin","/opt/local/bin","/opt/local/sbin","/Library/Frameworks/Python.framework/Versions/3.6/bin","/usr/local/bin","/usr/bin","/bin","/usr/sbin","/sbin","/opt/X11/bin"]

Thanks for your help.

That's...weird. HaskellR does not require nix at all, so I don't know why that would be necessary. Can I see the entire output? I see you have anaconda installed -- can you run PATH="$HOME/.local/bin:/usr/bin:$PATH" stack install instead of stack install to use the system paths?

I tried doing that as well that didn't work either. I am getting the same exact error as before.

Can I see the entire output from the command?

PATH="$HOME/.local/bin:/usr/bin:$PATH" stack install
WARNING: Ignoring out of range dependency (allow-newer enabled): monoid-extras-0.5. dual-tree requires: >=0.2 && <0.5
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.2.0.1. gtk requires: >=1.24 && <2.1
WARNING: Ignoring out of range dependency (allow-newer enabled): Cabal-2.2.0.1. gio requires: >=1.24 && <2.1
WARNING: Ignoring out of range dependency (allow-newer enabled): transformers-compat-0.6.2. mmorph requires: >=0.3 && <0.6
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-commons-0.2.1.0. pipes-text requires: >=0.1 && <0.2
WARNING: Ignoring out of range dependency (allow-newer enabled): async-2.2.1. typed-spreadsheet requires: >=2.0 && <2.2
WARNING: Ignoring out of range dependency (allow-newer enabled): foldl-1.4.2. typed-spreadsheet requires: >=1.1 && <1.4
WARNING: Ignoring out of range dependency (allow-newer enabled): aeson-1.4.0.0. streaming-utils requires: >0.8 && <1.2
WARNING: Ignoring out of range dependency (allow-newer enabled): json-stream-0.4.2.3. streaming-utils requires: >0.4.0 && <0.4.2
WARNING: Ignoring out of range dependency (allow-newer enabled): resourcet-1.2.1. streaming-utils requires: >1.0 && <1.2
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-0.2.1.0. streaming-utils requires: >=0.1.4.0 && <0.1.4.8
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-bytestring-0.1.6. streaming-utils requires: >=0.1.4.0 && <0.1.4.8
WARNING: Ignoring out of range dependency (allow-newer enabled): streaming-commons-0.2.1.0. streaming-utils requires: >0.1.0 && <0.1.18
WARNING: Ignoring out of range dependency (allow-newer enabled): transformers-0.5.5.0. streaming-utils requires: >=0.4 && <0.5.3
hierarchical-spectral-clustering-0.3.0.0: configure
hierarchical-spectral-clustering-0.3.0.0: build
inline-r-0.9.2: configure
gtk-0.14.7: configure
Could not find custom-setup dep: Cabal
Progress 3/8

-- While building package hierarchical-spectral-clustering-0.3.0.0 using:
/Users/biba/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/hierarchical-spectral-clustering-0.3.0.0.log

Configuring hierarchical-spectral-clustering-0.3.0.0...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for hierarchical-spectral-clustering-0.3.0.0..
Building library for hierarchical-spectral-clustering-0.3.0.0..
[ 1 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Types ( src/Math/Clustering/Hierarchical/Spectral/Types.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Types.o )
[ 2 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Load ( src/Math/Clustering/Hierarchical/Spectral/Load.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Load.o )
[ 3 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Utility ( src/Math/Clustering/Hierarchical/Spectral/Utility.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Utility.o )
[ 4 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Sparse ( src/Math/Clustering/Hierarchical/Spectral/Sparse.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Sparse.o )
[ 5 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Eigen.FeatureMatrix ( src/Math/Clustering/Hierarchical/Spectral/Eigen/FeatureMatrix.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Eigen/FeatureMatrix.o )
[ 6 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Eigen.AdjacencyMatrix ( src/Math/Clustering/Hierarchical/Spectral/Eigen/AdjacencyMatrix.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Eigen/AdjacencyMatrix.o )
[ 7 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Dense ( src/Math/Clustering/Hierarchical/Spectral/Dense.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Dense.o )
[ 8 of 10] Compiling Math.Clustering.Hierarchical.Spectral.Test ( src/Math/Clustering/Hierarchical/Spectral/Test.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Clustering/Hierarchical/Spectral/Test.o )
[ 9 of 10] Compiling Math.Graph.Types ( src/Math/Graph/Types.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Graph/Types.o )
[10 of 10] Compiling Math.Graph.Components ( src/Math/Graph/Components.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Math/Graph/Components.o )
ignoring (possibly broken) abi-depends field for packages
Preprocessing executable 'cluster-tree' for hierarchical-spectral-clustering-0.3.0.0..
Building executable 'cluster-tree' for hierarchical-spectral-clustering-0.3.0.0..
[1 of 1] Compiling Main             ( app/Main.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/cluster-tree/cluster-tree-tmp/Main.o )
Linking .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/cluster-tree/cluster-tree ...
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_iconvEncoding12_closure, _base_GHCziIOziEncodingziIconv_iconvEncoding1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding18_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding10_info , _hs_iconv , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding17_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding14_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding12_info , _base_GHCziIOziEncodingziIconv_iconvEncoding15_info , _base_GHCziIOziEncodingziIconv_iconvEncoding18_info , _base_GHCziIOziEncodingziIconv_iconvEncoding13_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding16_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_closure , _hs_iconv_close , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_bytes , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding16_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding15_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding1_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncoding_info , _base_GHCziIOziEncodingziIconv_iconvEncoding14_info )
  "_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)

-- While building package gtk-0.14.7 using:
/private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-efa397c264436707/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/biba/.stack/snapshots/x86_64-osx/lts-12.0/8.4.3/pkgdb --package-db=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb --libdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib --bindir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin --datadir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share --libexecdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec --sysconfdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc --docdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --htmldir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --haddockdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/gtk-0.14.7 --dependency=Cabal=Cabal-2.2.0.1 --dependency=array=array-0.5.2.0 --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=cairo=cairo-0.13.5.0-FlHMbXIytdkJ24AuhwTIIm --dependency=containers=containers-0.5.11.0 --dependency=gio=gio-0.13.4.1-uwR5pDtPrk9QgHfqqjx3G --dependency=glib=glib-0.13.6.0-8v3ZoQEqpf3Ib0SRPzybZI --dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.4.0-BeTuALJn73yF2BRI2iGnJc --dependency=mtl=mtl-2.2.2 --dependency=pango=pango-0.13.5.0-9Ppj0iNVrww8InFTamPfKW --dependency=text=text-1.2.3.0 -fdeprecated -ffmode-binary -fhave-gio -f-have-quartz-gtk --exact-configuration
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/gtk-0.14.7.log

[1 of 2] Compiling Main             ( /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-efa397c264436707/gtk-0.14.7/Setup.hs, /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-efa397c264436707/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/Main.o )
[2 of 2] Compiling StackSetupShim   ( /Users/biba/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-efa397c264436707/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/StackSetupShim.o )
Linking /private/var/folders/lx/y213srbn7dq_941s3qthqm7r0000gn/T/stack-efa397c264436707/gtk-0.14.7/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup/setup ...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Configuring gtk-0.14.7...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
setup: The pkg-config package 'gtk+-2.0' is required but it could not be
found.

-- While building package inline-r-0.9.2 using:
/Users/biba/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/biba/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/biba/.stack/snapshots/x86_64-osx/lts-12.0/8.4.3/pkgdb --package-db=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb --libdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib --bindir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin --datadir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share --libexecdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec --sysconfdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc --docdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --htmldir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --haddockdir=/Users/biba/Downloads/softwares/too-many-cells/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/inline-r-0.9.2 --dependency=aeson=aeson-1.4.0.0-EAbp2GiwrvTH27nXdJzV0g --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.5.11.0 --dependency=data-default-class=data-default-class-0.1.2.0-2kYzERBLX3wJoPfj7mwVvW --dependency=deepseq=deepseq-1.4.3.0 --dependency=exceptions=exceptions-0.10.0-DmsI5QMvE6e6QgVkMINEKb --dependency=inline-c=inline-c-0.6.1.0-FM9gF7RqOpoLWRlok3Pud0 --dependency=mtl=mtl-2.2.2 --dependency=pretty=pretty-1.1.3.6 --dependency=primitive=primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C --dependency=process=process-1.6.3.0 --dependency=reflection=reflection-2.1.4-ET4Qfoy5lmWBopRK3ezJIQ --dependency=setenv=setenv-0.1.1.3-H1xmIqlPy4yIDquO6eJhBl --dependency=singletons=singletons-2.4.1-FDzlisNNwplIrNjegYYDdD --dependency=template-haskell=template-haskell-2.13.0.0 --dependency=text=text-1.2.3.0 --dependency=th-lift=th-lift-0.7.10-88ozaMeoe8eDZSlyIjheFa --dependency=th-orphans=th-orphans-0.13.6-6mvRAE1wQLBDXpoe3PtgV3 --dependency=transformers=transformers-0.5.5.0 --dependency=unix=unix-2.7.2.2 --dependency=vector=vector-0.12.0.1-GGZqQZyzchy8YFPCF67wxL --exact-configuration
Process exited with code: ExitFailure 1
Logs have been written to: /Users/biba/Downloads/softwares/too-many-cells/.stack-work/logs/inline-r-0.9.2.log

Configuring inline-r-0.9.2...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3: The pkg-config package 'libR' version
>=3.0 is required but it could not be found.

Unfortunately debugging MacOS dependencies is difficult as I don't own one, but if you're willing to put up with me we can figure this out. If not, the Docker image may be your best bet as it's a self-contained entity (and you would not have to compile anything).

Okay, so the libR issue is still present. Did you try the Homebrew installation? I also see gtk+-2.0 failed, meaning it's either not finding gtk or it's not installed. Can you try installing gtk and using stack install --flag gtk:have-quartz-gtk or stack install --ghc-options "-fhave-quartz-gtk". Because of anaconda, always use PATH="$HOME/.local/bin:/usr/bin:$PATH" before these commands just in case.

This issue is similar to #5, so if we could get a macOS stack.yaml out of this knowing the intricacies of macOS dependencies, that would be fantastic!

I tried installing Gtk-OSX. Here's what I get.

PATH="$HOME/.local/bin:/usr/bin:$PATH" stack install --flag gtk:have-quartz-gtk
Writing implicit global project config file to: /Users/biba/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-13.15
Downloaded lts-13.15 build plan.
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.6.4.
Installed GHC.
Didn't see HSvm-0.1.1.3.22@sha256:8738582837b556d55b7247fd460176e3c8595ae6335b8889b7b8cd5764834928,882 in your package indices.
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Updating index
Updated package index downloaded
Update complete
Populated index cache.
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?

You should run the command in the too-many-cells folder.

Still giving the exact same error.

However, the docker version is working. Is there a way to work with the docker version and tooManyCellsR package?

The tooManyCellsR package is a thin wrapper that calls the command from the command line -- so in theory you could change the functions to have docker run etc. in front of them and specify output folders and then it should be good to go (assuming you belong to the docker group so you don't need sudo, instructions on docker's website.). It's a shame these issues are all happening on macOS...

When you say the same error, you mean from above? The latest error you gave should not be occuring in the too-many-cells folder with the stack.yaml, as it thinks you are elsewhere.

I was able to build on macOS with no issue using the commands I put into the documentation in Installation -> macOS (https://gregoryschwartz.github.io/too-many-cells/). Please try it out and see if it solves your problem!

It works on this end, so if you are still having difficulty please re-open this issue.