Error while installing cgminer

Hello.
I tried to install mining software cgminer via AUR, but I get this error:

╭─jedrus@jedrus in repo: cgminer on  master took 2s
[🔴] × makepkg -si
==> ERROR: cgminer is not available for the 'x86_64' architecture.

Is it something I'm doing wrong, or it will not work on my machine and is it a way around it?

Thank you.

Have you tried also with an AUR helper? E.g.

paru cgminer

PS: your garuda-inxi is missing

2 Likes
╭─jedrus@jedrus in ~  
╰─λ garuda-inxi  
System:
Kernel: 5.16.12-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=2d830ce2-0590-40ec-8bbf-eaabd349ea02 rw rootflags=subvol=@
rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3 splash quiet
Desktop: KDE Plasma 5.24.2 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASUSTeK model: PRIME Z390-P v: Rev X.0x
serial: <superuser required> UEFI: American Megatrends v: 2808
date: 05/27/2020
CPU:
Info: model: Intel Core i7-9700K bits: 64 type: MCP arch: Coffee Lake
family: 6 model-id: 0x9E (158) stepping: 0xD (13) microcode: 0xEC
Topology: cpus: 1x cores: 8 smt: <unsupported> cache: L1: 512 KiB
desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB L3: 12 MiB
desc: 1x12 MiB
Speed (MHz): avg: 4888 high: 4903 min/max: 800/4900 scaling:
driver: intel_pstate governor: performance cores: 1: 4847 2: 4876 3: 4888
4: 4891 5: 4898 6: 4901 7: 4901 8: 4903 bogomips: 57600
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
Type: srbds mitigation: TSX disabled
Type: tsx_async_abort mitigation: TSX disabled
Graphics:
Device-1: NVIDIA TU106 [GeForce RTX 2060 SUPER] vendor: Micro-Star MSI
driver: nvidia v: 510.54 alternate: nouveau,nvidia_drm pcie: gen: 3
speed: 8 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:1f06 class-ID: 0300
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: nvidia unloaded: modesetting,nouveau alternate: fbdev,nv,vesa
gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1440 s-dpi: 108 s-size: 602x342mm (23.7x13.5")
s-diag: 692mm (27.3")
Monitor-1: DP-4 res: 2560x1440 hz: 144 dpi: 109
size: 597x336mm (23.5x13.2") diag: 685mm (27")
OpenGL: renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
v: 4.6.0 NVIDIA 510.54 direct render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel
v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
chip-ID: 8086:a348 class-ID: 0403
Device-2: NVIDIA TU106 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:10f9 class-ID: 0403
Sound Server-1: ALSA v: k5.16.12-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 04:00.0 chip-ID: 10ec:8168
class-ID: 0200
IF: enp4s0 state: down mac: <filter>
Device-2: TP-Link 802.11ac NIC type: USB driver: rtl88x2bu bus-ID: 1-1:2
chip-ID: 2357:0138 class-ID: 0000 serial: <filter>
IF: wlp0s20f0u1 state: up mac: <filter>
IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A
Drives:
Local Storage: total: 3.22 TiB used: 129.7 GiB (3.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:6 vendor: Lexar model: 512GB SSD
size: 476.94 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: V1.8
temp: 38.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Seagate
model: XPG GAMMIX S11 Pro size: 953.87 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 32B3T8EA temp: 38.9 C scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2FR102
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: GPT
Partition:
ID-1: / raw-size: 476.68 GiB size: 476.68 GiB (100.00%)
used: 129.7 GiB (27.2%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
used: 563 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:7
ID-3: /home raw-size: 476.68 GiB size: 476.68 GiB (100.00%)
used: 129.7 GiB (27.2%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-4: /var/log raw-size: 476.68 GiB size: 476.68 GiB (100.00%)
used: 129.7 GiB (27.2%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-5: /var/tmp raw-size: 476.68 GiB size: 476.68 GiB (100.00%)
used: 129.7 GiB (27.2%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.54 GiB used: 512 KiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 27.8 C mobo: N/A gpu: nvidia temp: 55 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 320 Uptime: 1h 5m wakeups: 0 Memory: 15.54 GiB
used: 5.53 GiB (35.6%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1844 lib: 563 Shell: fish
v: 3.3.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.13
Garuda (2.5.5-1):
System install date:     2021-10-29
Last full system update: 2022-03-05
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Timeshift
Failed units:            bluetooth-autoconnect.service

I tried this:

╭─jedrus@jedrus in repo: cgminer on  master took 462ms
[🔴] × yay cgminer
1 aur/cgminer 4.11.1-7 (+3 0.32) 
Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  cgminer-4.11.1-7

:: (1/1) Downloaded PKGBUILD: cgminer
1 cgminer                          (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> A
diff --git /home/jedrus/.cache/yay/cgminer/PKGBUILD /home/jedrus/.cache/yay/cgminer/PKGBUILD
new file mode 100644
index 0000000..01f0ff5
--- /dev/null
+++ /home/jedrus/.cache/yay/cgminer/PKGBUILD
@@ -0,0 +1,96 @@
+# Maintainer: Adam Tazul (SimPilotAdamT) <[email protected]>
+# Contributor: Felix Yan <[email protected]>
+# Contributor: monson <[email protected]>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: David Manouchehri <[email protected]>
+
+pkgname=cgminer
+pkgver=4.11.1
+_pkgver=$pkgver
+pkgrel=7
+pkgdesc="Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin"
+url='http://ck.kolivas.org/apps/cgminer/'
+license=('GPL3')
+arch=('x86_64''i386''armv7h')
+depends=('curl' 'libusb' 'jansson')
+makedepends=('git')
+source=("git+https://github.com/ckolivas/${pkgname}.git#tag=v$_pkgver"
+        "$pkgname.conf.d"
+        "$pkgname.service")
+backup=("etc/conf.d/$pkgname" "etc/$pkgname.conf")
+
:

Sorry I'm a total noob.

I also got this

╭─jedrus@jedrus in repo: cgminer on  master took 1m54s
[🧱] × paru cgminer
1 aur/cgminer 4.11.1-7 [+3 ~0.32]
Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin
:: Packages to install (eg: 1 2 3, 1-3):
:: 1
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) cgminer-4.11.1-7

:: Proceed to review? [Y/n]: y

:: Downloading PKGBUILDs...
(1/1) cgminer-4.11.1-7                              [------------------------------------------------------]
/home/jedrus/.cache/paru/clone/cgminer/PKGBUILD
# Maintainer: Adam Tazul (SimPilotAdamT) <[email protected]>
# Contributor: Felix Yan <[email protected]>
# Contributor: monson <[email protected]>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: David Manouchehri <[email protected]>

pkgname=cgminer
pkgver=4.11.1
_pkgver=$pkgver
pkgrel=7
pkgdesc="Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin"
url='http://ck.kolivas.org/apps/cgminer/'
license=('GPL3')
arch=('x86_64''i386''armv7h')
depends=('curl' 'libusb' 'jansson')
makedepends=('git')
source=("git+https://github.com/ckolivas/${pkgname}.git#tag=v$_pkgver"
"$pkgname.conf.d"
"$pkgname.service")
backup=("etc/conf.d/$pkgname" "etc/$pkgname.conf")

prepare() {
cd $pkgname
# We have latest jansson and libusb - just use them

sed -e 's|^AC_CONFIG_SUBDIRS.*compat/jansson-2\.9.*||' \
-e 's|JANSSON_LIBS="compat/jansson-2\.9/src/\.libs/libjansson\.a"|JANSSON_LIBS=-ljansson|' \
-e 's|compat/Makefile||' \
-i ./configure.ac

sed -e 's|^JANSSON_CPPFLAGS= .*||' \
-e 's|^USBUTILS_CPPFLAGS = .*|USBUTILS_CPPFLAGS = -I/usr/include/libusb-1.0|' \
-e 's|^SUBDIRS.*|SUBDIRS = lib ccan|' \
-i ./Makefile.am

#sed "s|ac_subdirs_all='compat/libusb\-1.0\ncompat/jansson-2.5'||" -i ./configure
#sed 's|subdirs="$subdirs compat/libusb\-1.0"||' -i ./configure
#sed 's|subdirs="$subdirs compat/jansson\-2.5"||' -i ./configure
#sed 's|LIBUSB_LIBS="compat/libusb-1.0/libusb/.libs/libusb-1.0.a"|LIBUSB_LIBS=-lusb-1.0|' -i ./configure
#sed 's|JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a"|JANSSON_LIBS=-ljansson|' -i ./configure
#sed 's|compat/Makefile ||' -i ./configure

#sed 's|JANSSON_INCLUDES = .*||' -i ./Makefile.in
#sed 's|USBUTILS_INCLUDES = .*|USBUTILS_INCLUDES = -I/usr/include/libusb-1.0|' -i ./Makefile.in
#sed 's|SUBDIRS = lib compat ccan|SUBDIRS = lib ccan|' -i ./Makefile.in

rm -r compat
}

build() {
cd $pkgname

# Here you may want to use custom CFLAGS
#export CFLAGS="-O2 -march=native -mtune=native -msse2"

# ./configure \

CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

# Taken from README - Q: What should I build in for a generic distribution binary?
./autogen.sh \
--prefix=/usr \
--enable-avalon \
--enable-avalon2 \
--enable-avalon4 \
--enable-bflsc \
--enable-bitfury \
--enable-blockerupter \
--enable-cointerra \
--enable-drillbit \
--enable-hashfast \
--enable-hashratio \
--enable-icarus \
--enable-klondike \
--with-system-libusb

make
}

package() {
cd $pkgname

make DESTDIR="$pkgdir" install

install -d "$pkgdir/usr/share/$pkgname"
install -m755 miner.php api-example.* "$pkgdir/usr/share/$pkgname"

install -Dm644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
install -Dm644 "$srcdir"/$pkgname.conf.d "$pkgdir"/etc/conf.d/$pkgname
sed 's#/usr/local/bin#/usr/bin#g' example.conf > $pkgname.conf
install -Dm644 $pkgname.conf "$pkgdir"/etc/$pkgname.conf
}

sha512sums=('SKIP'
'99c38bc395848f9712ce172343d31f5c60f5d8ac1cfe2f48df8f3ec6c488fc275763a79c5ef36b99f32faa465b5a6528>
'3317b60c6b1f14c47d8ee636113ef40a4023ab14054129de80a37947b381fd2b647a7053f4e1bb639efa225a514e862f>


/home/jedrus/.cache/paru/clone/cgminer/cgminer.conf.d
# Use JSON-format configuration. (recommended)
CGMINER_CONF="/etc/cgminer.conf"

# Uncommend this if you prefer simple command-line arguments.
#CGMINER_CONF=""
#CGMINER_PROTOCOL="http"
#CGMINER_IP="127.0.0.1"
#CGMINER_PORT="8332"
#CGMINER_USER="username"
#CGMINER_PASS="password"
CGMINER_ARGS="--syslog"


/home/jedrus/.cache/paru/clone/cgminer/cgminer.service
[Unit]
Description=Multi-threaded multi-pool CPU and GPU miner for bitcoin

[Service]
ExecStart=/usr/bin/cgminer -T --config /etc/cgminer.conf --syslog

[Install]
WantedBy=multi-user.target


(END)⏎  

You have to press Q in paru to exit the PKGBUILD preview. Then confirm that you want to install.
In yay instead, you selected the option to view the "diffs". Same concept.

2 Likes

It worked!

Thank you. ::

1 Like

The PKGBUILD has an issue here, there should be a space between each item on this line. Please report to the AUR PKGBUILD maintainer.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.