mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
guile-zlib: fix path to zlib
- add patch changing path to `libz.so` from `libdir` to `sharedlibdir`
variable from `zlib.pc`
In `guile-zlib` default way of finding `libz.so` is to load `zlib.pc`
with `PKG_CHECK_MODULES` macro and take path from `libdir` variable
inside.
After change in:
https://www.github.com/NixOS/nixpkgs/pull/476830
ff59162e82
`libdir` variable in `zlib.pc` points to `zlib.static`, so only `libz.a`
is there.
Add patch fixing `configure.ac` to load path from `sharedlibdir` instead.
Fixes build failure of `guile-zlib`:
```
make check-TESTS
make[1]: Entering directory '/build/source'
make[2]: Entering directory '/build/source'
make[2]: *** [Makefile:873: tests/zlib.log] Error 1
make[2]: Leaving directory '/build/source'
make[1]: *** [Makefile:856: check-TESTS] Error 2
make[1]: Leaving directory '/build/source'
make: *** [Makefile:1059: check-am] Error 2
```
zlib.log:
```
Backtrace:
19 (primitive-load-path "tests/zlib.scm")
...
In unknown file:
2 (primitive-load-path "zlib" #<procedure 7fffeee418c0 at
ice-9/boot-9.scm:3603:37 ()>)
In zlib.scm:
486:25 1 (_)
486:25 0 (_)
zlib.scm:486:25: Wrong type to apply: #f
```
This commit is contained in:
parent
9409a78ca4
commit
682ba25a29
2 changed files with 17 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -30,7 +30,7 @@ fi
|
||||
|
||||
PKG_CHECK_MODULES([LIBZ], [zlib])
|
||||
AC_MSG_CHECKING([libz library directory])
|
||||
-PKG_CHECK_VAR([LIBZ_LIBDIR], [zlib], [libdir])
|
||||
+PKG_CHECK_VAR([LIBZ_LIBDIR], [zlib], [sharedlibdir])
|
||||
AC_MSG_RESULT([$LIBZ_LIBDIR])
|
||||
AS_IF([test "x$LIBZ_LIBDIR" = "x"], [
|
||||
AC_MSG_FAILURE([Unable to identify libz lib path.])
|
||||
|
|
@ -21,6 +21,11 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
hash = "sha256-aaZhwHimQq408DNtHy442kh/EYdRdxP0Z1tQGDKmkmc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix path to libz.so to sharedlibdir from zlib.pc
|
||||
./guile-zlib-change-zlib-path-from-libdir-to-sharedlibdir.diff
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue