Closed chris-martin closed 4 years ago
Are you sure, they are mutual exclusive?
archlinux> cgmanager --help
cgminer 4.9.2
Built with avalon avalon2 avalon4 bflsc bitfury cointerra drillbit hashfast icarus klondike mining support.
It seems it support multiple targets.
Oh, I must be wrong. I tried compiling with a handful of them and it failed. Perhaps only a few of them are mutually exclusive, or perhaps I misunderstood entirely.
If they are not mutually exclusive, then don't bother with these flags, and just use the defaults. If users want to support other hardware, they can override the configureFlags
. But, if you really do want to make it even easier, I could imagine a compileFlags ? [ ]
which is a list of strings (e.g. [ "ants1" "ants2" "icarus"]
).
Also, from their README
Q: What should I build in for a generic distribution binary?
A: There are a number of drivers that expect to be used on dedicated standalone
hardware. That said, the drivers that are designed to work generically with
USB on any hardware are the following:
--enable-avalon
--enable-avalon2
--enable-avalon4
--enable-avalon7
--enable-bflsc
--enable-bitfury
--enable-cointerra
--enable-drillbit
--enable-hashfast
--enable-hashratio
--enable-icarus
--enable-klondike
I just stumbled across cgminer while looking for things that set LD_LIBRARY_PATH=/run/opengl-driver/lib in order to turn it into RUNPATH (related to #60985). I then saw that the current cgminer package uses amdappsdk
and on my NVidia system this doesn't do anything useful (cgminer --ndevs
fails). Replacing the AMD dependencies with ocl-headers
and ocl-icd
fixed that (at least --ndevs
works, testing actual functions seems nontrivial):
/cgminer/bin/cgminer --ndevs
[2019-05-21 19:22:02] CL Platform 0 vendor: NVIDIA Corporation
[2019-05-21 19:22:02] CL Platform 0 name: NVIDIA CUDA
[2019-05-21 19:22:02] CL Platform 0 version: OpenCL 1.2 CUDA 10.1.173
[2019-05-21 19:22:02] Platform 0 devices: 1
[2019-05-21 19:22:02] 0 GeForce GTX 1060
[2019-05-21 19:22:02] 1 GPU devices max detected
Should I submit a PR to replace AMD deps? Also cgminer is the only package in nixpkgs using amdappsdk
and amdadlsdk
which are deprecated anyway, so we could remove those then.
Does anyone even use this version of cgminer at all? If we think not we could remove the current cgminer package.
Our cgminer package is way out of date. Cgminer has dropped support for CPU and GPU mining since they're now irrelevant to Bitcoin, and is now only an ASIC/FPGA miner. So we'll need to remove all the GPU options from the cgminer service.
When you build cgminer, you have to specify what kind of hardware you're building for by passing exactly one of these compile flags:
So I don't know, does it makes sense to have a cgminer derivation for each of these?