On Wed, Oct 01, 2025 at 09:18:47AM +1000, Darren Tucker wrote:> On Tue, Sep 30, 2025 at 09:28:10PM +0000, Job Snijders wrote: > > On Tue, Sep 30, 2025 at 03:02:54PM +0100, Sevan Janiyan wrote: > > > On Darwin, if you extract the snapshot archive from the GUI, and there's > > > already a directory named openssh present, the system adds a number to the > > > directory name to avoid what's in place. e.g "openssh 2" > > > When it comes to configuring, the "checking compiler and flags for sanity" > > > fails with "clang: error: no such file or directory: > > > '2/openbsd-compat/include'" > > > > I'm not sure that can be fixed. Seems autoconf doesn't work well with > > whitespaces > > We can't fix it in configure, but we *can* punt the problem to make: > > Sevan: please try this patch. You will need to run "autoreconf" after > applying it to rebuild configure.Sigh. Didn't wait long enough into the test and it needed another set of quotes. Please try this instead. diff --git a/Makefile.in b/Makefile.in index 769ec17f4..760fbaa5b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,6 +33,7 @@ STRIP_OPT=@STRIP_OPT@ TEST_SHELL=@TEST_SHELL@ BUILDDIR=@abs_top_builddir@ SK_STANDALONE=@SK_STANDALONE@ +COMPATINCLUDES="$(BUILDDIR)/@COMPATINCLUDES@" PATHS= -DSSHDIR=\"$(sysconfdir)\" \ -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ @@ -50,7 +51,7 @@ CC=@CC@ LD=@LD@ CFLAGS=@CFLAGS@ CFLAGS_NOPIE=@CFLAGS_NOPIE@ -CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ +CPPFLAGS=-I. -I$(srcdir) -I$(COMPATINCLUDES) @CPPFLAGS@ $(PATHS) @DEFS@ PICFLAG=@PICFLAG@ LIBS=@LIBS@ CHANNELLIBS=@CHANNELLIBS@ diff --git a/configure.ac b/configure.ac index 819e83689..3eb6d4697 100644 --- a/configure.ac +++ b/configure.ac @@ -526,7 +526,7 @@ AC_CHECK_HEADERS([ \ # platform. Usually these are just empty, but in some cases they'll include # the equivalent file. This avoids having to wrap those includes in # '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes. -compatincludes=no +COMPATINCLUDES="" AC_CHECK_HEADERS([ \ endian.h \ ifaddrs.h \ @@ -541,8 +541,8 @@ AC_CHECK_HEADERS([ \ sys/un.h \ time.h \ util.h], [], [ - compatincludes="`pwd`/openbsd-compat/include" - header="$compatincludes/$ac_header" + COMPATINCLUDES="openbsd-compat/include" + header="$COMPATINCLUDES/$ac_header" dir=`dirname "$header"` mkdir -p "$dir" case "$ac_header" in @@ -552,9 +552,7 @@ AC_CHECK_HEADERS([ \ *) ;; esac >"$header" ]) -if test "$compatincludes" != "no"; then - CPPFLAGS="$CPPFLAGS -I$compatincludes" -fi +AC_SUBST([COMPATINCLUDES]) AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [ #ifdef HAVE_SYS_TYPES_H diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in index 1d549954f..5bce2b38b 100644 --- a/openbsd-compat/Makefile.in +++ b/openbsd-compat/Makefile.in @@ -120,3 +120,4 @@ clean: distclean: clean rm -f Makefile *~ + rm -rf include -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Please see inline On Wed, Oct 01, 2025 at 10:00:16AM +1000, Darren Tucker wrote:> diff --git a/Makefile.in b/Makefile.in > index 769ec17f4..760fbaa5b 100644 > --- a/Makefile.in > +++ b/Makefile.in > @@ -33,6 +33,7 @@ STRIP_OPT=@STRIP_OPT@ > TEST_SHELL=@TEST_SHELL@ > BUILDDIR=@abs_top_builddir@ > SK_STANDALONE=@SK_STANDALONE@ > +COMPATINCLUDES="$(BUILDDIR)/@COMPATINCLUDES@" > > PATHS= -DSSHDIR=\"$(sysconfdir)\" \ > -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ > @@ -50,7 +51,7 @@ CC=@CC@ > LD=@LD@ > CFLAGS=@CFLAGS@ > CFLAGS_NOPIE=@CFLAGS_NOPIE@ > -CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ > +CPPFLAGS=-I. -I$(srcdir) -I$(COMPATINCLUDES) @CPPFLAGS@ $(PATHS) @DEFS@ > PICFLAG=@PICFLAG@ > LIBS=@LIBS@ > CHANNELLIBS=@CHANNELLIBS@ > diff --git a/configure.ac b/configure.ac > index 819e83689..3eb6d4697 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -526,7 +526,7 @@ AC_CHECK_HEADERS([ \ > # platform. Usually these are just empty, but in some cases they'll include > # the equivalent file. This avoids having to wrap those includes in > # '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes. > -compatincludes=no > +COMPATINCLUDES="" > AC_CHECK_HEADERS([ \ > endian.h \ > ifaddrs.h \ > @@ -541,8 +541,8 @@ AC_CHECK_HEADERS([ \ > sys/un.h \ > time.h \ > util.h], [], [ > - compatincludes="`pwd`/openbsd-compat/include" > - header="$compatincludes/$ac_header" > + COMPATINCLUDES="openbsd-compat/include" > + header="$COMPATINCLUDES/$ac_header" > dir=`dirname "$header"` > mkdir -p "$dir" > case "$ac_header" in > @@ -552,9 +552,7 @@ AC_CHECK_HEADERS([ \ > *) ;; > esac >"$header" > ]) > -if test "$compatincludes" != "no"; then > - CPPFLAGS="$CPPFLAGS -I$compatincludes" > -fi > +AC_SUBST([COMPATINCLUDES]) > > AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [ > #ifdef HAVE_SYS_TYPES_HThe above chunk helps a bit in relationship to the reproducer that OP provided (I tested on Debian 13): autoreconf && ./configure && make pass. However, 'make tests' throws this error: job at kali:~/openssh/o 2/openssh$ make tests Makefile:729: warning: ignoring prerequisites on suffix rule definition /usr/bin/mkdir -p `pwd`/regress/unittests/test_helper /usr/bin/mkdir -p `pwd`/regress/unittests/authopt /usr/bin/mkdir -p `pwd`/regress/unittests/bitmap /usr/bin/mkdir -p `pwd`/regress/unittests/conversion /usr/bin/mkdir -p `pwd`/regress/unittests/hostkeys /usr/bin/mkdir -p `pwd`/regress/unittests/kex /usr/bin/mkdir -p `pwd`/regress/unittests/match /usr/bin/mkdir -p `pwd`/regress/unittests/misc /usr/bin/mkdir -p `pwd`/regress/unittests/sshbuf /usr/bin/mkdir -p `pwd`/regress/unittests/sshkey /usr/bin/mkdir -p `pwd`/regress/unittests/sshsig /usr/bin/mkdir -p `pwd`/regress/unittests/utf8 /usr/bin/mkdir -p `pwd`/regress/misc/sk-dummy /usr/bin/mkdir -p `pwd`/regress/misc/ssh-verify-attestation [ -f `pwd`/regress/Makefile ] || \ ln -s `cd . && pwd`/regress/Makefile `pwd`/regress/Makefile /usr/bin/bash: line 1: [: /home/job/openssh/o: binary operator expected ln: target '2/openssh/regress/Makefile': No such file or directory make: *** [Makefile:547: regress-prep] Error 1 And the below chunk does not apply cleanly to openssh-SNAP-20251001.tar.gz:> diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in > index 1d549954f..5bce2b38b 100644 > --- a/openbsd-compat/Makefile.in > +++ b/openbsd-compat/Makefile.in > @@ -120,3 +120,4 @@ clean: > > distclean: clean > rm -f Makefile *~ > + rm -rf include