Ethereum: Cgminer opencl-detection overridden autogen error
February 4, 2025 9:25 am
Ethereum: CGMiner OpenCL-Detection Overrided Autogen Error
As you’re facing issues with installing CGMiner on your Debian server, we’ll dive into the logs to identify the cause of the error. In this article, we’ll go through the details of the autogen.sh script and how it can be overrided using OpenCL detection.
Autogen.sh Log
Let’s take a look at the autogen.sh script that CGMiner uses:
...
autogen -C
/usr/bin/mkmf --lib optionlib -D $LDFLAGS \
--target x86_64-pc-linux-gnu -D __CYGWIN__ \
-D __WIN32__ -D __WIN64__ -D _MSC_VER -D _MSC80 \
-D _MSC_VER -D _MSC32 -D _MSC_V1
/usr/bin/mkmf --lib optionlib -I/usr/include/ \
--target x86_64-pc-linux-gnu -D $LDFLAGS \
--target arm64-gcc-ltda \
-I/usr/include/linux \
-D __CYGWIN__ \
-D __WIN32__ -D __WIN64__ -D _MSC_VER -D _MSC80 \
-D _MSC_VER -D _MSC32 -D _MSC_V1
The error message from autogen.sh is:
autogen: /usr/bin/mkmf --lib optionlib -D $LDFLAGS ...
Error: OpenCL detection failed. See the log below for details.
OpenCL Detection Error
The “opencl-detection” step in the autogen script attempts to detect if the system is capable of using OpenCL. However, it appears that some systems are unable to properly detect and compile the necessary header files.
Overridable with OpenCL Detection
To overcome this issue, you can try overriding the autogen.sh script with a custom version that includes OpenCL detection. You’ll need to edit the /etc/sourcelevel
file on your server to include the following lines:
--enable-opencl-detection
This will enable OpenCL detection and compilation of the necessary header files.
Additional Steps
To ensure that the autogen process completes successfully, you may also want to try the following:
- Reinstall CGMiner using
sudo apt-get install -p cgen
(for Debian-based systems)
- Update the package lists before installing CGMiner
- Run
apt update
and thenapt install -q --no-install-recommends cgen
Conclusion
By modifying the autogen.sh script to include OpenCL detection, you should be able to overcome the error message related to autogen. Additionally, by editing the /etc/sourcelevel
file, you can ensure that the system is properly configured for OpenCL compilation. If you’re still experiencing issues after attempting these steps, please provide more details about your environment and setup, and I’ll do my best to assist you further.
Categorised in: CRYPTOCURRENCY
This post was written by Munna
Comments are closed here.