Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text package error #1118

Closed
Pitometsu opened this issue Oct 6, 2015 · 11 comments
Closed

text package error #1118

Pitometsu opened this issue Oct 6, 2015 · 11 comments

Comments

@Pitometsu
Copy link
Contributor

netsu@hackbook> stack build                                                                ~/.zsh/antigen-hs
text-1.2.1.3: configure
Progress: 1/2
--  While building package text-1.2.1.3 using:
      /home/netsu/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/pkgdb/ --libdir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/lib --bindir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/bin --datadir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/share --libexecdir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/libexec --sysconfdir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/etc --docdir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/doc/text-1.2.1.3 --htmldir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/doc/text-1.2.1.3 --haddockdir=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/doc/text-1.2.1.3 --dependency=array=array-0.5.1.0-d4206b835b96b5079d918fa1eab1a9a8 --dependency=base=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 --dependency=binary=binary-0.7.5.0-9886302600ea2a5c81263c1f5cc84866 --dependency=bytestring=bytestring-0.10.6.0-18c05887c1aaac7adb3350f6a4c6c8ed --dependency=deepseq=deepseq-1.4.1.1-8fb9688ae42216e388cee132aef3d148 --dependency=ghc-prim=ghc-prim-0.4.0.0-af16264bc80979d06e37ac63e3ba9a21 --dependency=integer-gmp=integer-gmp-1.0.0.0-8e0f14d0262184533b417ca1f8b44482 -f-integer-simple
    Process exited with code: ExitFailure 127
    Logs have been written to: /home/netsu/.zsh/antigen-hs/.stack-work/logs/text-1.2.1.3.log

    /home/netsu/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory

This sources.

@snoyberg
Copy link
Contributor

snoyberg commented Oct 7, 2015

@snoyberg snoyberg closed this as completed Oct 7, 2015
@Pitometsu
Copy link
Contributor Author

Thank you for references, but still not working even with empty project:

$ stack new tintackle
Downloading template "new-template" to create project "tintackle" in tintackle/ ...
Writing default config file to: /home/netsu/Projects/tintackle/tintackle/stack.yaml
Basing on cabal files:
- /home/netsu/Projects/tintackle/tintackle/tintackle.cabal

Checking against build plan lts-3.4
Selected resolver: lts-3.4
Wrote project config to: /home/netsu/Projects/tintackle/tintackle/stack.yaml
$ cat tintackle/stack.yaml
# For more information, see: https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-3.4

# Local packages, usually specified by relative directory name
packages:
- '.'

# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps: []

# Override default flag values for local packages and extra-deps
flags: {}

# Control whether we use the GHC we find on the path
# system-ghc: true

# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 0.1.4.0

# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64

# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
$ cabal2nix ./ --shell > shell.nix
$ cat shell.nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:

let

  inherit (nixpkgs) pkgs;

  f = { mkDerivation, base, stdenv }:
      mkDerivation {
        pname = "tintackle";
        version = "0.1.0.0";
        src = ./.;
        isLibrary = true;
        isExecutable = true;
        libraryHaskellDepends = [ base ];
        executableHaskellDepends = [ base ];
        testHaskellDepends = [ base ];
        homepage = "http://github.com/Pitometsu/tintackle#readme";
        description = "Initial project template from stack";
        license = stdenv.lib.licenses.bsd3;
      };

  haskellPackages = if compiler == "default"
                       then pkgs.haskellPackages
                       else pkgs.haskell.packages.${compiler};

  drv = haskellPackages.callPackage f {};

in

  if pkgs.lib.inNixShell then drv.env else drv
$ nix-shell -I ~ --command 'stack build'
these paths will be fetched (0.25 MiB download, 1.63 MiB unpacked):
  /nix/store/qfbsrh5gv7p1pjrsylcksb288hry4kbg-bash-4.3-p42-doc
fetching path ‘/nix/store/qfbsrh5gv7p1pjrsylcksb288hry4kbg-bash-4.3-p42-doc’...

*** Downloading ‘https://cache.nixos.org/nar/024pc2ir4xg0kd2ikv1wpwyzz14bfp4cqr30qfdlzq89zs9c5vjb.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/qfbsrh5gv7p1pjrsylcksb288hry4kbg-bash-4.3-p42-doc’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  255k  100  255k    0     0  59542      0  0:00:04  0:00:04 --:--:-- 62407

