[gnutls-devel] [sr #108615] Regenerating documentation fails when sed is BSD sed

Ryan Schmidt INVALID.NOREPLY at gnu.org
Mon Jul 14 08:40:46 CEST 2014


URL:
  <http://savannah.gnu.org/support/?108615>

                 Summary: Regenerating documentation fails when sed is BSD sed
                 Project: GnuTLS
            Submitted by: ryandesign
            Submitted on: Mon 14 Jul 2014 06:40:45 AM GMT
                Category: Core library
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

I found that gnutls 3.3.5 fails to build on OS X, and presumably other
BSD-derived systems like FreeBSD and OpenBSD whose "sed" program is BSD sed
instead of GNU sed, if I make a change to the sources that causes the
documentation to be regenerated, such as patching gnutls.h.in which I was
doing to resolve issue #108614. The error I encountered was:


sed -i 's/\@anchor{.*//g' functions/*
sed: 1: "functions/dane_cert_typ ...": invalid command code f
make[4]: *** [stamp_functions] Error 1


The doc Makefile uses GNU-specific sed features, such as assuming that the
argument to the "-i" flag is optional. (In BSD sed, it is required.)

I do actually have GNU sed installed as well, but under the name "gsed" (as
provided by the MacPorts "gsed" port). However, although your configure script
correctly finds this gsed, your Makefile does not make use of the $SED
variable which would have expanded to that program, but instead just uses the
program name "sed".

Ideally, your complete build system, including the documentation regeneration,
should support both BSD sed and GNU sed. Either stick with just the
capabilities that both flavors provide (e.g. always use an argument to "-i",
since GNU sed should be happy with that as well), or detect which flavor of
BSD is present and change your invocations accordingly at build time.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?108615>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




More information about the Gnutls-devel mailing list