Miner build error

I’m trying to build grin-miner just as it described in the instructions. And I’ve already struggled several error in a few days using search. But right now I even don’t know what I should looking for, cause I can’t get any clue from error output.
So my system is:
OS: Ubuntu 22.04.3LTS,
CPU: i5-11400H,
GPU: RTX 3060 Mobile 6GB

rustc 1.75.0, cargo 1.75.0, cmake 3.22.1, gcc 11.4.0, Cuda 12.3.107

I’m trying to build with the last commit of the repository:
58ed70be89c10149634372799d28a3fbaf43b925
Merge: 9df56c3 54beb23
Date: Tue Sep 22 17:18:57 2020 +0100

Build command:
CUDA_HOST_COMPILER=gcc-6 RUST_BACKTRACE=1 cargo build
Error:
error: failed to run custom build command for cuckoo_miner v4.0.0 (/home/hedgey/grin-miner/cuckoo-miner)

End of the output is:

 running: cd "/home/hedgey/grin-miner/target/debug/build/cuckoo_miner-d3a5ecc6b7401bde/out/build" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "cmake" "--build" "." "--target" "" "--config" "Debug" "--"

  --- stderr
  Usage: cmake --build <dir>             [options] [-- [native-options]]
         cmake --build --preset <preset> [options] [-- [native-options]]
  Options:
    <dir>          = Project binary directory to be built.
    --preset <preset>, --preset=<preset>
                   = Specify a build preset.
    --list-presets
                   = List available build presets.
    --parallel [<jobs>], -j [<jobs>]
                   = Build in parallel using the given number of jobs. 
                     If <jobs> is omitted the native build tool's 
                     default number is used.
                     The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                     specifies a default parallel level when this option
                     is not given.
    --target <tgt>..., -t <tgt>... 
                   = Build <tgt> instead of default targets.
    --config <cfg> = For multi-configuration tools, choose <cfg>.
    --clean-first  = Build target 'clean' first, then build.
                     (To clean only, use --target 'clean'.)
    --verbose, -v  = Enable verbose output - if supported - including
                     the build commands to be executed. 
    --             = Pass remaining options to the native tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.44/src/lib.rs:885:5
  stack backtrace:
     0: rust_begin_unwind
               at /build/rustc-wAuwbs/rustc-1.70.0+dfsg0ubuntu1~bpo2/library/std/src/panicking.rs:578:5
     1: core::panicking::panic_fmt
               at /build/rustc-wAuwbs/rustc-1.70.0+dfsg0ubuntu1~bpo2/library/core/src/panicking.rs:67:14
     2: cmake::fail
     3: cmake::run
     4: cmake::Config::build
     5: build_script_build::main
     6: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Can you please help me. I’m so tired for this few days. It’s like one of a circle of hell. I feel like I’m going give up soon.

If it’s necessary to provide you any additional information just tell me.

I remember that to mine Grin, you have to have at least 8 GB of VRAM. I suggest buying one ipollo G1-mini just $300, cheaper and much more efficient than GPU 3060.

I’m not actually trying to setup my laptop to mine grin everyday. I would like just to start mining to make my reasearch further about network in common. Because I need something that works to work with it. :slight_smile:
So do I have any opportunity to start mining on my laptop?

I just double checked the docs, Only GPU 11GB+ can mine

CuckAToo (or ASIC Targeted) is intended to be mined by ASICs in the future. **It can also be mined using 11GB+ GPUs.**

And what about the very beginning of the documentation page?

For mainnet mining, a Recent GPU with 6GB minimum for Cuckaroo29. Nvidia 1080/2080/ti series are known to work well. Support for AMD cards via OpenCL exists but is a recent development.

also from grin-mine.toml

# currently requires 6GB GPU memory
[[mining.miner_plugin_config]]
plugin_name = "cuckarooz_cuda_29"
[mining.miner_plugin_config.parameters]
device = 0

Maybe you should first build the grin-miner and then the cackoo miner plugin.
Did you check all reqiurements like ncurses lib or open CL?
Take a look here follow these steps:

BTW 6GB Cackaroo29 is NOT supported for Grin mining - you need C32 for Grin these days.

If you can not build the miner, you can optinal use the lolminer, no build steps required.

Ofc would be nice if you go on with the Community Miner “mimblewimble/grin-miner” Repo.

Good luck.

Thank you for response. :slight_smile:
I’m actually trying to build miner first time on my own because I’m not familiar with unix systems. So I may not understand some obvious steps.
It’s much more important for me to build it, than start to mine.
I went step by step on instruction that you mentioned and passed through troubleshooting also. And I had to make additional steps also. But unfortunately I came here where I am step by step :slight_smile:
Last commit includes CUDA plugin by default. But I’ll try to build without it. Thanks.

It looks like both graphic development kits are supported CUDA and OpenCL. Anyway CUDA could be better for some Nvidia-Cards since it is released under Nvidia.

I think it is very hard build a miner with minor unix/linux knowledge. It requires some time and you will not find a straight documentation for all your issues since not all issues are miner related.

I have lack of knowledge in UNIX. But I’m a C# program developer. That’s why I have some experience in compilations and reading output.
I turned off CUDA plugin in Cargo.toml but it didn’t help. the output is the same:

-- Build files have been written to: /home/vladislav/grin-miner/target/debug/build/cuckoo_miner-5593e0fdd3f0e62f/out/build
  running: cd "/home/vladislav/grin-miner/target/debug/build/cuckoo_miner-5593e0fdd3f0e62f/out/build" && MAKEFLAGS="-j --jobserver-fds=7,8 --jobserver-auth=7,8" "cmake" "--build" "." "--target" "" "--config" "Debug" "--"

  --- stderr
  Usage: cmake --build <dir>             [options] [-- [native-options]]
         cmake --build --preset <preset> [options] [-- [native-options]]
  Options:
    <dir>          = Project binary directory to be built.
    --preset <preset>, --preset=<preset>
                   = Specify a build preset.
    --list-presets
                   = List available build presets.

And as I can see from the output it looks like build script use cmake incorrect. It look like cargo trying to execute cmake without arguments.
It looks like this:

"cmake" "--build" "." "--target" "" "--config" "Debug" "--"

has unnecessary extra quotes