Script "configure" failed unexpectedly

When building some ports, the configure script fails.

Code:
configure: loading site script /usr/ports/Templates/config.site
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... configure: error: ls -t appears to fail.  Make sure there is not a broken alias in your environment
configure: error: newly created file is older than distributed files!
Check your system clock
===>  Script "configure" failed unexpectedly.
Please report the problem to x11@FreeBSD.org [maintainer] and attach the
"/usr/ports/x11-fonts/xf86bigfontproto/work/xf86bigfontproto-1.2.0/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.

This is just an example when building xf86bigfontproto. I have seen this one quite some other ports in past months. First my strategy was to wait for new upgrades of an related port, but this did not work out. Instead I found the same error when building other ports too.

The error message
Code:
ls -t appears to fail
seems to be totally misleading. There can absolutely nothing be found which is caused by aliases or time/date.

I've seen this identically on boxes running i386 and amd64 with RELEASE-9.2 or 10.0.

Some ports I could build removing the if construction in the configure script.

Code:
# Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
       set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
       && test "$*" != "X conftest.file $srcdir/configure"; then

       # If neither matched, then we have a broken ls.  This can happen
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
       { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&5
 $as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&2;}
    { (exit 1); exit 1; }; }
    fi

    test "$2" = conftest.file
    )
 then
    # Ok.
    :
 else
    { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 Check your system clock" >&5
 $as_echo "$as_me: error: newly created file is older than distributed files!
 Check your system clock" >&2;}
    { (exit 1); exit 1; }; }
 fi
 { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
   program_transform_name="s&\$&$program_suffix&;$program_transform_name"

I'm wondering why I did not encounter contemporaneous complaints about this error. There were some years ago, but no reason or solution I've found so far. I'm curious why I cannot build these ports while others can?
 
What is the output of date? Are you using bash? What customizations have you made to files like make.conf?
 
I still wonder about the system clock being set to UTC (or not), although I'm not sure because I've never seen it before. Please post the current contents of your /etc/rc.conf and /etc/make.conf.
 
Back
Top