Difference between revisions of "Talk:371: Compiler Complaint"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Created page with "The test "whether build environment is sane" have nothing to do with libraries (those are tested later) or compilation at all (ditto). It seems to test ls and creating new fil...")
 
(Made slightly more efficient.)
Line 12: Line 12:
 
   # (eg FreeBSD returns the mod time of the symlink's containing
 
   # (eg FreeBSD returns the mod time of the symlink's containing
 
   # directory).
 
   # directory).
   if (
+
   if ! (
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
   if test "$*" = "X"; then
 
   if test "$*" = "X"; then
Line 36: Line 36:
 
   )
 
   )
 
   then
 
   then
  # Ok.
 
  :
 
  else
 
 
   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 
   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 
   Check your system clock" >&5
 
   Check your system clock" >&5
Line 48: Line 45:
 
   echo "${ECHO_T}yes" >&6; }
 
   echo "${ECHO_T}yes" >&6; }
 
-- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 10:15, 17 September 2013 (UTC)
 
-- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 10:15, 17 September 2013 (UTC)
 +
 +
Made slightly more efficient. [[Special:Contributions/173.245.54.31|173.245.54.31]] 14:11, 22 March 2014 (UTC)

Revision as of 14:11, 22 March 2014

The test "whether build environment is sane" have nothing to do with libraries (those are tested later) or compilation at all (ditto). It seems to test ls and creating new files. Failing this test will surely means lot of problems, but certainly there are other possible sources of problems (some tested later), so not sure why it's labeled this way ... there is probably interresting history behind this.

The test goes like this (example taken from coreutils-5.94):

 { echo "$as_me:$LINENO: checking whether build environment is sane" >&5
 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
 # 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".
     { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&5
 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
  { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 Check your system clock" >&5
 echo "$as_me: error: newly created file is older than distributed files!
 Check your system clock" >&2;}
  { (exit 1); exit 1; }; }
 fi
 { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }

-- Hkmaly (talk) 10:15, 17 September 2013 (UTC)

Made slightly more efficient. 173.245.54.31 14:11, 22 March 2014 (UTC)