removed ‘/run/user/1000/nix-shell.szkJIb/rc’
removed ‘/run/user/1000/nix-shell.szkJIb/derivation’
removed directory: ‘/run/user/1000/nix-shell.szkJIb’
tintackle-0.1.0.0: configure
/home/netsu/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory

--  While building package tintackle-0.1.0.0 using:
      /home/netsu/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-linux-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/home/netsu/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/pkgdb/ --package-db=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/pkgdb/ --libdir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/lib --bindir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/bin --datadir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/share --libexecdir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/libexec --sysconfdir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/etc --docdir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/doc/tintackle-0.1.0.0 --htmldir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/doc/tintackle-0.1.0.0 --haddockdir=/home/netsu/Projects/tintackle/tintackle/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/doc/tintackle-0.1.0.0 --dependency=base=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 --enable-tests --enable-benchmarks
    Process exited with code: ExitFailure 127
$

@peti
Copy link
Contributor

peti commented Oct 9, 2015

@snoyberg, with regard to the posting on the Google groups list: the Nixpkgs user manual also addresses this issue at http://nixos.org/nixpkgs/manual/#using-stack-together-with-nix.

@snoyberg
Copy link
Contributor

That's a great reference, thanks @peti! I've added it to the NixOS section of the install page.

snoyberg added a commit that referenced this issue Oct 10, 2015
@Pitometsu
Copy link
Contributor Author

Issue fixed, thanks.
@snoyberg could you add this reference to How to install also, please?
Thanks a lot.

@snoyberg
Copy link
Contributor

That reference just links to the page I already updated.

On Sun, Oct 11, 2015 at 11:50 AM, Netsu notifications@github.com wrote:

Issue fixed, thanks.
@snoyberg https://github.com/snoyberg could you add this reference to How
to install https://github.com/commercialhaskell/stack#how-to-install
also, please?


Reply to this email directly or view it on GitHub
#1118 (comment)
.

@Pitometsu
Copy link
Contributor Author

@snoyberg there no NixOS in list.

@snoyberg
Copy link
Contributor

Feel free to send a PR to add that link

@Pitometsu
Copy link
Contributor Author

Ok, here you are.

dysinger added a commit that referenced this issue Nov 13, 2015
* master: (59 commits)
  Ignore global database when copying precompiled packages #1146
  Revert an unneeded change to 'runAndLog'
  Remove old GHCJS unpack directory if it exists
  Allow "stack setup ghcjs-0.1.0.20150924_ghc-7.10.2"
  Properly unzip GHCJS on windows (stack setup)
  Consider user-specified package flags in stack solver #1071
  Fix a warning
  Colored build status in filewatch mode
  Add NixOS to 'How to install'.
  Include NixOS information #1118
  Style improvements for Docker compatibility check
  Fix `awaiting pr` label link
  Fix GHC 7.8 build
  Docker: check host's stack compatibility by attempting to run in container and caching the result (#974)
  Fix formatting in `explicit-setup-deps` section
  Provide more information about changed files
  Compile custom Setup.hs instead of interpreting them (fixes #1041)
  Detect when hpc report gives trivial 100% #1009
  Unified coverage report #579
  Recommend extra-dep in yaml_configuration.yml
  ...
@domenkozar
Copy link
Contributor

I think this should be reopened. libgmp is core to GHC and the fact that stack compiles a binary that doesn't work is essential:

$ ldd /home/ielectric/.stack/setup-exe-cache/x86_64-linux-nix/setup-Simple-Cabal-1.24.0.0-ghc-8.0.1
        linux-vdso.so.1 (0x00007fffb63df000)
        librt.so.1 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/librt.so.1 (0x00007f0375647000)
        libutil.so.1 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/libutil.so.1 (0x00007f0375444000)
        libdl.so.2 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/libdl.so.2 (0x00007f0375240000)
        libgmp.so.10 => not found
        libm.so.6 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/libm.so.6 (0x00007f0374f3b000)
        libc.so.6 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/libc.so.6 (0x00007f0374b9d000)
        libpthread.so.0 => /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/libpthread.so.0 (0x00007f0374980000)
        /nix/store/jm1n87rp8vr90j9ahcrfzr57nc2r8vgf-glibc-2.24/lib/ld-linux-x86-64.so.2 (0x00007f037584f000)

@domenkozar
Copy link
Contributor

#2944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants