Page MenuHomeFreeBSD

Templates/config.site: double-slash root as not distinct with single-slash root is a given on FreeBSD
AbandonedPublic

Authored by swills on Jan 13 2019, 9:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 10:18 AM
Unknown Object (File)
Jan 10 2024, 8:15 AM
Unknown Object (File)
Dec 20 2023, 1:31 AM
Unknown Object (File)
Dec 19 2023, 2:22 AM
Unknown Object (File)
Nov 3 2023, 6:31 AM
Unknown Object (File)
Sep 3 2023, 8:43 PM
Unknown Object (File)
Jul 3 2023, 12:02 AM
Unknown Object (File)
May 26 2023, 8:12 PM

Details

Reviewers
sbruno
vishwin
Group Reviewers
portmgr
Summary

Initially an IRC conversation.

When (cross-)building ports with qemu-user-static, some configure scripts check to see if double-slash root is distinct from single-slash root. These configure scripts execute wc to run this check, which hangs under qemu-user-static.

In FreeBSD, double-slash root is not distinct from single-slash root. Make that a given so the check is always "cached".

Test Plan

exp-run?

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 21946
Build 21188: arc lint + arc unit

Event Timeline

yes it is a good idea, but it will requires an exp-run

Testbuild of databases/mongodb36 can progress beyond this point with this patch.

(ahem, with poudriere under arm64.aarch64, running on a amd64 host)

I don't think this is needed, update your src tree and poudriere.

Indeed, as wc(1) is now part of native-xtools, which is what actually hangs in qemu-aarch64-static during this check, this change is no longer needed.

swills edited reviewers, added: vishwin; removed: swills.

This still seems necessary to me. There's no entry in make.nxb.conf for WC (see here) and configure for (at least) devel/gettext-runtime doesn't seem to use WC, it calls wc directly:

  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
$as_echo_n "checking whether // is distinct from /... " >&6; }
if ${gl_cv_double_slash_root+:} false; then :
  $as_echo_n "(cached) " >&6
else
   if test x"$cross_compiling" = xyes ; then
        # When cross-compiling, there is no way to tell whether // is special
        # short of a list of hosts.  However, the only known hosts to date
        # that have a distinct // are Apollo DomainOS (too old to port to),
        # Cygwin, and z/OS.  If anyone knows of another system for which // has
        # special semantics and is distinct from /, please report it to
        # <bug-gnulib@gnu.org>.
        case $host in
          *-cygwin | i370-ibm-openedition)
            gl_cv_double_slash_root=yes ;;
          *)
            # Be optimistic and assume that / and // are the same when we
            # don't know.
            gl_cv_double_slash_root='unknown, assuming no' ;;
        esac
      else
        set x `ls -di / // 2>/dev/null`
        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
          gl_cv_double_slash_root=no
        else
          gl_cv_double_slash_root=yes
        fi
      fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
$as_echo "$gl_cv_double_slash_root" >&6; }
  if test "$gl_cv_double_slash_root" = yes; then

$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h

  fi

so it would need to have /nxb-bin/usr/bin is not added to PATH, which I think we decided against at some point.

This still seems necessary to me. There's no entry in make.nxb.conf for WC (see here) and configure for (at least) devel/gettext-runtime doesn't seem to use WC, it calls wc directly:

wc should be hardlinked in the jail : https://github.com/freebsd/poudriere/blob/master/src/share/poudriere/common.sh#L2242

Ah, I see. Seems I need poudriere from git instead of ports-mgmt/poudriere-devel. Thanks.