From 4cf16937ce0757fb0ca35e1e81223e020f0750f5 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 13 Nov 2017 09:44:04 +0100 Subject: [PATCH] opencascade: Fix build against glibc 2.26 The header file xlocale.h has been removed in glibc 2.26. Quoting the release notes[1]: * The nonstandard header has been removed. Most programs should use instead. If you have a specific need for the definition of locale_t with no other declarations, please contact libc-alpha@sourceware.org and explain. Tested by building on x86_64-linux and it now succeeds. [1]: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html Signed-off-by: aszlig Cc: @viric --- pkgs/development/libraries/opencascade/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/opencascade/default.nix b/pkgs/development/libraries/opencascade/default.nix index 58f9019d6e0..c2fba26ba68 100644 --- a/pkgs/development/libraries/opencascade/default.nix +++ b/pkgs/development/libraries/opencascade/default.nix @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { buildInputs = [ mesa tcl tk file libXmu libtool qt4 ftgl freetype cmake ]; + # Fix for glibc 2.26 + postPatch = '' + sed -i -e 's/^\( *#include <\)x\(locale.h>\)//' \ + src/Standard/Standard_CLocaleSentry.hxx + ''; + preConfigure = '' cmakeFlags="$cmakeFlags -DOCE_INSTALL_PREFIX=$out" '';