From 3c63d7c6d66fa99d6bdecf6484cdb6df6d8c4621 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Sun, 14 Apr 2024 14:32:48 +1000 Subject: [PATCH] contrib/nix: work around clang errors in unicode gem Same new clang error as in ncursesw, but in this case it's just missing casts, not misdeclared arguments. There's no clear upstream to publish a proper fix so let's just suppress the error for now so that the gem build on MacOS can succeed. --- contrib/nix/ruby2.4-shell.nix | 7 +++++++ contrib/nix/ruby2.5-shell.nix | 7 +++++++ contrib/nix/ruby2.6-shell.nix | 7 +++++++ contrib/nix/ruby2.7-shell.nix | 7 +++++++ contrib/nix/ruby3.0-shell.nix | 7 +++++++ contrib/nix/ruby3.1-shell.nix | 7 +++++++ contrib/nix/ruby3.2-shell.nix | 7 +++++++ contrib/nix/ruby3.3-shell.nix | 7 +++++++ 8 files changed, 56 insertions(+) diff --git a/contrib/nix/ruby2.4-shell.nix b/contrib/nix/ruby2.4-shell.nix index e02a4293..27ce3af7 100644 --- a/contrib/nix/ruby2.4-shell.nix +++ b/contrib/nix/ruby2.4-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; # Workaround: remove rake from nativeBuildInputs, otherwise it causes # xapian-bindings to build against the default Ruby version # instead of our chosen version. diff --git a/contrib/nix/ruby2.5-shell.nix b/contrib/nix/ruby2.5-shell.nix index a37818e5..fdb42167 100644 --- a/contrib/nix/ruby2.5-shell.nix +++ b/contrib/nix/ruby2.5-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; # Workaround: remove rake from nativeBuildInputs, otherwise it causes # xapian-bindings to build against the default Ruby version # instead of our chosen version. diff --git a/contrib/nix/ruby2.6-shell.nix b/contrib/nix/ruby2.6-shell.nix index b3c69522..eefbd700 100644 --- a/contrib/nix/ruby2.6-shell.nix +++ b/contrib/nix/ruby2.6-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; # Workaround: remove rake from nativeBuildInputs, otherwise it causes # xapian-bindings to build against the default Ruby version # instead of our chosen version. diff --git a/contrib/nix/ruby2.7-shell.nix b/contrib/nix/ruby2.7-shell.nix index 20298b7d..0bfa30f5 100644 --- a/contrib/nix/ruby2.7-shell.nix +++ b/contrib/nix/ruby2.7-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; }; }; in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; } diff --git a/contrib/nix/ruby3.0-shell.nix b/contrib/nix/ruby3.0-shell.nix index 4870cf67..76328c7e 100644 --- a/contrib/nix/ruby3.0-shell.nix +++ b/contrib/nix/ruby3.0-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; }; }; in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; } diff --git a/contrib/nix/ruby3.1-shell.nix b/contrib/nix/ruby3.1-shell.nix index ee1a9f35..a50b079f 100644 --- a/contrib/nix/ruby3.1-shell.nix +++ b/contrib/nix/ruby3.1-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; }; }; in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; } diff --git a/contrib/nix/ruby3.2-shell.nix b/contrib/nix/ruby3.2-shell.nix index 991b4554..ff7ec58c 100644 --- a/contrib/nix/ruby3.2-shell.nix +++ b/contrib/nix/ruby3.2-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; }; }; in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; } diff --git a/contrib/nix/ruby3.3-shell.nix b/contrib/nix/ruby3.3-shell.nix index b4e40c61..7de9c440 100644 --- a/contrib/nix/ruby3.3-shell.nix +++ b/contrib/nix/ruby3.3-shell.nix @@ -24,6 +24,13 @@ let }) ]; }; + # Workaround for a new error in clang 16 (MacOS): + # https://github.com/blackwinter/unicode/pull/11 + unicode = attrs: { + buildFlags = [ + "--with-cflags=-Wno-incompatible-function-pointer-types" + ]; + }; }; }; in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }