[Top][All Lists]

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

Re: moopp: *** The 'sed' program is not GNU sed. Try installing GNU sed.

From: Jeffrey Walton
Subject: Re: moopp: *** The 'sed' program is not GNU sed. Try installing GNU sed.
Date: Tue, 4 Feb 2020 21:36:43 -0500

On Tue, Feb 4, 2020 at 8:44 PM Bruno Haible <address@hidden> wrote:
> > I'm having trouble building GetText 1.20.1 on NetBSD. I have GNU sed
> > installed at /usr/local/bin/sed. I set the SED variable to the same:
> >
> > $ export SED=/usr/local/bin/sed
> > $ ./configure ...
> > $ make
> > ...
> > ../build-aux/moopp  ./fd-ostream.oo.c ./fd-ostream.oo.h ./ostream.oo.h
> This is surprising. In the tarball, the generated files are included
> and have a higher timestamp than the input files. Therefore 'make' should
> not invoke moopp.
> Did you make local modifications? That would explain it.

Ugh, you're right. I was doing a find on *.h and patching
__GNUC_PREQ(3, 3) to (4, 0). (It is needed for antique compilers).

This was the problem. Once I converted to a patch things were OK:

--- gettext-tools/libgrep/cdefs.h
+++ gettext-tools/libgrep/cdefs.h
@@ -51,7 +51,7 @@
    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
-# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus && __GNUC_PREREQ (4, 0)
 #  define __THROW    __attribute__ ((__nothrow__ __LEAF))
 #  define __THROWNL    __attribute__ ((__nothrow__))
 #  define __NTH(fct)    __attribute__ ((__nothrow__ __LEAF)) fct

The comments are not quite right. GCC 3.3 is a tad bit early; GCC 4.0
is needed. The compile error can be duplicated on Fedora 1 or Ubuntu

If you are interested in some other work-arounds for old compilers,
then see 
For example, GetText should feature test for __builtin_clzll because
old compilers lack it.

The patch for read-properties.c was due to a UBsan finding:

    unsigned char *utf8_string = XNMALLOC (utf8_buflen + 1, unsigned char);
    - memcpy (utf8_string, utf8_buffer, utf8_buflen);
    + if (utf8_buffer)
    +     memcpy (utf8_string, utf8_buffer, utf8_buflen);
    utf8_string[utf8_buflen] = '\0';

Thanks again.


reply via email to

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