diff --git a/pkgs/by-name/bl/blender/llvm-conflict.patch b/pkgs/by-name/bl/blender/llvm-conflict.patch new file mode 100644 index 0000000000000..769cea7a16328 --- /dev/null +++ b/pkgs/by-name/bl/blender/llvm-conflict.patch @@ -0,0 +1,18 @@ +diff --git a/extern/hipew/src/util.h b/extern/hipew/src/util.h +index 2aafc4b7f9..b9ed1c0cd3 100644 +--- a/extern/hipew/src/util.h ++++ b/extern/hipew/src/util.h +@@ -40,11 +40,12 @@ + # define dynamic_library_close(lib) FreeLibrary(lib) + # define dynamic_library_find(lib, symbol) GetProcAddress(lib, symbol) + #else ++# define _GNU_SOURCE + # include + + typedef void* DynamicLibrary; + +-# define dynamic_library_open(path) dlopen(path, RTLD_NOW) ++# define dynamic_library_open(path) dlmopen(LM_ID_NEWLM, path, RTLD_NOW) + # define dynamic_library_close(lib) dlclose(lib) + # define dynamic_library_find(lib, symbol) dlsym(lib, symbol) + #endif diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index 19199e6d468a5..21979ce6faef3 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -126,7 +126,10 @@ stdenv'.mkDerivation (finalAttrs: { }; # Minimal backport of hiprt 3.x support from https://projects.blender.org/blender/blender/pulls/144889 - patches = lib.optional rocmSupport ./hiprt-3-compat.patch; + patches = lib.optionals rocmSupport [ + ./hiprt-3-compat.patch + ./llvm-conflict.patch + ]; postPatch = (lib.optionalString stdenv.hostPlatform.isDarwin ''