You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of this, running stack setup fails at sanity check phase
Steps to reproduce
For example:
Remove directory ~/.stack
Run stack setup.
Expected
It should succeed without any errors.
Actual
Here's the error log:
$ stack setup -v
Version 1.2.0, Git revision 241cd07d576d9c0c0e712e83d947e3dd64541c42 (4054 commits) x86_64 hpack-0.14.0
2016-10-15 20:42:45.656465: [debug] Checking for project config at: /data/work/cse131/cse131-solutions/03-cobra/stack.yaml
@(Stack/Config.hs:792:9)
2016-10-15 20:42:45.656723: [debug] Loading project config file stack.yaml
@(Stack/Config.hs:810:13)
2016-10-15 20:42:45.661125: [debug] Trying to decode /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache
@(Data/Store/VersionTagged.hs:68:5)
2016-10-15 20:42:45.661293: [debug] Exception ignored when attempting to load /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache: /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-10-15 20:42:45.661396: [debug] Failure decoding /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache
@(Data/Store/VersionTagged.hs:75:13)
2016-10-15 20:42:45.661490: [debug] Decoding build plan from: /home/rami/.stack/build-plan/lts-6.10.yaml
@(Stack/BuildPlan.hs:499:5)
2016-10-15 20:42:45.661584: [debug] Decoding build plan from file failed: OtherParseException /home/rami/.stack/build-plan/lts-6.10.yaml: openFile: does not exist (No such file or directory)
@(Stack/BuildPlan.hs:504:13)
2016-10-15 20:42:45.661888: [debug] Downloading build plan from: https://raw.githubusercontent.com/fpco/lts-haskell/master//lts-6.10.yaml
@(Stack/BuildPlan.hs:509:13)
2016-10-15 20:42:45.662012: [debug] Downloading /fpco/lts-haskell/master//lts-6.10.yaml
@(Network/HTTP/Download.hs:95:5)
Downloaded lts-6.10 build plan.
2016-10-15 20:42:47.875149: [debug] Trying to decode /home/rami/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:68:5)
2016-10-15 20:42:47.875322: [debug] Exception ignored when attempting to load /home/rami/.stack/indices/Hackage/00-index.cache: /home/rami/.stack/indices/Hackage/00-index.cache: openBinaryFile: does not exist (No such file or directory)
@(Data/Store/VersionTagged.hs:86:9)
2016-10-15 20:42:47.875410: [debug] Failure decoding /home/rami/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:75:13)
2016-10-15 20:42:47.875953: [debug] Run process: /usr/bin/git clone https://github.com/commercialhaskell/all-cabal-hashes.git all-cabal-hashes/ -b display
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:45.033961: [debug] Process finished in 57157 ms: /usr/bin/git clone https://github.com/commercialhaskell/all-cabal-hashes.git all-cabal-hashes/ -b display
@(System/Process/Read.hs:277:3)
Updating package index Hackage (mirrored at https://github.com/commercialhaskell/all-cabal-hashes.gi 2016-10-15 20:43:45.034221: [debug] Creating process: /usr/bin/git fetch --tags
@(System/Process/Run.hs:103:5)
Fetched package index.
2016-10-15 20:43:45.639135: [debug] Run process: /bin/sh -c "git get-tar-commit-id < /home/rami/.stack/indices/Hackage/00-index.tar"
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:45.641298: [debug] Run process: /usr/bin/git rev-parse current-hackage^{}
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:45.644941: [debug] Process finished in 3 ms: /usr/bin/git rev-parse current-hackage^{}
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:45.645262: [debug] Could not delete cache: /home/rami/.stack/indices/Hackage/00-index.cache: removeLink: does not exist (No such file or directory)
@(Stack/PackageIndex.hs:358:19)
2016-10-15 20:43:45.645471: [debug] Exporting a tarball to /home/rami/.stack/indices/Hackage/00-index.tar
@(Stack/PackageIndex.hs:302:10)
2016-10-15 20:43:45.645710: [debug] Run process: /usr/bin/git archive --format=tar -o /home/rami/.stack/indices/Hackage/00-index.tar.tmp current-hackage
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:48.965397: [debug] Process finished in 3319 ms: /usr/bin/git archive --format=tar -o /home/rami/.stack/indices/Hackage/00-index.tar.tmp current-hackage
@(System/Process/Read.hs:277:3)
Populated index cache.
2016-10-15 20:43:52.951364: [debug] Encoding /home/rami/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:51:5)
2016-10-15 20:43:53.008372: [debug] Finished writing /home/rami/.stack/indices/Hackage/00-index.cache
@(Data/Store/VersionTagged.hs:55:5)
2016-10-15 20:43:56.741039: [debug] Encoding /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache
@(Data/Store/VersionTagged.hs:51:5)
2016-10-15 20:43:56.834503: [debug] Finished writing /home/rami/.stack/build-plan-cache/x86_64-linux/lts-6.10.cache
@(Data/Store/VersionTagged.hs:55:5)
2016-10-15 20:43:56.834952: [debug] Getting system compiler version
@(Stack/Setup.hs:354:17)
2016-10-15 20:43:56.835183: [debug] Run process: /sbin/ldconfig -p
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:56.837033: [debug] Process finished in 1 ms: /sbin/ldconfig -p
@(System/Process/Read.hs:277:3)
2016-10-15 20:43:56.837218: [debug] Found shared library libtinfo.so.5 in 'ldconfig -p' output
@(Stack/Setup.hs:505:25)
2016-10-15 20:43:56.837608: [debug] Did not find shared library libtinfo.so.6
@(Stack/Setup.hs:517:34)
2016-10-15 20:43:56.837694: [debug] Did not find shared library libncursesw.so.6
@(Stack/Setup.hs:517:34)
2016-10-15 20:43:56.837762: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
@(Stack/Setup.hs:505:25)
2016-10-15 20:43:56.837843: [debug] Did not find shared library libgmp.so.3
@(Stack/Setup.hs:517:34)
2016-10-15 20:43:56.837895: [debug] Using standard GHC build
@(Stack/Setup.hs:535:9)
2016-10-15 20:43:57.112488: [info] Preparing to install GHC to an isolated location.
@(Stack/Setup.hs:784:5)
2016-10-15 20:43:57.112701: [info] This will not interfere with any system-level installation.
@(Stack/Setup.hs:793:5)
2016-10-15 20:43:57.113162: [debug] Downloading from https://github.com/commercialhaskell/ghc/releases/download/ghc-7.10.3-release/ghc-7.10.3b-x86_64-deb7-linux.tar.xz to /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.tar.xz ...
@(Stack/Setup.hs:1359:5)
2016-10-15 20:43:57.113270: [debug] Will check against sha1 hash: dbee82a232536f50f5211664f152b2bf36006ac4
@(Stack/Setup.hs:1369:13)
2016-10-15 20:43:57.113353: [debug] Downloading /commercialhaskell/ghc/releases/download/ghc-7.10.3-release/ghc-7.10.3b-x86_64-deb7-linux.tar.xz
@(Network/HTTP/Download/Verified.hs:233:9)
Downloaded ghc-7.10.3.
2016-10-15 20:44:14.565842: [debug] menv = fromList [("BROWSER","google-chrome"),("CLUTTER_BACKEND","x11"),("CLUTTER_IM_MODULE",""),("COLORTERM","xfce4-terminal"),("DBUS_SESSION_BUS_ADDRESS","unix:path=/run/user/1000/bus"),("DEFAULTS_PATH","/usr/share/gconf/xubuntu.default.path"),("DESKTOP_SESSION","xubuntu"),("DISPLAY",":0.0"),("EDITOR","nvim"),("FZF_DEFAULT_COMMAND","find -L * .*(.N) .*(@N) -path '*/\\.*/*' -prune -o -type f -print -o -type l -print 2> /dev/null"),("FZF_DEFAULT_OPTS","--extended"),("GDMSESSION","xubuntu"),("GDM_LANG","en_US"),("GLADE_CATALOG_PATH",":"),("GLADE_MODULE_PATH",":"),("GLADE_PIXMAP_PATH",":"),("GOROOT","/home/rami/libs/go"),("GPG_AGENT_INFO","/home/rami/.gnupg/S.gpg-agent:0:1"),("GTK_IM_MODULE",""),("GTK_OVERLAY_SCROLLING","0"),("GUI_EDITOR","emacs"),("HOME","/home/rami"),("IM_CONFIG_PHASE","1"),("INSTANCE",""),("JOB","dbus"),("LANG","en_US.UTF-8"),("LANGUAGE","en_US"),("LC_CTYPE","en_US.UTF-8"),("LD_LIBRARY_PATH",":/home/rami/.local/lib:/home/rami/libs/z3/build"),("LESS","-R"),("LOGNAME","rami"),("LSCOLORS","Gxfxcxdxbxegedabagacad"),("LS_COLORS","rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"),("MANDATORY_PATH","/usr/share/gconf/xubuntu.mandatory.path"),("MANPATH",":/home/rami/.fzf/man"),("NCURSES_NO_UTF8_ACS","1"),("OLDPWD","/data/work/cse131/cse131-solutions/03-cobra"),("PAGER","less"),("PATH","/home/rami/.rbenv/bin:/home/rami/bin:/home/rami/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rami/.local/bin:/home/rami/scripts:/home/rami/libs/node/bin:/data/Mathematica/10.4/bin:/usr/local/sicstus4.3.3/bin:/home/rami/apps/node/bin:/home/rami/libs/go/bin:/home/rami/.fzf/bin"),("PKG_CONFIG_PATH",":/home/rami/.local/lib/pkgconfig"),("PROMPT","\n%{$fg_bold[blue]%}[%T]%{$reset_color%} \\\n%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)\\\n%{$fg_bold[red]%}%(?.. [%?])%{$reset_color%}\n$ "),("PWD","/data/work/cse131/cse131-solutions/03-cobra"),("PYTHONPATH",":/home/rami/libs/z3/build"),("QT4_IM_MODULE",""),("QT_ACCESSIBILITY","1"),("QT_IM_MODULE",""),("QT_LINUX_ACCESSIBILITY_ALWAYS_ON","1"),("QT_STYLE_OVERRIDE","gtk"),("SESSION","xubuntu"),("SESSIONTYPE",""),("SESSION_MANAGER","local/rami-900X4C:@/tmp/.ICE-unix/1280,unix/rami-900X4C:/tmp/.ICE-unix/1280"),("SHELL","/usr/bin/zsh"),("SHLVL","1"),("SSH_AUTH_SOCK","/run/user/1000/keyring/ssh"),("TERM","xterm"),("UPSTART_EVENTS","started xsession"),("UPSTART_INSTANCE",""),("UPSTART_JOB","startxfce4"),("UPSTART_SESSION","unix:abstract=/com/ubuntu/upstart-session/1000/1087"),("USER","rami"),("WINDOWID","75500986"),("XAUTHORITY","/home/rami/.Xauthority"),("XDG_CONFIG_DIRS","/etc/xdg/xdg-xubuntu:/usr/share/upstart/xdg:/etc/xdg:/etc/xdg"),("XDG_CURRENT_DESKTOP","XFCE"),("XDG_DATA_DIRS","/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/usr/share"),("XDG_GREETER_DATA_DIR","/var/lib/lightdm-data/rami"),("XDG_MENU_PREFIX","xfce-"),("XDG_RUNTIME_DIR","/run/user/1000"),("XDG_SEAT","seat0"),("XDG_SEAT_PATH","/org/freedesktop/DisplayManager/Seat0"),("XDG_SESSION_DESKTOP","xubuntu"),("XDG_SESSION_ID","c2"),("XDG_SESSION_PATH","/org/freedesktop/DisplayManager/Session0"),("XDG_SESSION_TYPE","x11"),("XDG_VTNR","7"),("XMODIFIERS",""),("ZSH","/home/rami/.oh-my-zsh"),("_","/home/rami/.local/bin/stack")]
@(Stack/Setup.hs:912:5)
2016-10-15 20:44:14.566591: [debug] ziptool: xz
@(Stack/Setup.hs:930:5)
2016-10-15 20:44:14.566648: [debug] make: make
@(Stack/Setup.hs:931:5)
2016-10-15 20:44:14.566724: [debug] tar: tar
@(Stack/Setup.hs:932:5)
2016-10-15 20:44:14.566847: [debug] Unpacking /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.tar.xz
@(Stack/Setup.hs:958:5)
2016-10-15 20:44:14.567016: [debug] Run process: /bin/tar Jxf /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.tar.xz
@(System/Process/Read.hs:277:3)
2016-10-15 20:44:25.329282: [debug] Process finished in 10762 ms: /bin/tar Jxf /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.tar.xz
@(System/Process/Read.hs:277:3)
2016-10-15 20:44:25.329705: [debug] Run process: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/configure --prefix=/home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/
@(System/Process/Read.hs:277:3)
2016-10-15 20:44:26.553506: [debug] Process finished in 1223 ms: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3.temp/ghc-7.10.3/configure --prefix=/home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/
@(System/Process/Read.hs:277:3)
2016-10-15 20:44:26.553806: [debug] Run process: /usr/bin/make install
@(System/Process/Read.hs:277:3)
2016-10-15 20:44:37.993698: [debug] Process finished in 11439 ms: /usr/bin/make install
@(System/Process/Read.hs:277:3)
Installed GHC.
2016-10-15 20:44:37.993877: [debug] GHC installed to /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/
@(Stack/Setup.hs:968:5)
2016-10-15 20:44:38.319103: [debug] Performing a sanity check on: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc
@(Stack/Setup.hs:1481:5)
2016-10-15 20:44:38.319268: [debug] Run process: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc /tmp/stack-sanity-check17208/Main.hs -no-user-package-db
@(System/Process/Read.hs:277:3)
The GHC located at /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc failed to compile a sanity check. Please see:
http://docs.haskellstack.org/en/stable/install_and_upgrade/
for more information. Exception was:
Running /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc /tmp/stack-sanity-check17208/Main.hs -no-user-package-db in directory /tmp/stack-sanity-check17208/ exited with ExitFailure 1
[1 of 1] Compiling Main ( /tmp/stack-sanity-check17208/Main.hs, /tmp/stack-sanity-check17208/Main.o )
Linking /tmp/stack-sanity-check17208/Main ...
/usr/bin/ld: /tmp/stack-sanity-check17208/Main.o: relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Base__125.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Base__116.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Base__115.o): relocation R_X86_64_32S against symbol `base_GHCziException_SomeException_con_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Signal__13.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Exception__170.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Exception__171.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Exception__159.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Exception__120.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Exception__111.o): relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/rami/.stack/programs/x86_64-linux/ghc-7.10.3/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(Pack__5.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
...
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
General summary/comments (optional)
Ubuntu 16.10 uses GCC hardening by default:
https://wiki.ubuntu.com/SecurityTeam/PIE
Because of this, running
stack setup
fails at sanity check phaseSteps to reproduce
For example:
~/.stack
stack setup
.Expected
It should succeed without any errors.
Actual
Here's the error log:
Stack version
Method of installation
Official binary, installed by running
curl -sSL https://get.haskellstack.org/ | sh
The text was updated successfully, but these errors were encountered: