|
From: | Daniel Richard G. |
Subject: | Re: gl_ABSOLUTE_HEADER_ONE and older seds |
Date: | Fri, 14 Oct 2011 18:45:45 -0400 |
On Fri, 2011 Oct 14 01:29+0200, Bruno Haible wrote: > > But NeXTstep is so old that you will need many many more changes until > you get the POSIX part of gnulib to compile and pass its tests. Oh, I understand. I'm not seriously intent on making gnulib work on NS; just fixing the small things that break. The real value of an ancient system like this is portability testing. If a heroic effort is needed to make something work, then sure, life's too short---but if a small change gets things going again, then why not? Especially if the change is system-agnostic, such that other odd platforms with substandard whatever may also benefit. > Just try > > $ ./gnulib-tool --create-testdir --dir=/tmp/testdir \ > --with-tests --with-c++-tests --single-configure \ > `./posix-modules` > $ cd /tmp/testdir > $ configure > $ make > $ make check Thank you; I found that --megatest was a bit unwieldy to work with! Here are my observations from running this on NS: * I don't think I've ever seen a configure script print so many no's :] * "checking whether frexp works": frexp() goes into an infinite loop when its argument is infinite, so ./conftest has to be killed for configure to move on. (Granted, this could be a quirk of running under VirtualBox...) * "checking for working sleep": alarm() apparently doesn't work when _POSIX_SOURCE is defined, so ./conftest waits forever (or 50 days) unless killed (-D_POSIX_SOURCE is needed to get DIR, among other things) * "checking whether perror matches strerror": strerror(-1) returns an invalid pointer, and attempting to puts() this yields SIGBUS. (Wouldn't it be safer to pass EPERM or something similarly universal?) Also, the test program needs string.h and stdlib.h (for strerror() and getenv(), respectively) (Is there a good way to write that m4 code so that the #include directives aren't indented in the generated source? The "#" really ought to be in the first column...) * Fixed apparent typos in shell test(1) logic in modules/popen * The bundled compiler (NeXT-modified gcc 2.5.8) doesn't know about asm labels (http://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html), erroring out with ./stdio.h:1154: illegal function definition, found `asm' I didn't see an easy way around this other than -U__GNUC__ (!) * The preprocessor doesn't like e.g. "#if !__STRICT_ANSI__", so replaced with "#if !(__STRICT_ANSI__ + 0)". (Shouldn't this really be "#if !defined(__STRICT_ANSI__)"?) ("cc -E -traditional-cpp" yielded a parse error on this, but "cc -c" actually hangs) * strcoll() on this system takes *three* arguments: size_t strcoll(char *to, size_t maxsize, const char *from); * EILSEQ doesn't exist here * sigaction() et al. are in the headers, but require -lposix to link This leads to a problem in gllib's signal.h: Because HAVE_SIGACTION is 0/undef, it assumes that struct sigaction is not defined. The former is misleadingly so, and the latter definitely false, yielding a struct- redefinition error. (Setting LIBS=-lposix isn't an option, alas, as this produces broken binaries that fail instantly with "Floating point exception") * It wants to compile lib/rewinddir.c, which is apparently Windows- specific code. (The system has rewinddir(), but in -lposix) * C++ support is completely, utterly FUBAR. No namespaces! Dropped --with-c++-tests. * Many of the tests fail to compile because their respective functions are simply not defined (e.g. test-cbrt.c, test-gethostname.c) To configure, I set this environment: AWK=/usr/local/bin/gawk GREP=/usr/local/bin/grep CPPFLAGS='-U__GNUC__ -D_POSIX_SOURCE' (Note: bash is needed, and /usr/local/bin is not in PATH) The following files are attached for your perusal: gnulib-fixes.patch: Revised and expanded patch (against git master) config.out.gz: Terminal output from (patched) configure config.log.xz: Configure log make-k-1.out.gz: Output from first invocation of "make -k" (warnings, errors) make-k-2.out.gz: Output from second invocation of "make -k" (errors only) In a nutshell, the configure script now works with no visible breakage, and most of the objects (though not all) build cleanly. It certainly got a lot farther than I expected! As for the remaining errors, some of them might be interesting corner cases. I'd be happy to test any changes you might want to try out. --Daniel -- Daniel Richard G. || address@hidden My ASCII-art .sig got a bad case of Times New Roman.
gnulib-fixes.patch
Description: Text Data
config.out.gz
Description: GNU Zip compressed data
config.log.xz
Description: application/xz
make-k-1.out.gz
Description: GNU Zip compressed data
make-k-2.out.gz
Description: GNU Zip compressed data
[Prev in Thread] | Current Thread | [Next in Thread] |