Discussion:
guile-gdbm doesn't work with gdbm-1.14
宋文武
2018-03-18 08:39:49 UTC
Permalink
Hello, since version 1.14, gdbm doesn't export "gdbm_errno" anymore [1],
so the guile-gdbm ffi binding code [2] need updates now (I'm not
confident to do it myself...).

[1] http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=c175231e2781abd17eabf412cfb597654a076c7b
[2] https://github.com/ijp/guile-gdbm/blob/master/gdbm.scm#L156
Mark H Weaver
2018-03-18 13:50:32 UTC
Permalink
Post by 宋文武
Hello, since version 1.14, gdbm doesn't export "gdbm_errno" anymore [1],
so the guile-gdbm ffi binding code [2] need updates now (I'm not
confident to do it myself...).
[1] http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=c175231e2781abd17eabf412cfb597654a076c7b
[2] https://github.com/ijp/guile-gdbm/blob/master/gdbm.scm#L156
Here's a preliminary fix.

Mark
Ricardo Wurmus
2018-03-19 10:20:15 UTC
Permalink
Post by Mark H Weaver
Post by 宋文武
Hello, since version 1.14, gdbm doesn't export "gdbm_errno" anymore [1],
so the guile-gdbm ffi binding code [2] need updates now (I'm not
confident to do it myself...).
[1] http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=c175231e2781abd17eabf412cfb597654a076c7b
[2] https://github.com/ijp/guile-gdbm/blob/master/gdbm.scm#L156
Here's a preliminary fix.
Thank you.
Post by Mark H Weaver
* gnu/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/guile.scm (guile-gdbm-ffi)[native-inputs]: New field.
[inputs]: Move above arguments. Add the patch, and the 'patch' program.
[propagated-inputs]: Move above arguments.
[arguments]: In the builder, add code to apply the patch.
I don’t see the native-inputs field in the patch. Shouldn’t the “patch”
and “patch-file” inputs be native-inputs?
--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
Mark H Weaver
2018-03-19 16:17:35 UTC
Permalink
Post by Ricardo Wurmus
Post by Mark H Weaver
Post by 宋文武
Hello, since version 1.14, gdbm doesn't export "gdbm_errno" anymore [1],
so the guile-gdbm ffi binding code [2] need updates now (I'm not
confident to do it myself...).
[1] http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=c175231e2781abd17eabf412cfb597654a076c7b
[2] https://github.com/ijp/guile-gdbm/blob/master/gdbm.scm#L156
Here's a preliminary fix.
Thank you.
Post by Mark H Weaver
* gnu/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/guile.scm (guile-gdbm-ffi)[native-inputs]: New field.
[inputs]: Move above arguments. Add the patch, and the 'patch' program.
[propagated-inputs]: Move above arguments.
[arguments]: In the builder, add code to apply the patch.
I don’t see the native-inputs field in the patch.
Indeed, sorry for the mistake in the commit log. Initially I made them
native inputs, but then I moved them to 'inputs'.
Post by Ricardo Wurmus
Shouldn’t the “patch” and “patch-file” inputs be native-inputs?
Yes. However, I noticed that the package already assumes a native
build, because it runs 'guile' from 'inputs' to compile the Scheme code.
Also, I wasn't sure off-hand how native-inputs are handled in the
trivial-build-system.

For purposes of this commit, I didn't want to take on the job of also
fixing this package for cross-building, which I was likely to get wrong
without testing. Given that I no longer use substitutes, that would
have been a big job.

Does that make sense?

Mark
Ludovic Courtès
2018-03-19 16:47:30 UTC
Permalink
Hello,
Post by 宋文武
Hello, since version 1.14, gdbm doesn't export "gdbm_errno" anymore [1],
so the guile-gdbm ffi binding code [2] need updates now (I'm not
confident to do it myself...).
Thanks, Mark for the quick fix.
--- /dev/null
+++ b/gnu/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch
@@ -0,0 +1,53 @@
+From 1da99396dc65993ba34ac0370ca5d6acda6a3322 Mon Sep 17 00:00:00 2001
+Date: Sun, 18 Mar 2018 07:02:37 -0400
+Subject: [PATCH] Add support for gdbm-1.14.
+
+As of gdbm-1.14, 'gdbm_errno' no longer exists as a binary interface.
+It has been replaced by 'gdbm_errno_location', a function that returns
+int*. We now use this new interface if it's available.
Ian, could you consider applying this patch upstream?

Thanks!

Ludo’.

Loading...