Open Robsonsjre opened 1 year ago
Hi Rob, thanks for creating this issue. @arcz is our Nix expert so let's wait for his response.
I've checked and this works for me fine. Are you sure you are running the correct binary? The binary is in result/bin/echidna-test
but you are unpacking a tar.gz
file. It seems that you ran macos-release.nix
but you should run default.nix
.
@Robsonsjre are you still experiencing this issue?
I went to vacations this week, I come back Monday and I will check if I managed to make it work!
Hi @arcz , Ive tried to run nix-build default.nix --arg profiling true
. Now Im receiving some errors regarding the lack of libraries. How do I install those libraries?
lib/Echidna/Events.hs:3:8: error:
Could not find module ‘Prelude’
Perhaps you haven't installed the profiling libraries for package ‘base-4.14.3.0’?
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
3 | module Echidna.Events where
| ^^^^^^^^^^^^^^
lib/Echidna/Events.hs:5:1: error:
Could not find module ‘Data.ByteString’
Perhaps you haven't installed the profiling libraries for package ‘bytestring-0.10.12.0’?
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
5 | import Data.ByteString qualified as BS
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/Echidna/Events.hs:6:1: error:
Could not find module ‘Data.ByteString.Lazy’
Perhaps you haven't installed the profiling libraries for package ‘bytestring-0.10.12.0’?
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
6 | import Data.ByteString.Lazy (fromStrict)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I confirm I have the same error on M1, it doesn't happen on x86. I suspect there is some nixpkgs configuration issue on M1. I would need to dig into it. At the moment, what I can recommend is to get an x86 machine and build with profiling there.
As a workaround, nix develop --system x86_64-darwin
works on M1 via Rosetta. Then you can run the profiler with cabal run --enable-profiling echidna -- +RTS -p -RTS tests/solidity/basic/flags.sol --seed 0 --test-limit 1000 --format text
Hello,
I'm trying to fuzzy a contract using assert mode with testLimit 50000 . It is taking a long time and after they reach 6000 trials, echidna suddenly stops.
So in order to debug the problem, I've tried to build using Nix as recommended.
The documentation says:
nix-build --arg profiling true
After that, I've unpacked the created build (tar.gz file) inside the/result
folder.When I try to run the echidna command using
+RTS -p
, I receive the errorthe flag -p requires the program to be built with -prof
What I am doing wrong?
My machine:
MacOS M1 Max - Monterey
My echidna config.yaml: