bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: George Valkov <gvalkov@gmail.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>, 61386@debbugs.gnu.org
Subject: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS
Date: Tue, 21 Mar 2023 20:48:41 +0200	[thread overview]
Message-ID: <6744D8CE-6EA5-4C86-9F73-71BE3CD94CA2@gmail.com> (raw)
In-Reply-To: <cdf768b3-787a-855c-7b29-93982065ce84@draigBrady.com>


> On 2023-03-21, at 8:21 PM, Pádraig Brady <P@draigBrady.com> wrote:
> 
> On 21/03/2023 18:08, George Valkov wrote:
>>> On 2023-03-21, at 7:32 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
>>> 
>>> On 3/21/23 08:27, George Valkov wrote:
>>>> However since the old m4-1.4.19 in under tools/m4, coreutils builds with the legacy version:
>>> 
>>> If you're building from that tarball, coreutils doesn't need m4. I just now double-checked that, in an environment that didn't have m4. "./configure && make check" succeeded. So the m4 version should be irrelevant.
>> Yes, I can confirm that a stand-alone build using your instructions works. I do not have enough experience with the OpenWRT build system, but what I can see is that at some point it tries to run staging_dir/host/bin/m4
>> And that’s why I had the impression that the legacy version of m4 is used. I might be wrong, and maybe it just needs that executable, since when tools/m4 is present, tools/coreutils builds and works. If the m4 directory from the tarball is used, then everything’s fine, we can keep tools/m4 as it is.
>> staging_dir/host/bin/m4 is compiled from tools/m4 and does not exist without tools/m4, so the build fails if I remove it. If I create a link to /usr/local/Cellar/m4/1.4.19/bin/m4, that part of the build succeeds, but then we also need to apply the following patch:
>> https://github.com/openwrt/openwrt/blob/master/tools/coreutils/patches/001-m4.patch
>> Do you know if the patch is applied upstream in coreutils?
> 
> Yes if that m4 file is patched then m4 will need to run to regen stuff.
> Though the existing m4 tool should be fine for that.
> I would look at figuring out why that m4 tool is not available in your env.
> Perhaps you need to define an M4 env variable or something.
> 
> The openwrt m4 patch originates from
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=c5608227
> and that pattern seems to have originated from:
> https://github.com/openwrt/packages/issues/14120#issuecomment-749438742
> For the patch not to be needed it would need to be applied to gnulib,
> but I don't know how general it is.

Thanks, Pádraig!

The OpenWRT build system is designed to work on many platforms. To achieve this, some helper host tools are compiled and used later. These tools are installed in staging_dir/host/bin, and they are used during the build instead of whatever is installed on the system. On macOS for example the default version of m4 is old and does not support the --gnu switch, so it is not suitable for the build. Hence OpenWRT compiles a working version and uses it during the build.

Without the patch, the OpenWRT tools/coreutils build fails. Build log:
https://httpstorm.com/share/.openwrt/test/2023-02-06_coreutils-9.1/2023-03-21-openwrt-build-coreutils-9.2-no-patch.txt

With the patch it builds correctly. The target cross-platform build for coreutils does not use the patch and builds correctly. A regular build outside of OpenWRT also does not need the patch. This seems like improperly configured include search path or environment on OpenWRT side. So I guess it would be best if we can fix that and go without the patch.

At this point I believe that toos/m4 is only used to produce the executable, and so it does not require any changes since the m4 directory that comes with coreutils is used.


Cheers mate!

Georgi Valkov
httpstorm.com
nano RTOS





  reply	other threads:[~2023-03-21 18:49 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  9:20 bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS George Valkov
2023-02-09 11:56 ` Pádraig Brady
     [not found]   ` <21A1241D-B890-4796-926F-E8712E2A807B@gmail.com>
2023-02-09 16:32     ` Pádraig Brady
2023-02-09 17:23       ` George Valkov
2023-02-09 21:35         ` Pádraig Brady
2023-02-10  1:03           ` George Valkov
2023-02-10  9:14             ` Pádraig Brady
2023-02-10  3:57 ` Paul Eggert
2023-02-10  9:18   ` Pádraig Brady
2023-02-10 12:13     ` George Valkov
2023-02-10 14:02       ` Pádraig Brady
2023-02-10 17:24         ` George Valkov
2023-02-10 18:58           ` Pádraig Brady
2023-02-10 20:06             ` George Valkov
2023-02-10 20:45             ` Paul Eggert
2023-02-10 21:35               ` George Valkov
2023-02-10 21:50                 ` Paul Eggert
2023-02-10 22:02                   ` Pádraig Brady
2023-02-11  1:27                     ` George Valkov
2023-02-11 18:19                       ` Paul Eggert
2023-02-11 20:39                         ` George Valkov
2023-02-11  1:21                   ` George Valkov
2023-02-11 21:53                     ` Paul Eggert
2023-02-12  0:38                       ` George Valkov
2023-02-12  0:47                         ` Paul Eggert
2023-02-12  2:18                           ` George Valkov
2023-02-12 14:15                       ` Pádraig Brady
2023-02-12 20:36                         ` Pádraig Brady
2023-02-12 23:37                           ` George Valkov
2023-02-13 14:15                             ` Pádraig Brady
2023-02-13 14:05                           ` Pádraig Brady
2023-02-13 17:16                             ` George Valkov
2023-02-13 17:21                               ` George Valkov
2023-02-13 18:04                               ` Pádraig Brady
2023-02-14  6:12                               ` Paul Eggert
2023-02-14  7:04                                 ` George Valkov
2023-02-14 12:12                                 ` Pádraig Brady
2023-02-14 19:02                                   ` Paul Eggert
2023-02-15  9:43                                     ` Pádraig Brady
2023-02-15 10:56                                       ` Paul Eggert
2023-02-15 15:26                                         ` George Valkov
2023-02-15 19:48                                           ` Paul Eggert
2023-02-15 22:53                                             ` George Valkov
2023-02-16 21:32                                         ` Pádraig Brady
2023-02-16 23:41                                           ` Paul Eggert
2023-02-15 14:05                                   ` George Valkov
2023-02-15 19:26                                     ` Paul Eggert
2023-02-15 22:40                                       ` George Valkov
2023-02-16 19:41                                         ` George Valkov
2023-02-19  6:08                                           ` Paul Eggert
2023-02-19 16:31                                             ` Pádraig Brady
2023-02-20 10:21                                             ` George Valkov
2023-02-20 15:02                                             ` George Valkov
2023-02-20 17:49                                               ` Pádraig Brady
2023-02-20 19:35                                                 ` George Valkov
2023-02-20 21:14                                                   ` Pádraig Brady
2023-02-20 21:25                                                     ` George Valkov
2023-02-22 13:59                                                       ` George Valkov
2023-02-23 22:23                                                     ` Paul Eggert
2023-02-24  0:51                                                       ` Pádraig Brady
2023-02-24 14:33                                                       ` George Valkov
2023-02-24 15:43                                                         ` Pádraig Brady
2023-02-24 19:34                                                           ` George Valkov
2023-02-24 22:06                                                           ` George Valkov
2023-02-24 22:47                                                             ` Pádraig Brady
2023-02-24 23:23                                                               ` George Valkov
2023-02-25 12:27                                                                 ` Pádraig Brady
2023-03-06  7:37                                                                   ` Paul Eggert
2023-03-06 11:13                                                                     ` Pádraig Brady
2023-03-06 23:48                                                                       ` Paul Eggert
2023-03-07  0:31                                                                         ` Pádraig Brady
2023-03-07 21:53                                                                           ` Paul Eggert
2023-03-07 23:16                                                                             ` Pádraig Brady
2023-03-11  7:29                                                                             ` George Valkov
2023-03-11 14:28                                                                               ` Pádraig Brady
2023-03-21 11:55                                                                                 ` George Valkov
2023-03-21 14:49                                                                                   ` Paul Eggert
2023-03-21 15:27                                                                                     ` George Valkov
2023-03-21 17:32                                                                                       ` Paul Eggert
2023-03-21 18:08                                                                                         ` George Valkov
2023-03-21 18:21                                                                                           ` Pádraig Brady
2023-03-21 18:48                                                                                             ` George Valkov [this message]
2023-03-06 21:49                                                                     ` George Valkov
2023-02-10 21:46               ` Pádraig Brady
2023-02-10 22:42                 ` Paul Eggert
2023-02-10 23:48                 ` George Valkov
2023-02-11  0:48                   ` Paul Eggert
2023-02-11  1:48                     ` George Valkov

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6744D8CE-6EA5-4C86-9F73-71BE3CD94CA2@gmail.com \
    --to=gvalkov@gmail.com \
    --cc=61386@debbugs.gnu.org \
    --cc=P@draigBrady.com \
    --cc=eggert@cs.ucla.edu \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).