psibi / tldr-hs

Haskell tldr client
BSD 3-Clause "New" or "Revised" License
92 stars 14 forks source link

tldr-0.2.2 does not compile in NixOS #4

Closed peti closed 6 years ago

peti commented 7 years ago
[   37s] [1 of 1] Compiling Main             ( Setup.hs, Setup.o )
[   37s] Linking Setup ...
[   40s] + LANG=en_US.utf8
[   40s] + ./Setup configure --prefix=/usr --libdir=/usr/lib64 --docdir=/usr/share/doc/packages/ghc-tldr '--libsubdir=$compiler/$pkgkey' '--datasubdir=$pkgid' --ghc '--ghc-options= ' -v -p --enable-shared --htmldir=/usr/share/doc/ghc-8.0.2/html/libraries/tldr-0.2.2 --global
[   40s] Configuring tldr-0.2.2...
[   40s] Dependency ansi-terminal -any: using ansi-terminal-0.6.3.1
[   40s] Dependency base >=4.7 && <5: using base-4.9.1.0
[   40s] Dependency bytestring -any: using bytestring-0.10.8.1
[   40s] Dependency cmark -any: using cmark-0.5.5.1
[   40s] Dependency directory -any: using directory-1.3.0.0
[   40s] Dependency filepath -any: using filepath-1.4.1.1
[   40s] Dependency optparse-applicative -any: using optparse-applicative-0.13.2.0
[   40s] Dependency semigroups -any: using semigroups-0.18.3
[   40s] Dependency shell-conduit >=4.6.0: using shell-conduit-4.6.1
[   40s] Dependency text -any: using text-1.2.2.2
[   40s] Dependency tldr -any: using tldr-0.2.2
[   41s] Using Cabal-1.24.2.0 compiled by ghc-8.0
[   41s] Using compiler: ghc-8.0.2
[   41s] Using install prefix: /usr
[   41s] Binaries installed in: /usr/bin
[   41s] Libraries installed in: /usr/lib64/ghc-8.0.2/tldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I
[   41s] Dynamic libraries installed in:
[   41s] /usr/lib64/ghc-8.0.2/tldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I
[   41s] Private binaries installed in: /usr/libexec
[   41s] Data files installed in: /usr/share/tldr-0.2.2
[   41s] Documentation installed in: /usr/share/doc/packages/ghc-tldr
[   41s] Configuration files installed in: /usr/etc
[   41s] No alex found
[   41s] Using ar found on system at: /usr/bin/ar
[   41s] No c2hs found
[   41s] No cpphs found
[   41s] Using gcc version 7 found on system at: /usr/bin/gcc
[   41s] Using ghc version 8.0.2 found on system at: /usr/bin/ghc
[   41s] Using ghc-pkg version 8.0.2 found on system at: /usr/bin/ghc-pkg
[   41s] No ghcjs found
[   41s] No ghcjs-pkg found
[   41s] No greencard found
[   41s] Using haddock version 2.17.3 found on system at: /usr/bin/haddock
[   41s] No happy found
[   41s] Using haskell-suite found on system at: haskell-suite-dummy-location
[   41s] Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
[   41s] No hmake found
[   41s] Using hpc version 0.67 found on system at: /usr/bin/hpc
[   41s] Using hsc2hs version 0.68.1 found on system at: /usr/bin/hsc2hs
[   41s] No hscolour found
[   41s] No jhc found
[   41s] Using ld found on system at: /usr/bin/ld
[   41s] No lhc found
[   41s] No lhc-pkg found
[   41s] Using pkg-config version 0.29.2 found on system at: /usr/bin/pkg-config
[   41s] Using strip version 2.28 found on system at: /usr/bin/strip
[   41s] Using tar found on system at: /usr/bin/tar
[   41s] No uhc found
[   41s] + '[' -x Setup ']'
[   41s] + LANG=en_US.utf8
[   41s] + ./Setup build -v
[   41s] Component build order: library, executable 'tldr'
[   41s] creating dist/build
[   41s] creating dist/build/autogen
[   41s] Building tldr-0.2.2...
[   41s] /usr/bin/ghc-pkg init dist/package.conf.inplace
[   41s] Preprocessing library tldr-0.2.2...
[   41s] Building library...
[   41s] creating dist/build
[   41s] /usr/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id tldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id ansi-terminal-0.6.3.1-3RTqikoQf47ajVD9m8zgB -package-id base-4.9.1.0 -package-id bytestring-0.10.8.1 -package-id cmark-0.5.5.1-5UZcPF5As5rBDyqxgPDqMm -package-id text-1.2.2.2-1cn50juu89QSL9QkUVcRY -XHaskell2010 Tldr
[   41s] [1 of 1] Compiling Tldr             ( src/Tldr.hs, dist/build/Tldr.o )
[   41s] /usr/bin/ghc --make -fbuilding-cabal-package -O -prof -fprof-auto-exported -osuf p_o -hisuf p_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id tldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id ansi-terminal-0.6.3.1-3RTqikoQf47ajVD9m8zgB -package-id base-4.9.1.0 -package-id bytestring-0.10.8.1 -package-id cmark-0.5.5.1-5UZcPF5As5rBDyqxgPDqMm -package-id text-1.2.2.2-1cn50juu89QSL9QkUVcRY -XHaskell2010 Tldr
[   41s] [1 of 1] Compiling Tldr             ( src/Tldr.hs, dist/build/Tldr.p_o )
[   42s] Linking...
[   42s] [(SimpleUnitId (ComponentId
[   42s] "ansi-terminal-0.6.3.1-3RTqikoQf47ajVD9m8zgB"),PackageIdentifier {pkgName =
[   42s] PackageName {unPackageName = "ansi-terminal"}, pkgVersion = Version
[   42s] {versionBranch = [0,6,3,1], versionTags = []}},ModuleRenaming True
[   42s] []),(SimpleUnitId (ComponentId "base-4.9.1.0"),PackageIdentifier {pkgName =
[   42s] PackageName {unPackageName = "base"}, pkgVersion = Version {versionBranch =
[   42s] [4,9,1,0], versionTags = []}},ModuleRenaming True []),(SimpleUnitId
[   42s] (ComponentId "bytestring-0.10.8.1"),PackageIdentifier {pkgName = PackageName
[   42s] {unPackageName = "bytestring"}, pkgVersion = Version {versionBranch =
[   42s] [0,10,8,1], versionTags = []}},ModuleRenaming True []),(SimpleUnitId
[   42s] (ComponentId "cmark-0.5.5.1-5UZcPF5As5rBDyqxgPDqMm"),PackageIdentifier
[   42s] {pkgName = PackageName {unPackageName = "cmark"}, pkgVersion = Version
[   42s] {versionBranch = [0,5,5,1], versionTags = []}},ModuleRenaming True
[   42s] []),(SimpleUnitId (ComponentId
[   42s] "text-1.2.2.2-1cn50juu89QSL9QkUVcRY"),PackageIdentifier {pkgName = PackageName
[   42s] {unPackageName = "text"}, pkgVersion = Version {versionBranch = [1,2,2,2],
[   42s] versionTags = []}},ModuleRenaming True [])]
[   42s] /usr/bin/ar -r dist/build/objs-1765/libHStldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I.a dist/build/Tldr.o
[   42s] /usr/bin/ar: creating dist/build/objs-1765/libHStldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I.a
[   42s] /usr/bin/ar -r dist/build/objs-1765/libHStldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I_p.a dist/build/Tldr.p_o
[   42s] /usr/bin/ar: creating dist/build/objs-1765/libHStldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I_p.a
[   42s] /usr/bin/ghc -shared -dynamic '-dynload deploy' -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/ansi-terminal-0.6.3.1-3RTqikoQf47ajVD9m8zgB -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/ansi-wl-pprint-0.6.7.3-A79v826bgPr574HtaZPPqC -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/array-0.5.1.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/async-2.1.1.1-8yywY4inVGRLJSCg60gBXj -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/attoparsec-0.13.1.0-FfnvSlEhYl6E00jFTwLP4F -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/base-4.9.1.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/binary-0.8.3.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/blaze-builder-0.4.0.2-FRwZEt0uqtxKWrLYdFtkGs -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/bytestring-0.10.8.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/cmark-0.5.5.1-5UZcPF5As5rBDyqxgPDqMm -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/conduit-1.2.11-EcgNqUPqc0n5rBCBvH103F -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/conduit-extra-1.1.16-homCeoCcueAsMvTRgNoVq -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/containers-0.5.7.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/control-monad-loop-0.1-6r9jbqzfkGaGEJyznhVvYA -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/deepseq-1.4.2.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/directory-1.3.0.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/exceptions-0.8.3-ADEDRATtUrMK1JW4zMQ9U -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/filepath-1.4.1.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/ghc-boot-th-8.0.2 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/ghc-prim-0.5.0.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/hashable-1.2.6.1-ArdkmQrtdsLPQA60ZQw2E -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/integer-gmp-1.0.0.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/integer-logarithms-1.0.2-92lMiWV9mmYAwfMEYgfQ0D -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/lifted-base-0.2.3.11-GQ8h0b1wJUC11xTxTtHqWV -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/mmorph-1.0.9-5bASEvmIkr5CpdAYXwPsn0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/monad-control-1.0.2.1-CqOqIBYVBjy1GnPfyWnFHC -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/monads-tf-0.1.0.3-JIPNoZ6aJW379YQZJvMYoR -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/network-2.6.3.2-IsLM4TXcLoRI0fmmBYVyQz -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/optparse-applicative-0.13.2.0-EqIYOWOFTvf23sT5QTYn9U -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/pretty-1.1.3.3 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/primitive-0.6.2.0-4578caNkWQ54Gt1mxLF2Yh -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/process-1.4.3.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/random-1.1-9tceXaeYIMZ4JrKq20Egog -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/resourcet-1.1.9-4kJNagEzSAo2Kfakyf6y5E -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/rts -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/scientific-0.3.5.1-29PQkFlSg2MLG0o5mYHr65 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/semigroups-0.18.3-5xL9BgkWQsCGwo6YahyMCM -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/shell-conduit-4.6.1-Be0o6bOx8pfDGrodIc3tjl -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/split-0.2.3.2-CJl40zTyCIV16Pr60nb7CT -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/stm-2.4.4.1-JQn4hNPyYjP5m9AcbI88Ve -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/streaming-commons-0.1.17-H0UlD1YIese4QLvPsCkOiP -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/template-haskell-2.11.1.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/text-1.2.2.2-1cn50juu89QSL9QkUVcRY -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/time-1.6.0.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/transformers-0.5.2.0 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/transformers-base-0.4.4-GKSs0LKukAL8ymq2naFmrH -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/transformers-compat-0.5.1.4-IuFogs8HAVUJBWVNMhtssu -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/unix-2.7.2.1 -optl-Wl,-rpath,/usr/lib64/ghc-8.0.2/zlib-0.6.1.2-7negTfm2ujt1gW4wr40MUp -hide-all-packages -no-auto-link-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id ansi-terminal-0.6.3.1-3RTqikoQf47ajVD9m8zgB -package-id base-4.9.1.0 -package-id bytestring-0.10.8.1 -package-id cmark-0.5.5.1-5UZcPF5As5rBDyqxgPDqMm -package-id text-1.2.2.2-1cn50juu89QSL9QkUVcRY dist/build/Tldr.dyn_o -o dist/build/libHStldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I-ghc8.0.2.so
[   42s] /usr/bin/ghc-pkg update - --global --no-user-package-db '--package-db=dist/package.conf.inplace'
[   42s] Preprocessing executable 'tldr' for tldr-0.2.2...
[   42s] Building executable tldr...
[   42s] creating dist/build/tldr
[   42s] creating dist/build/tldr/tldr-tmp
[   42s] /usr/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/tldr/tldr-tmp -odir dist/build/tldr/tldr-tmp -hidir dist/build/tldr/tldr-tmp -stubdir dist/build/tldr/tldr-tmp -i -idist/build/tldr/tldr-tmp -iapp -idist/build/autogen -Idist/build/autogen -Idist/build/tldr/tldr-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id base-4.9.1.0 -package-id directory-1.3.0.0 -package-id filepath-1.4.1.1 -package-id optparse-applicative-0.13.2.0-EqIYOWOFTvf23sT5QTYn9U -package-id semigroups-0.18.3-5xL9BgkWQsCGwo6YahyMCM -package-id shell-conduit-4.6.1-Be0o6bOx8pfDGrodIc3tjl -package-id tldr-0.2.2-A8enqaJaVUJK8qZ1SvfA9I -XHaskell2010 app/Main.hs -threaded -rtsopts '-with-rtsopts=-N'
[   42s] [1 of 2] Compiling Paths_tldr       ( dist/build/autogen/Paths_tldr.hs, dist/build/tldr/tldr-tmp/Paths_tldr.o )
[   42s] [2 of 2] Compiling Main             ( app/Main.hs, dist/build/tldr/tldr-tmp/Main.o )
[   43s] 
[   43s] app/Main.hs:48:12: error:
[   43s]     Variable not in scope: git :: [Char] -> String -> Segment ()
[   43s] 
[   43s] app/Main.hs:56:8: error:
[   43s]     Variable not in scope: git :: [Char] -> [[Char]] -> Segment ()
[   43s] error: Bad exit status from /var/tmp/rpm-tmp.ukxdez (%build)
psibi commented 7 years ago

@peti tldr assumes the executable git present in it's path. It internally uses shell-conduit which has the TH magic to bring all the executable in $PATH as functions.

I will try to see if I can give a proper error message if no executable is found.

peti commented 7 years ago

I added git to $PATH for the build, but that makes no difference: the error message is the same.

Generally speaking, you should probably declare required build-tools in the Cabal file, which has an attribute for precisely that purpose.

psibi commented 7 years ago

@peti I don't know about build-tools and will look into it, thanks. My guess is: You may need to recompile shell-conduit package again to make it work.

I usually do stack clean for the project and then bringing git under $PATH makes it work. Not sure how it is the case with Nix.

psibi commented 6 years ago

I'm closing the issue as tldr seems to be building fine in the latest nix: https://hydra.nixos.org/build/67409580