octave-maintainers
[Top][All Lists]
Advanced

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

Re: build trouble on MacOS 10.5 [changeset]


From: Rob Mahurin
Subject: Re: build trouble on MacOS 10.5 [changeset]
Date: Wed, 23 Dec 2009 12:05:12 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Dec 22, 2009 at 09:00:45PM -0800, Rik wrote:
> On the other hand, since this seems to be
> required only for MAC builds I would put comments to that effect
> everywhere you insert a config.h call.  

It seems to be a gnulib requirement.  According to 
http://www.gnu.org/software/gnulib/manual/gnulib.html, 

        In the usual case where Autoconf is creating a config.h file,
        you should include config.h first, before any other include
        file. That way, for example, if config.h defines ‘restrict’ to
        be the empty string on a pre-C99 host, or a macro like
        ‘_FILE_OFFSET_BITS’ that affects the layout of data
        structures, the definition is consistent for all include
        files. Also, on some platforms macros like ‘_FILE_OFFSET_BITS’
        and ‘_GNU_SOURCE’ may be ineffective, or may have only a
        limited effect, if defined after the first system header file
        is included.

So I think that, even though this problem showed up on OSX first,
similar weirdness will happen on other systems where the C library is
not quite glibc.

> I am reluctant to rewrite the lex rule for compilation in
> src/Makefile.am.  Currently we use configure and automake to work out
> the right command to call.  I checked the patch and it does produce the
> identical call to that which configure/automake worked out for my Linux
> system, but I'm not sure that can be guaranteed into the future.
> 
> If you do go ahead, I think this shell rule would be more portable than
> Perl:
>     mv $@ address@hidden
>     echo "#ifdef HAVE_CONFIG_H\n#include <config.h>\n#endif" > $@
>     cat address@hidden >> $@
>     rm -f @<-t

Well, it would have to be echo -e, which works with bash's builtin
echo but not with my /bin/echo.  

Perl is listed as a build requirement in the file HACKING, but I don't
know where else it is used.  Since the distribution tarballs include a
lex.cc, this requirement would not affect people building from source
tarballs, only from the maintainer sources.

Cheers,
Rob


reply via email to

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