# Miner build error

**URL:** <https://forum.grin.mw/t/miner-build-error/10895>\
**Category:** Tech Support\
**Created:** [January 13, 2024, 5:18pm UTC](https://forum.grin.mw/t/miner-build-error/10895 "2024-01-13T17:18:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![HedgehogNSK](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@HedgehogNSK](https://forum.grin.mw/u/HedgehogNSK)\
**Post date:** [January 13, 2024, 5:18pm UTC](https://forum.grin.mw/t/miner-build-error/10895/1 "2024-01-13T17:18:59Z")

</div>

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:

```auto
 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.

---

<div class="post-metadata">

**Author:** ![noobvie](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@noobvie](https://forum.grin.mw/u/noobvie)\
**Post date:** [January 13, 2024, 5:54pm UTC](https://forum.grin.mw/t/miner-build-error/10895/2 "2024-01-13T17:54:47Z")

</div>

I remember that to mine Grin, you have to have at least 8 GB of VRAM. I suggest buying one [ipollo G1-mini](https://ipollo.com/products/ipollo-g1-mini) just $300, cheaper and much more efficient than GPU 3060.

---

<div class="post-metadata">

**Author:** ![HedgehogNSK](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@HedgehogNSK](https://forum.grin.mw/u/HedgehogNSK)\
**Post date:** [January 13, 2024, 6:12pm UTC](https://forum.grin.mw/t/miner-build-error/10895/3 "2024-01-13T18:12:14Z")

</div>

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. 🙂  
So do I have any opportunity to start mining on my laptop?

---

<div class="post-metadata">

**Author:** ![noobvie](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@noobvie](https://forum.grin.mw/u/noobvie)\
**Post date:** [January 14, 2024, 1:52am UTC](https://forum.grin.mw/t/miner-build-error/10895/4 "2024-01-14T01:52:26Z")

</div>

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

> **[How to mine with grin-miner - Grin Documentation](https://docs.grin.mw/wiki/extra-documents/how-to-mine/#prerequisites)**
>
> Grin Documentation

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

---

<div class="post-metadata">

**Author:** ![HedgehogNSK](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@HedgehogNSK](https://forum.grin.mw/u/HedgehogNSK)\
**Post date:** [January 14, 2024, 11:55am UTC](https://forum.grin.mw/t/miner-build-error/10895/5 "2024-01-14T11:55:32Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![EllipticCurve](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/ellipticcurve/32/6230_2.png) [@EllipticCurve](https://forum.grin.mw/u/EllipticCurve)\
**Post date:** [January 14, 2024, 1:39pm UTC](https://forum.grin.mw/t/miner-build-error/10895/6 "2024-01-14T13:39:11Z")

</div>

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:

> **[GitHub - mimblewimble/grin-miner: Standalone miner for grin](https://github.com/mimblewimble/grin-miner)**
>
> Standalone miner for grin. Contribute to mimblewimble/grin-miner development by creating an account on GitHub.

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.

> **[Releases · Lolliedieb/lolMiner-releases](https://github.com/Lolliedieb/lolMiner-releases/releases)**
>
> Contribute to Lolliedieb/lolMiner-releases development by creating an account on GitHub.

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

Good luck.

---

<div class="post-metadata">

**Author:** ![HedgehogNSK](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@HedgehogNSK](https://forum.grin.mw/u/HedgehogNSK)\
**Post date:** [January 14, 2024, 1:52pm UTC](https://forum.grin.mw/t/miner-build-error/10895/7 "2024-01-14T13:52:13Z")

</div>

Thank you for response. 🙂  
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 🙂  
Last commit includes CUDA plugin by default. But I’ll try to build without it. Thanks.

---

<div class="post-metadata">

**Author:** ![EllipticCurve](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/ellipticcurve/32/6230_2.png) [@EllipticCurve](https://forum.grin.mw/u/EllipticCurve)\
**Post date:** [January 14, 2024, 2:07pm UTC](https://forum.grin.mw/t/miner-build-error/10895/8 "2024-01-14T14:07:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HedgehogNSK](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@HedgehogNSK](https://forum.grin.mw/u/HedgehogNSK)\
**Post date:** [January 14, 2024, 2:35pm UTC](https://forum.grin.mw/t/miner-build-error/10895/9 "2024-01-14T14:35:56Z")

</div>

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:

```auto
-- 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:

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

```

has unnecessary extra quotes
