Menu

#3 Configure: Unknown --is-lightweight option

v6.0
open
None
5
2014-09-02
2014-08-31
No

In v6.0, running './configure' (on Mac OS X 10.9.4) yields the output:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/Users/jleffler/open.source/Coan/coan-6.0/missing: Unknown --is-lightweight' option Try/Users/jleffler/open.source/Coan/coan-6.0/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
...

It goes on to complete the configuration, but the message is disconcerting, especially since although it compiles OK, it doesn't test well (yet):

/Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS
FAIL: coan_case_tester.py
FAIL: coan_bulk_tester.py
FAIL: coan_spin_tester.py
FAIL: coan_symbol_rewind_tester.py
FAIL: coan_softlink_tester.py
PASS: coan_test_metrics.py
make[4]: Nothing to be done for `all'.
============================================================================
Testsuite summary for coan 6.0
============================================================================
# TOTAL: 6
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 5
# XPASS: 0
# ERROR: 0
============================================================================
See test_coan/test-suite.log
============================================================================

I will investigate some more, but I thought you might want this heads up.

Discussion

  • Mike Kinghan

    Mike Kinghan - 2014-09-01
    • assigned_to: Mike Kinghan
    • Group: v4.0 --> v6.0
     
  • Mike Kinghan

    Mike Kinghan - 2014-09-01

    Thanks for giving it a Mac OS spin Jonathan.

    I don't have the --is-lightweight gripe but I do have the warning for missing. Clearly I've seen it so often that I have stopped seeing it.

    If you delete the missing file then autoreconf -i that should install a new up-to-date one.

    Those 5 test failures are almost certainly to do with the time command on your system. After a bit of googling my guess is that ./configure finds time but that Mac OS time does not support the GNU -o option. Is that right?

     
  • Jonathan Leffler

    When I try the 'autoreconf -i', I get:

    $ autoreconf -i
    configure.ac:2: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    autoreconf: /usr/gnu64/bin/autoconf failed with exit status: 1
    $ autoreconf -i --m4_pattern_allow
    autoreconf: unrecognized option '--m4_pattern_allow'.
    autoreconf: Try '/usr/gnu/bin/autoreconf --help' for more information.
    $

    (so I'm not sure how to use m4_pattern_allow -- I guess it should be a macro invocation in configure.ac).

    The resulting './configure' fails (no big surprise given that the autoreconf failed too):

    $ ./configure
    ./configure: line 2070: syntax error near unexpected token m4' ./configure: line 2070:AC_CONFIG_MACRO_DIRS(m4)'
    $

    You're right that Mac OS X 'time' command does not support '-o' option.

     
  • Jonathan Leffler

    Background research. It appears from https://www.flameeyes.eu/autotools-mythbuster/autoconf/macros.html that AC_CONFIG_MACRO_DIRS is added to automake 1.13. The version I have installed is 1.11.1, which probably accounts for the problem (though I do have autoconf 2.69).

    With automake 1.14 installed, I removed the ./missing file, ran 'autoreconf -i', and the configure process was OK.

    You currently have AM_INIT_AUTOMAKE(1.10 no-define) in configure.ac. You might need to update that to specify 1.13 so that the AC_CONFIG_MACRO_DIRS is supported. It should only affect those who are rebuilding the configure script, not those who are using the script you provide.

     
  • Jonathan Leffler

    I say the configure process is OK. There's one residual glitch — which I think is mostly harmless, but untidy.

    checking for time... yes
    ./configure: line 4252: -g: command not found
    checking for g++... g++

    (Error message when running: ./configure --prefix=$HOME CXXFLAGS="-g -O3". When run without the command line CXXFLAGS, the error is more cryptic:

    checking for time... yes
    ./configure: line 4253: : command not found
    checking for g++... g++

    The line in configure contains just:

    ${CXXFLAGS=""}

    If that's supposed to set CXXFLAGS if it is not set, then the code should probably be:

    : ${CXXFLAGS:=""}

    where the first colon is more or less non-negotiable but the second is negotiable (it does not harm, but is not 100% necessary). Changing line 24 of configure.ac as suggested and rerunning 'autoreconf -i' and ./configure eliminates the error.

     
  • Jonathan Leffler

    Further information: (some of it in the "I'm an idiot" category, referring to the bug reporter, not the maintainer of Coan).

    The main problem turned out to be that DYLD_LIBRARY_PATH was not set correctly to pick up the G++ 4.9.1 runtime libraries that I was building with. When DYLD_LIBRARY_PATH was set correctly, the tests all pass (with the other changes described previously).

    So, with automake 1.13 or later (proven with 1.14; 1.13 inferred from documentation cited previously), a one-line change in configure.ac, 'autoreconf -i', and DYLD_LIBRARY_PATH set correctly (for most people, that would not be a problem at all), then the 'make check' tests all pass - even in the absence of the GNU time command with support for the '-o output' option.

    (GNU time 1.7 dates from 1996, and I needed to add '#include <string.h>' to getopt.c to get it to compile — which isn't bad considering that Mac OS X didn't exist when the code was packaged!)

     
  • Mike Kinghan

    Mike Kinghan - 2014-09-02

    Very good that the tests all pass, but I infer from the fact that your time seems to be good enough without -o (which it shouldn't be) that I have actually broken the test harness for picking up that time was detected, and the code confirms this. I haven't noticed when I broke it because make check should be immediately purging intermediate files that I'm only removing in make clean.

    Time for a patch release already, and I'll fix the other fluffs you found in the autotooling.

    A very useful conversation :)

     

Log in to post a comment.