Closed adrelanos closed 5 years ago
Looks like you need to install libcurl4-dev
or such. Indeed, it's not great that configure
fails with a syntax error rather than with a user-friendly error - a fix for this would be appreciated.
I also recall seeing an error like this when I had misconfigured pkg-config on a system. But regardless, you do appear to be missing the curl development library package, and need to install it.
Indeed, it's not great that
configure
fails with a syntax error rather than with a user-friendly error - a fix for this would be appreciated.
I've just checked what cpuminer-multi and cpuminer-opt (other forks of pooler's cpuminer) do here. And they simply comment out the LIBCURL_CHECK_CONFIG line in configure.ac
. (They also add some logic for the user to be able to specify a custom libcurl location.) I guess the reason is this line is only able to check the curl version, but fails in a user-unfriendly fashion (like we see here) when curl development library subpackage is not installed at all. So maybe we should do the same, and let the build fail later when it tries to include libcurl headers.
Alternatively, we could add logic to check whether curl development library is installed and bail out if not before reaching the version check.
I also found that the curl project itself offers a set of m4 macros we could use to detect curl and its version, but that file is lengthy and overly complicated for our needs, I think.
Solar Designer:
Looks like you need to install
libcurl4-dev
or such.
sudo apt install libcurl4-dev
Reading package lists... Done Building dependency tree Reading state information... Done Package libcurl4-dev is a virtual package provided by: libcurl4-openssl-dev 7.64.0-4 libcurl4-nss-dev 7.64.0-4 libcurl4-gnutls-dev 7.64.0-4 You should explicitly select one to install.
Which one preferred?
I tried all of them one by one and always get the same error.
I've just test-built the miner on Ubuntu 18.04.2 installing missing packages as necessary. I was able to reproduce the issue reported here until I installed not only libcurl4-openssl-dev, but also libssl-dev, and re-ran ./autogen.sh
. My guess is that maybe libcurl4-openssl-dev should have a dependency on libssl-dev, but is missing it (a minor Debian bug if so).
Overall, to build the miner on Debian-alike, need something like this:
apt-get install build-essential pkg-config libcurl4-openssl-dev libssl-dev
As an option, we could commit a pre-generated configure
to this repo, which should reduce the number of dependencies and result in better error reporting when libcurl isn't (fully) present.
Building works for me now. No errors.
Building works for me now. No errors.
Great. I think we need to double-check that libssl-dev is needed. Maybe you simply forgot to re-run ./autogen.sh after installing libcurl4-openssl-dev before?
I think we need to double-check that libssl-dev is needed.
Removed. Works for me.
I've also confirmed that libssl-dev isn't actually needed to build on a fresh install of Ubuntu 18.04.2.
I'll close this issue as it isn't actionable anymore. We know what missing dependencies cause this reporting, and improving the error reporting or whatever would be a separate task/issue.
I've reworked the libcurl detection logic in the current code. When trying to build with libcurl missing, the build will now fail at make
. That's not ideal, but at least it's not some weird syntax error, and the dependency on pkg-config should be gone.
Happening on Debian
buster
.Required for packaging change requests ( https://github.com/ResistancePlatform/resistance-miner/pull/6 ) by @solardiz.