From: Boris Pigin <boris.pigin@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, sam@gentoo.org
Subject: Re: man-page-6.10 make share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'
Date: Mon, 10 Feb 2025 15:49:18 +0100 [thread overview]
Message-ID: <85dc5eac-0f70-41cd-9343-6cf4ea5ec8bc@gmail.com> (raw)
In-Reply-To: <uvn4vqmdrmsamjjf7n36dtiqndrvbjmipja3iihr4ulcafmqh2@qjo6w36av6wn>
Hallo Alex!
Nice!
I have to thank!
And have a nice day too!
Boris
On 2/10/25 12:03, Alejandro Colomar wrote:
> Hi Boris,
>
> On Mon, Feb 10, 2025 at 09:56:40AM +0100, Boris Pigin wrote:
>> Hi Alex,
>>
>> as my email was rejected by the mailing list due to containing HTML part
>> here is the second try.
> [...]
>
>> ╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:50:38 🖿 ~/test/man-pages-6.10 🧬
>> 📦 🐾14
>> ╰ $ make -version
>> GNU Make 4.2.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2016 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
> This seems to be the problem. I hadn't used such an old version of
> make(1) in a long time. I've been able to reproduce the problem in a
> Docker container with Debian Buster.
>
> root@b3cfb66d7016:/# wget https://kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.gz >/dev/null 2>&1
> root@b3cfb66d7016:/# ls
> bin dev home lib64 media opt root sbin sys usr
> boot etc lib man-pages-6.10.tar.gz mnt proc run srv tmp var
> root@b3cfb66d7016:/# tar xf man-pages-6.10.tar.gz
> root@b3cfb66d7016:/# rm man-pages-6.10.tar.gz
> root@b3cfb66d7016:/# ls
> bin dev home lib64 media opt root sbin sys usr
> boot etc lib man-pages-6.10 mnt proc run srv tmp var
> root@b3cfb66d7016:/# cd man-pages-6.10/
> root@b3cfb66d7016:/man-pages-6.10# make | wc -l; echo $?
> /man-pages-6.10/share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'. Stop.
> 0
> 0
> root@b3cfb66d7016:/man-pages-6.10# cat /etc/os-release
> PRETTY_NAME="Debian GNU/Linux 10 (buster)"
> NAME="Debian GNU/Linux"
> VERSION_ID="10"
> VERSION="10 (buster)"
> VERSION_CODENAME=buster
> ID=debian
> HOME_URL="https://www.debian.org/"
> SUPPORT_URL="https://www.debian.org/support"
> BUG_REPORT_URL="https://bugs.debian.org/"
> root@b3cfb66d7016:/man-pages-6.10# make -v
> GNU Make 4.2.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2016 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> It seems to be a make(1) bug? (Or maybe a simpler, older
> specification.) It is caused by the '#' in the string. make(1)
> probably interprets it as the start of a comment.
>
> The problem also triggers in another place:
>
> CPP_HAS_ALREADY_D_FORTIFY_SOURCE := \
> $(shell \
> $(CPP) -dM - -Wno-error </dev/null \
> | $(GREP) '#define _FORTIFY_SOURCE ' >/dev/null \
> && $(ECHO) yes \
> || $(ECHO) no; \
> )
>
> It's surprising that I haven't triggered issues with old make(1) before.
> I have now tried 6.9.1 there, and it works (I see some pages reporting
> issues, but the makefile does work).
>
> I've pushed a fix to the contrib branch, and will try to make a new
> release in a few days.
> <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=a0d5f1961dfd8eb3af2b0ece845448a42c492ae0>
>
> commit a0d5f1961dfd8eb3af2b0ece845448a42c492ae0 (HEAD -> contrib, alx/contrib)
> Author: Alejandro Colomar <alx@kernel.org>
> Date: Mon Feb 10 11:56:01 2025 +0100
>
> share/mk/: Escape '#' in regexes
>
> GNU make(1) 4.2 seems to be interpreting those characters as the start
> of a comment, so we need to escape them. That seems to calm those old
> versions of make(1), and doesn't affect negatively the newer ones, and
> doesn't negatively affect grep(1) either.
>
> Fixes: 35a780a99bd8 (2024-07-20; "share/mk/: CPPFLAGS: Only define _FORTIFY_SOURCE if it's not already defined")
> Fixes: 2130162900ab (2024-11-03; "share/mk/, etc/shellcheck/: lint-sh: Add target to lint shell scripts")
> Reported-by: Boris Pigin <boris.pigin@gmail.com>
> Cc: Sam James <sam@gentoo.org>
> Signed-off-by: Alejandro Colomar <alx@kernel.org>
>
> diff --git a/share/mk/configure/build-depends/cpp/cpp.mk b/share/mk/configure/build-depends/cpp/cpp.mk
> index 594215892..65da77f84 100644
> --- a/share/mk/configure/build-depends/cpp/cpp.mk
> +++ b/share/mk/configure/build-depends/cpp/cpp.mk
> @@ -19,7 +19,7 @@ CPP ?= $(CC) $(CFLAGS_) -E
> CPP_HAS_ALREADY_D_FORTIFY_SOURCE := \
> $(shell \
> $(CPP) -dM - -Wno-error </dev/null \
> - | $(GREP) '#define _FORTIFY_SOURCE ' >/dev/null \
> + | $(GREP) '\#define _FORTIFY_SOURCE ' >/dev/null \
> && $(ECHO) yes \
> || $(ECHO) no; \
> )
> diff --git a/share/mk/src/sh.mk b/share/mk/src/sh.mk
> index 487eaf14d..05c9e0449 100644
> --- a/share/mk/src/sh.mk
> +++ b/share/mk/src/sh.mk
> @@ -14,7 +14,7 @@ include $(MAKEFILEDIR)/configure/directory_variables/src.mk
>
>
> BIN_sh := $(shell $(FIND) $(SRCBINDIR) -type f \
> - | $(XARGS) $(GREP) -l '^#!/bin/\(sh\|bash\)\>' \
> + | $(XARGS) $(GREP) -l '^\#!/bin/\(sh\|bash\)\>' \
> | $(SORT))
>
>
> Thanks for the report!
>
>
> Have a lovely day!
> Alex
>
next prev parent reply other threads:[~2025-02-10 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <38f900b3-28f2-4854-bec3-5b79759eb5b6@gmail.com>
[not found] ` <ytgxskuvjqldvv4amftqx27t4fh7lpw32nwyirjdxkeazduyxo@vfi5tfoa72h6>
[not found] ` <26a527c3-f7dd-470d-8b19-c6ac45a33e7a@gmail.com>
[not found] ` <eb65be1e-b885-442d-806e-ca209576ccbc@gmail.com>
2025-02-09 21:27 ` man-page-6.10 make share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')' Alejandro Colomar
2025-02-10 8:56 ` Boris Pigin
2025-02-10 11:03 ` Alejandro Colomar
2025-02-10 14:49 ` Boris Pigin [this message]
2025-02-16 15:03 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85dc5eac-0f70-41cd-9343-6cf4ea5ec8bc@gmail.com \
--to=boris.pigin@gmail.com \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=sam@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox