On Sat, Sep 10, 2016 at 2:00 PM, Assaf Gordon <assafgor...@gmail.com> wrote:
> Hello Jim and all,
>
>> On Sep 10, 2016, at 14:44, Jim Meyering <j...@meyering.net> wrote:
>>
>> Finally, here is a similar change, but now for gnu sed. For it, I also
>> had to make some small code changes to adapt to the new
>> localeinfo.[ch] and to the dfasyntax API change. I'll wait a day or so
>> before pushing this, just in case:
>> <sed-use-gnulib-dfa-module.diff>
>
> for sed,
> It seems that pulling the latest gnulib (the first out of the two commits in 
> the attached diff) causes the following link error (at least on mac os x):
>
>   [...]
>   make[2]: Nothing to be done for `all'.
>   Making all in .
>     CCLD     sed/sed
>   Undefined symbols for architecture x86_64:
>     "_strverscmp", referenced from:
>         _compile_program in sed_sed-compile.o
>   ld: symbol(s) not found for architecture x86_64
>   clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>   make[2]: *** [sed/sed] Error 1
>   make[1]: *** [all-recursive] Error 1

Thanks for reporting that.
I've pushed the attached to gnulib to address that:
From 8e114d39d2034f8aa8639ee82eeab702ec37e93f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Sat, 10 Sep 2016 17:50:58 -0700
Subject: [PATCH] strverscmp: avoid link failure on OS X

* lib/strverscmp.c [!weak_alias]: Define __strverscmp to strverscmp.
Reported by Assaf Gordon in https://bugs.gnu.org/24256#26
---
 ChangeLog        | 6 ++++++
 lib/strverscmp.c | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0adaef9..d37fdae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-10  Jim Meyering  <meyer...@fb.com>
+
+       strverscmp: avoid link failure on OS X
+       * lib/strverscmp.c [!weak_alias]: Define __strverscmp to strverscmp.
+       Reported by Assaf Gordon in https://bugs.gnu.org/24256#26
+
 2016-08-16  Jim Meyering  <meyer...@fb.com>

        dfa: new module, importing grep's DFA matcher
diff --git a/lib/strverscmp.c b/lib/strverscmp.c
index a23e47f..d0f9644 100644
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -35,6 +35,9 @@
 #define  CMP    2
 #define  LEN    3

+#ifndef weak_alias
+# define __strverscmp strverscmp
+#endif

 /* Compare S1 and S2 as strings holding indices/version numbers,
    returning less than, equal to or greater than zero if S1 is less than,
-- 
2.7.4

Reply via email to