Open gBasil opened 10 months ago
This was fixed in 76c359fe04eaed04fa4547b509473db619ab595b
Unfortunately this error still occurs on then newest commit (f264d38), now with curl 8.7.1
but the exact same issue.
[ 28%] Building CXX object third_party/cpr/cpr/CMakeFiles/cpr.dir/curlholder.cpp.o
/build/source/third_party/cpr/cpr/curlholder.cpp: In destructor 'cpr::CurlHolder::~CurlHolder()':
/build/source/third_party/cpr/cpr/curlholder.cpp:26:18: error: 'void curl_formfree(curl_httppost*)' is deprecated: since 7.56.0. Use curl>
26 | curl_formfree(formpost);
| ~~~~~~~~~~~~~^~~~~~~~~~
In file included from /build/source/third_party/cpr/include/cpr/curlholder.h:8,
from /build/source/third_party/cpr/cpr/curlholder.cpp:1:
/nix/store/cnazciv4gza3ylaaa2yqfz9nivnqhlh4-curl-8.7.1-dev/include/curl/curl.h:2617:1: note: declared here
2617 | curl_formfree(struct curl_httppost *form);
| ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [third_party/cpr/cpr/CMakeFiles/cpr.dir/build.make:146: third_party/cpr/cpr/CMakeFiles/cpr.dir/curlholder.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:525: third_party/cpr/cpr/CMakeFiles/cpr.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
This is the flake I use:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in {
packages.default = pkgs.stdenv.mkDerivation {
name = "unnamed-sdvx-clone";
src = pkgs.fetchFromGitHub {
owner = "Drewol";
repo = "unnamed-sdvx-clone";
rev = "f264d380dd0550a781237028392e68db1ec51478"; # Latest commit (the latest tagged version is from 2021)
sha256 = "sha256-UgdBiASCUbF+UtxgJ0UMH7d1zOKW/y3bXGkAKB/cBEk=";
fetchSubmodules = true;
};
nativeBuildInputs = with pkgs; [
cmake
];
cmakeFlags = [
# If this flag is not enabled, the cpr CMakeLists.txt will try and clone zlib with git at buildtime, which will error out, as the network is disabled during Nix package builds
"-DCPR_FORCE_USE_SYSTEM_CURL=ON"
];
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin
mv bin $out/bin
'';
buildInputs = with pkgs; [
SDL2
zlib
freetype
libarchive
libogg
libvorbis
libpng # orig is libpng12
libjpeg # orig is libjpeg_original
# rapidjson # required by third_party/discord-rpc
# libgl1-mesa-dev # not sure where to pull this from or if I even need to at this point?
openssl
libiconv
curl # See the explanation for forcing system curl
];
};
}
);
}
Describe the bug I'm trying to build unnamed-sdvx-clone via Nix. The version of curl in
nixpkgs
(the package repo for the Nix ecosystem) is version8.2.1
. When trying to build this project, the following error occurs during the build process:This issue seems to have been fixed in a recent version of
cpr
. See: https://github.com/libcpr/cpr/issues/870 https://github.com/libcpr/cpr/pull/890However, forking this repository, updating the
cpr
submodule, pointing the flake to use the fork as an input, and trying to build gives the following error:To Reproduce Steps to reproduce the behavior:
Create a file called
flake.nix
with the following content:nix build
Desktop: