man-page-6.10 make share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): ytgxskuvjqldvv4amftqx27t4fh7lpw32nwyirjdxkeazduyxo@vfi5tfoa72h6
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Alejandro Colomar
maintainer[CC += linux-man@]
Hi Boris,
I realized the mailing list wasn't CCd. I've added it to CC now.
Quoted 1 line · Boris Pigin
Bash and make
Hummm. I don't see why it would fail on bash and (assuming GNU) make. Especially if previous versions of man-pages releases worked well.
Quoted 5 lines · Boris Pigin
Quoted 4 lines
Hi Alex,
I'm on Funtoo.
I've also added Sam James to CC, in case he knows anything.
Quoted 24 lines
Quoted 24 lines · Alejandro Colomar
Quoted 23 lines
Hi Boris,
Quoted 8 lines · Boris Pigin
Hello Alejandro,
I see here a problem with the man-page-6.10. If I call make I get the following error
I downloaded the package from
https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.xz
I don't see the problem with the earlier version e.g. 6.9, 6.9.1.Quoted 7 lines
'''
╰ $ pwd/home/user/src/man-pages-6.10
╰ $ make/home/user/src/man-pages-6.10/share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'. Stop.
'''Hmmm, I can't reproduce the problem. Could you please run the following commands? Also, could you detail what's your shell, and what's your make(1), and what's your OS? Let's see if we can learn why that's happening.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
alx@devuan:~/tmp/foo$ wget https://kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.gz >/dev/null 2>&1 alx@devuan:~/tmp/foo$ ls man-pages-6.10.tar.gz alx@devuan:~/tmp/foo$ tar xf man-pages-6.10.tar.gz alx@devuan:~/tmp/foo$ rm man-pages-6.10.tar.gzQuoted 8 lines
Quoted 8 lines
alx@devuan:~/tmp/foo$ ls man-pages-6.10 alx@devuan:~/tmp/foo$ cd man-pages-6.10/ alx@devuan:~/tmp/foo/man-pages-6.10$ make | wc -l; echo $? 2965 0 alx@devuan:~/tmp/foo/man-pages-6.10$ make alx@devuan:~/tmp/foo/man-pages-6.10$
Can you run exactly these commands? I'm puzzled.
Have a lovely night!
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>
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:46:35 🖿 ~ 🧬 📦 🐾1 ╰ $ rm test/
rm: cannot remove 'test/': Is a directory
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:46:40 🖿 ~ 🧬 📦 🐾2 ╰ $ rm -rf test/
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:46:44 🖿 ~ 🧬 📦 🐾3 ╰ $ mkdir test
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:46:47 🖿 ~ 🧬 📦 🐾4 ╰ $ cd test
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:46:50 🖿 ~/test 🧬 📦 🐾5 ╰ $ wget https://kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.gz >/dev/null 2>&1
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:03 🖿 ~/test 🧬 📦 🐾6 ╰ $ ls
man-pages-6.10.tar.gz
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:09 🖿 ~/test 🧬 📦 🐾7 ╰ $ tar xf man-pages-6.10.tar.gz
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:17 🖿 ~/test 🧬 📦 🐾8 ╰ $ rm man-pages-6.10.tar.gz
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:22 🖿 ~/test 🧬 📦 🐾9 ╰ $ ls
man-pages-6.10
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:26 🖿 ~/test 🧬 📦 🐾10 ╰ $ cd man-pages-6.10/
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:31 🖿 ~/test/man-pages-6.10 🧬 📦 🐾11 ╰ $ make | wc -l; echo $?
/home/borisp/test/man-pages-6.10/share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'. Stop. 0
0
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:37 🖿 ~/test/man-pages-6.10 🧬 📦 🐾12 ╰ $ make
/home/borisp/test/man-pages-6.10/share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'. Stop.
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:47:43 🖿 ~/test/man-pages-6.10 🧬 📦 🐾13 ╰ $ bash -version
GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2022 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.
╭─ 🐺 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.
╭─ 🐺 borisp@blacksun bash 5.2.37 🕑09:50:45 🖿 ~/test/man-pages-6.10 🧬 📦 🐾15
Best wishes
Boris
Quoted 60 lines · Alejandro Colomar
[CC += linux-man@]
Hi Boris,
I realized the mailing list wasn't CCd. I've added it to CC now.
Quoted 1 line · Boris Pigin
Bash and make
Hummm. I don't see why it would fail on bash and (assuming GNU) make. Especially if previous versions of man-pages releases worked well.
Quoted 4 lines · Boris Pigin
Quoted 3 lines
Hi Alex,
I'm on Funtoo.
I've also added Sam James to CC, in case he knows anything.
Quoted 24 lines
Quoted 24 lines · Alejandro Colomar
Quoted 23 lines
Hi Boris,
Quoted 8 lines · Boris Pigin
Hello Alejandro,
I see here a problem with the man-page-6.10. If I call make I get the following error
I downloaded the package from
https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.xz
I don't see the problem with the earlier version e.g. 6.9, 6.9.1.Quoted 7 lines
'''
╰ $ pwd/home/user/src/man-pages-6.10
╰ $ make/home/user/src/man-pages-6.10/share/mk/src/sh.mk:16: *** unterminated call to function 'shell': missing ')'. Stop.
'''Hmmm, I can't reproduce the problem. Could you please run the following commands? Also, could you detail what's your shell, and what's your make(1), and what's your OS? Let's see if we can learn why that's happening.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
alx@devuan:~/tmp/foo$ wget https://kernel.org/pub/linux/docs/man-pages/man-pages-6.10.tar.gz >/dev/null 2>&1 alx@devuan:~/tmp/foo$ ls man-pages-6.10.tar.gz alx@devuan:~/tmp/foo$ tar xf man-pages-6.10.tar.gz alx@devuan:~/tmp/foo$ rm man-pages-6.10.tar.gzQuoted 8 lines
Quoted 8 lines
alx@devuan:~/tmp/foo$ ls man-pages-6.10 alx@devuan:~/tmp/foo$ cd man-pages-6.10/ alx@devuan:~/tmp/foo/man-pages-6.10$ make | wc -l; echo $? 2965 0 alx@devuan:~/tmp/foo/man-pages-6.10$ make alx@devuan:~/tmp/foo/man-pages-6.10$Can you run exactly these commands? I'm puzzled.
Have a lovely night!
Alex
Alejandro Colomar
maintainerHi Boris,
Quoted 4 lines · Boris Pigin
Hi Alex,
as my email was rejected by the mailing list due to containing HTML part here is the second try.
[...]
Quoted 10 lines
╭─ 🐺 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 <[email protected]> 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 <[email protected]> Cc: Sam James <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]> 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
Signature · 1 line
<https://www.alejandro-colomar.es/>
Hallo Alex!
Nice!
I have to thank!
And have a nice day too!
Boris
Quoted 126 lines · Alejandro Colomar
Hi Boris,
Quoted 4 lines · Boris Pigin
Hi Alex,
as my email was rejected by the mailing list due to containing HTML part here is the second try.
[...]
Quoted 10 lines
╭─ 🐺 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 <[email protected]> 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 <[email protected]> Cc: Sam James <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]> 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
Alejandro Colomar
maintainerHallo Boris!
Quoted 4 lines · Boris Pigin
Hallo Alex!
Nice!
I have to thank!
You're welcome! :-)
I was interested in using some new GNU make(1) feature in the future:
FOO ?:= foo
which is equivalent to
ifndef FOO
FOO := foo
endif
I guess this would be problematic to you. May I ask why you keep such an old version of GNU make(1) in your distro, when you have a very recent bash(1) for example?
Quoted 1 line
And have a nice day too!
Have a lovely day! :-)
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>