lolepezy / rpki-prover

Yet another RPKI validator
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Error during compiling of RPKI-Prover #211

Open dan010 opened 3 months ago

dan010 commented 3 months ago

Hi I need your assistance. I am encountering error while building the rpki-prover.

**Error: [S-7282] Stack failed to execute the build plan.

   While executing the build plan, Stack encountered the following errors:

   [S-7011]
   While building package clock-0.8.4 (scroll up to its section to see the error) using:
   /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_HwdwpEmb_3.10.3.0_ghc-9.6.5 --verbose=1 --builddir=.stack-work/dist/x86_64-linux-tinfo6/ghc-9.6.5 build --ghc-options " -fdiagnostics-color=always"
   Process exited with code: ExitFailure 1 

   [S-7011]
   While building package basement-0.0.16 (scroll up to its section to see the error) using:
   /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_HwdwpEmb_3.10.3.0_ghc-9.6.5 --verbose=1 --builddir=.stack-work/dist/x86_64-linux-tinfo6/ghc-9.6.5 build --ghc-options " -fdiagnostics-color=always"**
lolepezy commented 3 months ago

Hi, sorry for late reply, From what I can understand, your problem boils down to permissions (build process is unable to spawn new process). Did you try it on other types of FS (without noexec flag)? Is it only happening when building rpki-prover or other projects as well?

dan010 commented 3 months ago

Hi, sorry for late reply, From what I can understand, your problem boils down to permissions (build process is unable to spawn new process). Did you try it on other types of FS (without noexec flag)? Is it only happening when building rpki-prover or other projects as well?

Can you give me step-by-step process or commands how will I do it?

lolepezy commented 3 months ago

Normally, just following the readme part about it should be enough (https://github.com/lolepezy/rpki-prover#building-from-sources).

I remember having problems with different glibc versions on some older Linux distributions, but that seems to be not your case.

If the problem is really caused by the noexec bit, I would advice checking out the repository to an FS without it and also changing the location of the user-wise stack cache to an FS that would allow spawning processes https://docs.haskellstack.org/en/stable/stack_root

As a wild guess, could these issues be caused by SELinux? Switching it to the reporting mode (or whatever it’s called, I don’t have much knowledge of it) would also be a solution.

dan010 commented 3 months ago

Normally, just following the readme part about it should be enough (https://github.com/lolepezy/rpki-prover#building-from-sources).

I remember having problems with different glibc versions on some older Linux distributions, but that seems to be not your case.

If the problem is really caused by the noexec bit, I would advice checking out the repository to an FS without it and also changing the location of the user-wise stack cache to an FS that would allow spawning processes https://docs.haskellstack.org/en/stable/stack_root

As a wild guess, could these issues be caused by SELinux? Switching it to the reporting mode (or whatever it’s called, I don’t have much knowledge of it) would also be a solution.

I already tried to disabled the SELinux but same issue still occur.

dan010 commented 3 months ago

Here is the error on the issue that I encountered during installation

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)

lolepezy commented 3 months ago

Yes, I saw the error message in the issue you created for stack and can only suggest to do the same, i.e. install stack from scratch (there’s some mismatch between versions there, 9.4.8 gets mixed with 9.6.5) and clone rpki-prover to a FS without noexec bit (since by default .stack-work is created in the directory you clone the project to).

dan010 commented 3 months ago

Can you give me a step-by-step procedure on clone rpki-prover part? I just don't know how to do that.

On Sun, Jun 9, 2024, 4:06 AM Mikhail Puzanov @.***> wrote:

Yes, I saw the error message in the issue you created for stack and can only suggest to do the same, i.e. install stack from scratch (there’s some mismatch between versions there, 9.4.8 gets mixed with 9.6.5) and clone rpki-prover to a FS without noexec bit (since by default .stack-work is created in the directory you clone the project to).

— Reply to this email directly, view it on GitHub https://github.com/lolepezy/rpki-prover/issues/211#issuecomment-2156166176, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALRIB4SXBPSGLBKXD4YMKF3ZGNP3JAVCNFSM6AAAAABIV2BMGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGE3DMMJXGY . You are receiving this because you authored the thread.Message ID: @.***>

lolepezy commented 3 months ago

If you have git installed

cd fs_without_noexec
git clone https://github.com/lolepezy/rpki-prover.git
./build-local.sh

if you don’t have git, use the download Zip link https://github.com/lolepezy/rpki-prover/archive/refs/heads/master.zip to download the sources instead of git clone

lolepezy commented 3 months ago

Did you have any success with the build?