Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4 Error when "make -j 2" #816

Open
IDontModLobbies opened this issue May 2, 2021 · 8 comments
Open

Raspberry Pi 4 Error when "make -j 2" #816

IDontModLobbies opened this issue May 2, 2021 · 8 comments

Comments

@IDontModLobbies
Copy link

IDontModLobbies commented May 2, 2021

In file included from driver-gekko.c:1:
driver-gekko.c: In function \u2018compac_mine\u2019:
driver-gekko.h:8:24: warning: implicit declaration of function \u2018pthread_yield\u2019; did you mean \u2018thread_yield\u2019? [-Wimplicit-function-declaration]
 #define thread_yield() pthread_yield(NULL)
                        ^~~~~~~~~~~~~
driver-gekko.c:579:4: note: in expansion of macro \u2018thread_yield\u2019
    thread_yield();
    ^~~~~~~~~~~~
  CCLD     cgminer
/usr/bin/ld: cgminer-util.o: in function `parse_method.part.18':
util.c:(.text+0x8c80): undefined reference to `json_string_length'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:891: cgminer] Error 1
make[2]: Leaving directory '/home/pi/git/vthoang/cgminer'
make[1]: *** [Makefile:1835: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/git/vthoang/cgminer'
make: *** [Makefile:794: all] Error 2

@IDontModLobbies
Copy link
Author

IDontModLobbies commented May 2, 2021

Followed this guide and I get errors upon installation.
NewPac BM1387 USB Stick Miner User Guide

sudo apt-get update

sudo apt-get upgrade -y

sudo apt-get install -y build-essential git libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev screenlibtool automake pkg-config libjansson-dev

mkdir -p git/vthoang; cd git/vthoang

git clone https://github.com/vthoang/cgminer.git

cd cgminer

CFLAGS="-O2" ./autogen.sh --enable-gekko

make -j 2

@C-O-S
Copy link

C-O-S commented Apr 13, 2022

Those instructions are for cgminer, not bfgminer.

That said, try the instructions here:
https://bitcointalk.org/index.php?topic=5355470.msg58200639#msg58200639

It should help you compile a working gekko driver you can use.

@IDontModLobbies
Copy link
Author

Those instructions are for cgminer, not bfgminer.

That said, try the instructions here:

https://bitcointalk.org/index.php?topic=5355470.msg58200639#msg58200639

It should help you compile a working gekko driver you can use.

I'm trying to make it work for an ASIC BlockEruptor. I will definitely try this out when I get home from work. Fingers crossed!

@C-O-S
Copy link

C-O-S commented Apr 14, 2022

If you're only using a BlockErupter, then you may need to replace this line:
CFLAGS="-O2 -march=native -fcommon" ./autogen.sh --enable-gekko --enable-icarus

With this one:
CFLAGS="-O2 -march=native -fcommon" ./autogen.sh --enable-blockerupter

Per the README:
https://github.com/kanoi/cgminer/blob/master/README

To ensure you enable the driver as part of the build for the executable.

Best of luck!

@IDontModLobbies
Copy link
Author

IDontModLobbies commented Apr 14, 2022

Everything is working now, except the device cannot be found. Are these considered blockeruptors? That is what it was listed when I bought it.

image

Additionally, I followed this code.

$ cd ~/git/vthoang/cgminer/
$ sudo usermod -G plugdev -a whoami
$ sudo cp 01-cgminer.rules /etc/udev/rules.d/
$ sudo reboot

@C-O-S
Copy link

C-O-S commented Apr 14, 2022

Try this:

sudo cgminer --ndevs

If it lists the actual device(s), then your issue is related to your OS not granting your user account access to those USB devices.

You can shortcut troubleshooting by trying a test run of the devices with sudo prepended to the command like the above, but realistically that's not a great long-term solution.

@IDontModLobbies
Copy link
Author

sudo cgminer --ndevs

Sadly, I get this error.

sudo: cgminer: command not found

When I go to USB Management, it does state that there is one device. However, it does not start the mining process.

@Saikatsaha1996
Copy link

sudo cgminer --ndevs

Sadly, I get this error.

sudo: cgminer: command not found

When I go to USB Management, it does state that there is one device. However, it does not start the mining process.

cd cgminer
sudo cgminer --ndevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants