Open dan010 opened 4 weeks ago
@dan010, I see you are on Linux/x86_64 - what distribution? Also, what snapshot? Is your problem specific to GHC 9.6.5 and hsc2hs-ghc-9.6.5
?
I see https://github.com/haskell-foundation/foundation has been archived since 2023-09-20. Does that mean basement
is no longer maintained?
I see you have raised:
On Ubuntu 22.04.13 (via WSL 2), I could not reproduce a problem building basement
in isolation:
$ stack unpack basement
$ cd basement-0.0.16
$ stack init # Picks lts-22.24 (GHC 9.6.5)
$ stack build
I think my problem is on .stack-work symlinked onto a noexec filesystem since it have a permission denied on error message. But I just don't know how to troubleshoot it or fix it
Describe your Stack setup: what version are you using (stack --version
)? How did you install Stack?
EDIT: Can you build basement
in isolation, like I did in my post above?
Describe your Stack setup: what version are you using (
stack --version
)? How did you install Stack?EDIT: Can you build
basement
in isolation, like I did in my post above?
The version of stack is Version 2.15.7, Git revision f590e0165b5ab92f5f7f87f8aa55852e1972ee25 x86_64 hpa ck-0.36.0
and this is the command that I used to install the stack curl -sSL https://get.haskellstack.org/ | sh
I could not reproduce the problem building rpki-prover
on Ubuntu 22.04.13 (via WSL 2):
$ git clone https://github.com/lolepezy/rpki-prover.git
$ cd rpki-prover
$ cp package-template.yaml package.yaml
$ sudo apt-get install ... # Install missing C libraries
$ stack build
...
rpki-prover > copy/register
Installing library in .../rpki-prover/.stack-work/install/x86_64-linux-tinfo6/29f0bb150080a27478147fb33b836f432c34eac00995111c1e969189e12a621d/9.6.5/lib/x86_64-linux-ghc-9.6.5/rpki-prover-0.9.3-2RYavTphtkE8c7OjKmjC4C
Installing executable rpki-prover in .../rpki-prover/.stack-work/install/x86_64-linux-tinfo6/29f0bb150080a27478147fb33b836f432c34eac00995111c1e969189e12a621d/9.6.5/bin
Registering library for rpki-prover-0.9.3..
Completed 179 action(s).
I think my problem is on .stack-work symlinked onto a noexec filesystem since it have a permission denied on error message.
I don't think noexec filesystems are expected to work.
I could not reproduce the problem building
rpki-prover
on Ubuntu 22.04.13 (via WSL 2):$ git clone https://github.com/lolepezy/rpki-prover.git $ cd rpki-prover $ cp package-template.yaml package.yaml $ sudo apt-get install ... # Install missing C libraries $ stack build ... rpki-prover > copy/register Installing library in .../rpki-prover/.stack-work/install/x86_64-linux-tinfo6/29f0bb150080a27478147fb33b836f432c34eac00995111c1e969189e12a621d/9.6.5/lib/x86_64-linux-ghc-9.6.5/rpki-prover-0.9.3-2RYavTphtkE8c7OjKmjC4C Installing executable rpki-prover in .../rpki-prover/.stack-work/install/x86_64-linux-tinfo6/29f0bb150080a27478147fb33b836f432c34eac00995111c1e969189e12a621d/9.6.5/bin Registering library for rpki-prover-0.9.3.. Completed 179 action(s).
I am using a rhel 9 not ubuntu.
@dan010, I don't have access to Red Hat Enterprise Linux 9, but it seems to me unlikely that it cannot do what Ubuntu 22.04.13 can do.
On the subject a 'no-exec' filesystem, your original problem appears to be with the hsc2hs-ghc-9.6.5
executable. That executable is located in the same directory as GHC itself (see stack path --compiler-bin
for its location). What is does is create a C program that gets automatically compiled and run. That program outputs Haskell code. See: https://downloads.haskell.org/ghc/9.6.5/docs/users_guide/utils.html#writing-haskell-interfaces-to-c-code-hsc2hs
I assume that happens in the Cabal library's dist
directory (see stack path --dist-dir
for its location). If that location is somewhere where an executable file is forbidden to execute, then it is not surprising that your build is failing. The solution is to move the Haskell project to a location where executables can execute.
@dan010, I don't have access to Red Hat Enterprise Linux 9, but it seems to me unlikely that it cannot do what Ubuntu 22.04.13 can do.
On the subject a 'no-exec' filesystem, your original problem appears to be with the
hsc2hs-ghc-9.6.5
executable. That executable is located in the same directory as GHC itself (seestack path --compiler-bin
for its location). What is does is create a C program that gets automatically compiled and run. That program outputs Haskell code. See: https://downloads.haskell.org/ghc/9.6.5/docs/users_guide/utils.html#writing-haskell-interfaces-to-c-code-hsc2hsI assume that happens in the Cabal library's
dist
directory (seestack path --dist-dir
for its location). If that location is somewhere where an executable file is forbidden to execute, then it is not surprising that your build is failing. The solution is to move the Haskell project to a location where executables can execute.
Here is the output of stack path --dist-dir Warning: Warning (added by new or init): Some packages were found to be incompatible with the resolver and have been left commented out in the packages section. You can omit this message by removing it from stack.yaml .stack-work/dist/x86_64-linux-tinfo6/ghc-9.4.8
when I tried to access this path .stack-work/dist/x86_64-linux-tinfo6/ghc-9.4.8 it return no such file or directory
@dan010, that output is odd on two counts:
user-message:
key has been added to the project-level configuration file (stack.yaml
), but that key is absent from the file that is included with the project https://github.com/lolepezy/rpki-prover/blob/master/stack.yaml; andI suggest you start from scratch:
~/.stack
, stack path --stack-root
will confirm where)which stack
) and reinstall Stackrpki-prover
project directory and re-clone it (somewhere where executables have permission to execute) - follow the same steps as those I set out above.@dan010, that output is odd on two counts:
- the first message is because a
user-message:
key has been added to the project-level configuration file (stack.yaml
), but that key is absent from the file that is included with the project https://github.com/lolepezy/rpki-prover/blob/master/stack.yaml; and- GHC 9.4.8 is specified by the LTS 21.22 to 21.25 snapshots, but that is not the snapshot/resolver specified by that project.
I suggest you start from scratch:
- delete the Stack root (likely
~/.stack
,stack path --stack-root
will confirm where)- perhaps, also delete the Stack executable (at
which stack
) and reinstall Stack- delete the
rpki-prover
project directory and re-clone it (somewhere where executables have permission to execute) - follow the same steps as those I set out above.
Do you have a recommended way on how to reinstall the stack?
@dan010, you have two main choices to install Stack:
You'll want to install GHCup anyway if (a) you are using the Haskell add-ins for popular code file editors, such as Visual Studio Code and/or (b) you are using Cabal (the tool).
@dan010, you have two main choices to install Stack:
- what you did before: https://docs.haskellstack.org/en/stable/install_and_upgrade/
- install GHCup, and use that tool to manage versions of Stack: https://www.haskell.org/ghcup/
You'll want to install GHCup anyway if (a) you are using the Haskell add-ins for popular code file editors, such as Visual Studio Code and/or (b) you are using Cabal (the tool).
I also tried to install GHCup but I encountered error as well.
@dan010, absent better information about how the system on which you are seeking to use Haskell tools is configured and what you are experiencing when you try to install/use them, I think I can't provide further help. It does not appear to relate to Stack's code base. GHCup's repository is here: https://github.com/haskell/ghcup-hs/issues. Can we close this issue?
Encountered the error below while building the rpki-prover. I have been stacked for weeks on this error
basement > hsc2hs-ghc-9.6.5: .stack-work/dist/x86_64-linux-tinfo6/ghc-9.6.5/build/Basement/Terminal/Size_hsc_make: createProcess: posix_spawnp: permission denied (Permission denied)