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

ghc-cabal uses wrong loader path #3847

Open
ghost opened this issue Feb 5, 2018 · 5 comments
Open

ghc-cabal uses wrong loader path #3847

ghost opened this issue Feb 5, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2018

Steps to reproduce

  1. Install 64bit Gentoo
  2. Set resolver to lts-10.4
  3. call stack build

Expected

Setup the resolver target.

Actual

Build would fail with following error:

utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist: line 3: /home/pk/.stack/programs/x86_64-linux/ghc-ncurses6-nopie-8.2.2.temp/ghc-8.2.2/utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: No such file or directory

Running strace on the ghc-cabal binary gives:

execve("./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal", ["./utils/ghc-cabal/dist-install/b"...], 0x7ffd07a8bcd0 /* 38 vars */) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid()                                = 898
exit_group(1)                           = ?
+++ exited with 1 +++

Calling file on the binary:

utils/ghc-cabal/dist-install/build/tmp/ghc-cabal: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=d7c5b6e1e62eb0e96cbbd27acf6cb6445aff3992, with debug_info, not stripped

I checked if the loader exists in the /lib directory, but it was missing. Creating symlink with /lib64/ loader solved the problem.

Stack version

$ stack --version
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@mgsloan
Copy link
Contributor

mgsloan commented Feb 10, 2018

What project does this repro apply to?

@mgsloan mgsloan added this to the Support milestone Feb 10, 2018
@unode
Copy link

unode commented Feb 11, 2018

Related to #2387?

@ghost
Copy link
Author

ghost commented Feb 25, 2018

Sorry, I disabled notifications through email. I run into this issue while upgrading my raytracer pavolzetor/currypath to newer lts snapshot.

@jpalus
Copy link

jpalus commented Mar 19, 2018

I hit the same issue, is there any way to get binary distribution with interpreter set to /lib64/ld-linux-x86-64.so.2 which I believe is used by most of the world?

@mpilgrem
Copy link
Member

@ghost, @jpalus - I am working through issues, including old ones. Do you know if this is still a problem with current versions of Gentoo, GHC and Stack?

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

No branches or pull requests

4 participants