Mailing List Archive

Compile error with unresolved string replacement?
I've recently (~2 months ago?) started getting this failure during
complication of the git version:

$ make
Makefile:684: warning: ignoring prerequisites on suffix rule definition
(cd openbsd-compat && make)
make[1]: Entering directory '/Users/larry/git/openssh-portable/BUILD-RENAMEME/openbsd-compat'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/Users/larry/git/openssh-portable/BUILD-RENAMEME/openbsd-compat'
cc -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect2.o mux.o ssh-sk-client.o -L. -Lopenbsd-compat/ -L/Users/larry/lib -fstack-protector-strong -pie -lssh -lopenbsd-compat -lcrypto -lz -lresolv @CHANNELLIBS@
clang: error: no such file or directory: '@CHANNELLIBS@'
make: *** [Makefile:207: ssh] Error 1

I assume there's some string replacement that's failing to replace
“@CHANNELLIBS@” with the appropriate value.

This is on MacOS

$ uname -a
Darwin <hostname> 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64

with Apple clang

$ cc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

But the same error occurs with gcc.

Thanks,
· Larry
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Compile error with unresolved string replacement? [ In reply to ]
On Mon, 29 Aug 2022 at 03:54, Larry Ploetz <lploetz@gmail.com> wrote:
[...]
> clang: error: no such file or directory: '@CHANNELLIBS@'
> make: *** [Makefile:207: ssh] Error 1
>
> I assume there's some string replacement that's failing to replace
> “@CHANNELLIBS@” with the appropriate value.

That's done by configure. You probably just need to run "autoreconf"
and "./configure".

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Compile error with unresolved string replacement? [ In reply to ]
Oh, seems so obvious in retrospect. It used to be that the error message
suggested running autoreconf (config, make), but since I didn't get that
message I didn't think to run autoreconf.

Thanks - worked!

On 2022-08-28 13:39 :35, Darren Tucker wrote:
> On Mon, 29 Aug 2022 at 03:54, Larry Ploetz<lploetz@gmail.com> wrote:
> [...]
>> clang: error: no such file or directory: '@CHANNELLIBS@'
>> make: *** [Makefile:207: ssh] Error 1
>>
>> I assume there's some string replacement that's failing to replace
>> “@CHANNELLIBS@” with the appropriate value.
> That's done by configure. You probably just need to run "autoreconf"
> and "./configure".
>
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Compile error with unresolved string replacement? [ In reply to ]
On Sun, Aug 28, 2022 at 06:44:41PM -0700, Larry Ploetz wrote:
> Oh, seems so obvious in retrospect. It used to be that the error message
> suggested running autoreconf (config, make), but since I didn't get that
> message I didn't think to run autoreconf.
>
> Thanks - worked!

You're welcome.

We have a check in configure the will error out if configure.ac is newer
than configure. We could potentially do something similar in Makefile
for the files created by configure eg below, but having tried it briefly
I don't think we should do this.

This is because configure will not replace files like Makefile or config.h
if they are unchanged from the previous run (which is desirable behaviour
most of the time), but that also means that when configure is updated in
a way that doesn't change the output, rerunning it will never allow it
to pass the check.

diff --git a/Makefile.in b/Makefile.in
index 778c66cf..f839f0ea 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -198,6 +198,14 @@ LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
$(LIBCOMPAT): always
(cd openbsd-compat && $(MAKE))
always:
+ for src in configure Makefile.in openbsd-compat/Makefile.in; do \
+ for gen in config.h Makefile openbsd-compat/Makefile; do \
+ if test "$$gen" -ot "$(srcdir)/$$src"; then \
+ echo Warning: $$gen older than configure, rerun configure; \
+ exit 1; \
+ fi \
+ done \
+ done

libssh.a: $(LIBSSH_OBJS)
$(AR) rv $@ $(LIBSSH_OBJS)

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev