zopencommunity / rsyncport

A file synchronization utility
Apache License 2.0
0 stars 1 forks source link

Trying to build with xxhash, #3

Closed MikeFultonDev closed 2 years ago

MikeFultonDev commented 2 years ago

The logged configuration output (<datestamp>_config.log) has:

Configure found the following issues:

- Failed to find xxhash.h for xxhash checksum support.
- Failed to find zstd.h for zstd compression support.
- Failed to find lz4.h for lz4 compression support.

Checking configure.sh, we see:

ac_fn_c_check_header_compile "$LINENO" "xxhash.h" "ac_cv_header_xxhash_h" "$ac_includes_default"
if test "x$ac_cv_header_xxhash_h" = xyes
then :
  printf "%s\n" "#define HAVE_XXHASH_H 1" >>confdefs.h

and:

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.dbg conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile

This references the variable INCLUDES

ac_fn_c_try_compile is:

ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.dbg conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
   test -z "$ac_c_werror_flag" ||
   test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile
MikeFultonDev commented 2 years ago

It looks like coreutils 'install' is not tagging files properly - in particular these header files

xlclang -I/u/fultonm/zopen/prod/xxhash/include it.c
In file included from ./it.c:1:
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:1: error: expected identifier or '('
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:2: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:3: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:4: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:5: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:6: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:7: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:8: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:9: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:11: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:12: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:13: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:15: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:16: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:17: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:18: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:19: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:20: error: non-ASCII characters are not allowed outside of literals and identifiers
/u/fultonm/zopen/prod/xxhash/include/xxhash.h:1:22: error: non-ASCII characters are not allowed outside of literals and identifiers
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Error while processing ./it.c.
CCN0793(I) Compilation failed for file ./it.c.  Object file not created.

(thanks to @jshimod for asking me if i had actually tried to compile with that header ;) )

MikeFultonDev commented 2 years ago

configure.ac has the following:

AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
    unistd.h utime.h compat.h sys/param.h ctype.h sys/wait.h sys/stat.h \
    sys/ioctl.h sys/filio.h string.h stdlib.h sys/socket.h sys/mode.h grp.h \
    sys/un.h sys/attr.h arpa/inet.h arpa/nameser.h locale.h sys/types.h \
    netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.h \
    sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \
    popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netgroup.h \
    zlib.h xxhash.h openssl/md4.h openssl/md5.h zstd.h lz4.h sys/file.h \
    bsd/string.h)
MikeFultonDev commented 2 years ago

This turned out to be that the xxhash, zstd, lz4 ports had not been re-built with the latest 'install' from coreutils. Once that was done, the file tags were ok.