groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Build of groff fails on NetBSD


From: Daiki Ueno
Subject: Re: [Groff] Build of groff fails on NetBSD
Date: Fri, 10 Apr 2015 12:33:07 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

>> groff/src/libs/libgroff/font.cpp:386: undefined reference to `rpl_wcwidth'
>
> Somehow gnulib's `wcwidth' module doesn't work on your platform, or
> isn't properly recognized.  Please send me the `config.log' file
> privately.

It seems like a link order problem which particularly happens with
static libraries[1].  The attached patch fixed the issue for me on NetBSD
6.1.4.

> Given that `wcwidth' is a POSIX.1-2001 function, I think that this
> function *should* available on your platform...

When I requested the use of `wcwidth' back in 2010, I admit I wasn't
familiar with `wchar_t' functions and didn't know that the
implementations have so many portability issues[2], which trigger
gnulib's emission of replacement functions.

Given that the uses of `wcwidth' in font.cpp are pointless[3] and the
automake migration has completed (nice work), perhaps groff could use
uc_width instead?

Footnotes: 
[1]  
http://www.gnu.org/software/libtool/manual/html_node/Multiple-dependencies.html#Multiple-dependencies

[2]  
https://gnu.org/software/libunistring/manual/libunistring.html#The-wchar_005ft-mess

[3]  http://savannah.gnu.org/bugs/?42233

Regards,
-- 
Daiki Ueno
>From f47d034bcb168a1cdb2328cc0278b80c589028ef Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Fri, 10 Apr 2015 12:21:28 +0900
Subject: [PATCH] Fix link error on NetBSD 6

Reported by address@hidden in:
<https://lists.gnu.org/archive/html/groff/2015-04/msg00000.html>.
* src/preproc/grn/grn.am (grn_LDADD): Place libgroff.a before
lib/libgnu.a.
* src/roff/troff/troff.am (troff_LDADD): Likewise.
---
 ChangeLog               | 9 +++++++++
 src/preproc/grn/grn.am  | 2 +-
 src/roff/troff/troff.am | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ef1caae..ef0f168 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-04-10  Daiki Ueno  <address@hidden>
+
+       Fix link error on NetBSD 6
+       Reported by address@hidden in:
+       <https://lists.gnu.org/archive/html/groff/2015-04/msg00000.html>.
+       * src/preproc/grn/grn.am (grn_LDADD): Change the link order of
+       libgroff.a and lib/libgnu.a according to dependency.
+       * src/roff/troff/troff.am (troff_LDADD): Likewise.
+
 2015-04-08  Werner LEMBERG  <address@hidden>
 
        Fix Savannah bug #44767.
diff --git a/src/preproc/grn/grn.am b/src/preproc/grn/grn.am
index 5bbcdb2..021bfe5 100644
--- a/src/preproc/grn/grn.am
+++ b/src/preproc/grn/grn.am
@@ -24,6 +24,6 @@ grn_SOURCES = \
   src/preproc/grn/main.cpp \
   src/preproc/grn/gprint.h
 src/preproc/grn/main.$(OBJEXT): defs.h
-grn_LDADD = lib/libgnu.a libgroff.a $(LIBM)
+grn_LDADD = libgroff.a lib/libgnu.a $(LIBM)
 PREFIXMAN1 += src/preproc/grn/grn.n
 EXTRA_DIST += src/preproc/grn/README src/preproc/grn/grn.man
diff --git a/src/roff/troff/troff.am b/src/roff/troff/troff.am
index bfffefc..5dc9d6a 100644
--- a/src/roff/troff/troff.am
+++ b/src/roff/troff/troff.am
@@ -22,7 +22,7 @@ EXTRA_DIST += \
   src/roff/troff/column.cpp \
   src/roff/troff/troff.man \
   src/roff/troff/TODO
-troff_LDADD = lib/libgnu.a libgroff.a $(LIBM)
+troff_LDADD = libgroff.a lib/libgnu.a $(LIBM)
 troff_SOURCES = \
   src/roff/troff/dictionary.cpp \
   src/roff/troff/div.cpp \
-- 
2.1.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]