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

Cannot install Shake on Linux Mint: "permission denied" when building clock-0.8.3 #833

Open
alexeymuranov opened this issue Jan 1, 2023 · 3 comments

Comments

@alexeymuranov
Copy link

alexeymuranov commented Jan 1, 2023

I tried to follow the official instructions: installed Haskell Stack using GHCup and ran

$ stack install shake

I've got:

Writing implicit global project config file to: /home/alexey/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-20.5
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-9.2.5.                                      
Unpacking GHC into /home/alexey/.stack/programs/x86_64-linux/ghc-tinfo6-9.2.5.te                                                                                Installed GHC.     
[1 of 2] Compiling Main             ( /home/alexey/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/alexey/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim   ( /home/alexey/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/alexey/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /home/alexey/.stack/setup-exe-cache/x86_64-linux-tinfo6/tmp-Cabal-simple_mPHDZzAJ_3.6.3.0_ghc-9.2.5 ...
clock               > configure
clock               > Configuring clock-0.8.3...
clock               > build
hashable            > configure
clock               > Preprocessing library for clock-0.8.3..
clock               > hsc2hs: .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0/build/System/Clock_hsc_make: createProcess: posix_spawnp: permission denied (Permission denied)
hashable            > Configuring hashable-1.4.1.0...
hashable            > build               
heaps               > configure           
hashable            > Preprocessing library for hashable-1.4.1.0..
hashable            > Building library for hashable-1.4.1.0..
hashable            > [1 of 7] Compiling Data.Hashable.Imports
hashable            > [2 of 7] Compiling Data.Hashable.LowLevel
heaps               > Configuring heaps-0.4...
heaps               > build               
js-dgtable          > configure           
js-dgtable          > Warning: js-dgtable.cabal:1:28: Packages with 'cabal-version: 1.12' or later
js-dgtable          > should specify a specific version of the Cabal spec of the form
js-dgtable          > 'cabal-version: x.y'. Use 'cabal-version: 1.18'.
heaps               > Preprocessing library for heaps-0.4..
heaps               > Building library for heaps-0.4..
hashable            > [3 of 7] Compiling Data.Hashable.Class
heaps               > [1 of 1] Compiling Data.Heap
js-dgtable          > Configuring js-dgtable-0.5.2...
js-dgtable          > build               
heaps               >                     
heaps               > /tmp/stack-1504080d24b55cc4/heaps-0.4/src/Data/Heap.hs:377:5: warning: [-Wincomplete-uni-patterns]
heaps               >     Pattern match(es) are non-exhaustive
heaps               >     In a pattern binding:
heaps               >         Patterns of type ‘(Forest a, Forest a)’ not matched:
heaps               >             ((_ Cons _), Nil)
heaps               >             (Nil, Nil)
heaps               >     |               
heaps               > 377 |     (left, Node r' a' as' `Cons` right) = minZ leq as
heaps               >     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
js-dgtable          > Preprocessing library for js-dgtable-0.5.2..
js-dgtable          > Building library for js-dgtable-0.5.2..
js-dgtable          > [1 of 2] Compiling Paths_js_dgtable
js-dgtable          > [2 of 2] Compiling Language.Javascript.DGTable
js-dgtable          > copy/register       
js-dgtable          > Installing library in /home/alexey/.stack/snapshots/x86_64-linux-tinfo6/786073484a56239bc9f1a2cab4d54c6014acd82f607094306bfaca32890c5033/9.2.5/lib/x86_64-linux-ghc-9.2.5/js-dgtable-0.5.2-9QcYNIrannTBnclkJddG4d
js-dgtable          > Registering library for js-dgtable-0.5.2..
hashable            > [4 of 7] Compiling Data.Hashable.Lifted
hashable            > [5 of 7] Compiling Data.Hashable.Generic.Instances
hashable            >         
hashable            > /tmp/stack-1504080d24b55cc4/hashable-1.4.1.0/src/Data/Hashable/Generic/Instances.hs:5:14: warning: [-Wtrustworthy-safe]
hashable            >     ‘Data.Hashable.Generic.Instances’ is marked as Trustworthy but has been inferred as safe!
hashable            >   |     
hashable            > 5 | {-# LANGUAGE Trustworthy #-}
hashable            >   |              ^^^^^^^^^^^
hashable            > [6 of 7] Compiling Data.Hashable.Generic
hashable            > [7 of 7] Compiling Data.Hashable
hashable            > copy/register
hashable            > Installing library in /home/alexey/.stack/snapshots/x86_64-linux-tinfo6/786073484a56239bc9f1a2cab4d54c6014acd82f607094306bfaca32890c5033/9.2.5/lib/x86_64-linux-ghc-9.2.5/hashable-1.4.1.0-4i79aOgyDbOCCPiYvoBLFh
hashable            > Registering library for hashable-1.4.1.0..
heaps               > copy/register
heaps               > Installing library in /home/alexey/.stack/snapshots/x86_64-linux-tinfo6/786073484a56239bc9f1a2cab4d54c6014acd82f607094306bfaca32890c5033/9.2.5/lib/x86_64-linux-ghc-9.2.5/heaps-0.4-J5nVwdmAeD25PK8wgPMkwt
heaps               > Registering library for heaps-0.4..
Progress 4/14       

--  While building package clock-0.8.3 (scroll up to its section to see the error) using:
      /home/alexey/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.6.3.0_ghc-9.2.5 --verbose=1 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

Googling around did not help.

Removing ~/.cabal, ~/.stack, and ~/.ghcup and trying again from scratch did not help either.

@alexeymuranov alexeymuranov changed the title Cannot install Shake on Linux Mint, "permission denied" when building clock-0.8.3 Cannot install Shake on Linux Mint: "permission denied" when building clock-0.8.3 Jan 1, 2023
@ndmitchell
Copy link
Owner

Do you have hsc2hs installed? I think it comes with ghc, and should be automatically invoked with stack, but above I see:

clock > hsc2hs: .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.6.3.0/build/System/Clock_hsc_make: createProcess: posix_spawnp: permission denied (Permission denied)

Any idea what is denying permission? Do you have jails or an antivirus installed?

@alexeymuranov
Copy link
Author

I since reinstalled Stack with sudo apt install haskell-stack, but it didn't help.

Yes, i have hsc2hs:

$ which hsc2hs
/usr/bin/hsc2hs

I do not know what is denying permissions and i never installed any antivirus on Linux.

The problem comes from clock package. I submitted a bug report here: corsis/clock#83.

@ndmitchell
Copy link
Owner

The problem appears when compiling clock, but I actually think it's clock, so much as Stack/Cabal, so that might be the right place to report this.

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

2 participants