GNU bug report logs - #45252
[PATCH] gnu: libffi: Add unreleased patch to fix float128 on powerpc64le.

Previous Next

Package: guix-patches;

Reported by: dftxbs3e <dftxbs3e <at> free.fr>

Date: Tue, 15 Dec 2020 09:33:01 UTC

Severity: normal

Tags: patch

Done: Chris Marusich <cmmarusich <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45252 in the body.
You can then email your comments to 45252 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Tue, 15 Dec 2020 09:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to dftxbs3e <dftxbs3e <at> free.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 15 Dec 2020 09:33:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dftxbs3e <dftxbs3e <at> free.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Tue, 15 Dec 2020 10:32:42 +0100
[Message part 1 (text/plain, inline)]
Hello!

Based on previous discussions to apply <
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44778> on the master
branch instead I submit this new patch (attached) so that it does not
cause a world rebuild by not altering the package definition hash on
other platforms.

Thank you!
[0001-gnu-libffi-Add-unreleased-patch-to-fix-float128-on-p.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Sun, 20 Dec 2020 20:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: dftxbs3e <dftxbs3e <at> free.fr>
Cc: 45252 <at> debbugs.gnu.org
Subject: Re: [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix
 float128 on powerpc64le.
Date: Sun, 20 Dec 2020 12:32:42 -0800
[Message part 1 (text/plain, inline)]
Hi,

dftxbs3e <dftxbs3e <at> free.fr> writes:

> Based on previous discussions to apply <
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44778> on the master
> branch instead I submit this new patch (attached) so that it does not
> cause a world rebuild by not altering the package definition hash on
> other platforms.

My understanding is as follows:

- Patch 44778, linked above, was committed on core-updates branch in
  4fff5ab24126a152b50c036b9bf8dc6f2740f094.
- The libffi patch in this patch (45252) is the same as it was in 44778,
  but the scheme code has been changed so that we can apply this patch
  to the master branch without causing a rebuild of many packages.

Is that right?

> +             '())
> +       ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
> +                                                (%current-system)))
> +             '(#:phases (modify-phases %standard-phases
> +                          (add-after 'unpack 'apply-patch2
> +                            (lambda* (#:key inputs #:allow-other-keys)
> +                              (let ((patch (assoc-ref inputs
> +                                                      "powerpc64le-patch")))
> +                                (invoke "patch" "--batch" "-p1"
> +                                        "-i" patch))))))
>               '())))
>      (inputs
> -     (if (string-prefix? "powerpc-" (or (%current-target-system)
> +     (cond
> +      ((string-prefix? "powerpc-" (or (%current-target-system)
>                                          (%current-system)))
> -         `(("powerpc-patch" ,@(search-patches
> -                               "libffi-3.3-powerpc-fixes.patch")))
> -         '()))
> +       `(("powerpc-patch" ,@(search-patches
> +                             "libffi-3.3-powerpc-fixes.patch"))))
> +      ((string-prefix? "powerpc64le-" (or (%current-target-system)
> +                                          (%current-system)))
> +       `(("powerpc64le-patch" ,@(search-patches
> +                                 "libffi-float128-powerpc64le.patch"))))
> +      (else '())))

Looks good to me.  I'll test it locally and update here once I've
confirmed that it doesn't cause a full rebuild when applied to master.
Assuming all goes well, I intend to revert
4fff5ab24126a152b50c036b9bf8dc6f2740f094 on core-updates and apply this
patch to master.

> +++ b/gnu/packages/patches/libffi-float128-powerpc64le.patch

Based on...

https://patchwork.ozlabs.org/project/buildroot/patch/20191124090305.1015485-1-fontaine.fabrice <at> gmail.com/

...it sounds like upstream libffi maintainers may not have merged this
patch yet.  We should probably check with them to see when they plan to
merge it into upstream, but in the meantime there's no reason not to use
the patch if it works.  Based on what Fabrice said in that thread, it
sounds like the libffi maintainers may be a bit slow in responding to
power-related bugs.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Sun, 20 Dec 2020 20:38:01 GMT) Full text and rfc822 format available.

Message #11 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: dftxbs3e <dftxbs3e <at> free.fr>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: 45252 <at> debbugs.gnu.org
Subject: Re: [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix
 float128 on powerpc64le.
Date: Sun, 20 Dec 2020 21:36:54 +0100
[Message part 1 (text/plain, inline)]
On Sun, 2020-12-20 at 12:32 -0800, Chris Marusich wrote:
> Hi,
Hello!

> My understanding is as follows:
> 
> - Patch 44778, linked above, was committed on core-updates branch in
>   4fff5ab24126a152b50c036b9bf8dc6f2740f094.
> - The libffi patch in this patch (45252) is the same as it was in
> 44778,
>   but the scheme code has been changed so that we can apply this
> patch
>   to the master branch without causing a rebuild of many packages.
> 
> Is that right?

Exactly!

> Based on...
> 
> https://patchwork.ozlabs.org/project/buildroot/patch/20191124090305.1015485-1-fontaine.fabrice <at> gmail.com/
> 
> ...it sounds like upstream libffi maintainers may not have merged
> this
> patch yet.  We should probably check with them to see when they plan
> to
> merge it into upstream, but in the meantime there's no reason not to
> use
> the patch if it works.  Based on what Fabrice said in that thread, it
> sounds like the libffi maintainers may be a bit slow in responding to
> power-related bugs.
> 

That's not true, they've merged the patch: <
https://github.com/libffi/libffi/pull/561> - they just did not make a
release yet.

Leo
[signature.asc (application/pgp-signature, inline)]

Reply sent to Chris Marusich <cmmarusich <at> gmail.com>:
You have taken responsibility. (Mon, 21 Dec 2020 01:31:01 GMT) Full text and rfc822 format available.

Notification sent to dftxbs3e <dftxbs3e <at> free.fr>:
bug acknowledged by developer. (Mon, 21 Dec 2020 01:31:02 GMT) Full text and rfc822 format available.

Message #16 received at 45252-close <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: dftxbs3e <dftxbs3e <at> free.fr>
Cc: 45252-close <at> debbugs.gnu.org
Subject: Re: [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix
 float128 on powerpc64le.
Date: Sun, 20 Dec 2020 17:30:15 -0800
[Message part 1 (text/plain, inline)]
Hi,

dftxbs3e <dftxbs3e <at> free.fr> writes:

>> Based on...
>> 
>> https://patchwork.ozlabs.org/project/buildroot/patch/20191124090305.1015485-1-fontaine.fabrice <at> gmail.com/
>> 
>> ...it sounds like upstream libffi maintainers may not have merged
>> this
>> patch yet.  We should probably check with them to see when they plan
>> to
>> merge it into upstream, but in the meantime there's no reason not to
>> use
>> the patch if it works.  Based on what Fabrice said in that thread, it
>> sounds like the libffi maintainers may be a bit slow in responding to
>> power-related bugs.
>> 
>
> That's not true, they've merged the patch: <
> https://github.com/libffi/libffi/pull/561> - they just did not make a
> release yet.

Ah, OK.  That's good to know!

I've committed this patch in 7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99 on
master.  I've also reverted 4fff5ab24126a152b50c036b9bf8dc6f2740f094 in
commit b50341dba9811c048bed852c0279b828c7ddba66 on core-updates.  I
think we should be good to go to try building powerpc64-linux-gnu
bootstrap-tarballs now!

I confirmed that this commit on master would not cause dependents of
libffi to be rebuilt by verifying that the derivation for one of its
dependent packages, guile, did not change before/after the change.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Tue, 22 Dec 2020 05:17:01 GMT) Full text and rfc822 format available.

Message #19 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: John Doe <dftxbs3e <at> free.fr>, Chris Marusich <cmmarusich <at> gmail.com>
Cc: guix-devel <at> gnu.org, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Tue, 22 Dec 2020 00:15:25 -0500
Hi,

There's a problem with the following commit:

> commit 7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99
> Author: John Doe <dftxbs3e <at> free.fr>
> Date:   Tue Dec 15 10:23:44 2020 +0100
> 
>   gnu: libffi: Add unreleased patch to fix float128 on powerpc64le.
>   
>   Fixes <https://bugs.gnu.org/45252>.
>   
>   * gnu/packages/patches/libffi-float128-powerpc64le.patch: Import patch file
>   from <https://github.com/libffi/libffi/pull/561.patch>.
>   * gnu/packages/libffi.scm (libffi)[arguments]: Apply patch conditionally for
>   powerpc64le-* systems in a phase.
>   [inputs]: Add patch as input conditionally for powerpc64le-* systems.
>   * gnu/local.mk (dist_patch_DATA): Add patch file to build system.
>   
>   Signed-off-by: Chris Marusich <cmmarusich <at> gmail.com>

The problem is in how the 'patch' program is invoked, here:

> diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
> index d324892330..66239e0363 100644
> --- a/gnu/packages/libffi.scm
> +++ b/gnu/packages/libffi.scm
[...]
> @@ -67,13 +68,28 @@
>                                                        "powerpc-patch")))
>                                  (invoke "patch" "--batch" "-p1"
>                                          "-i" patch))))))
> +             '())
> +       ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
> +                                                (%current-system)))
> +             '(#:phases (modify-phases %standard-phases
> +                          (add-after 'unpack 'apply-patch2
> +                            (lambda* (#:key inputs #:allow-other-keys)
> +                              (let ((patch (assoc-ref inputs
> +                                                      "powerpc64le-patch")))
> +                                (invoke "patch" "--batch" "-p1"
> +                                        "-i" patch))))))
>               '())))

When invoking 'patch' in Guix, you should *always* use "--force" instead
of "--batch".  There's a crucial difference between these two options:
If 'patch' finds that the given patch has already been applied, then
"--batch" will automatically *revert* the patch, whereas "--force" will
raise an error.  Here's the relevant section of the 'diffutils' manual:

> 10.11.2 Inhibiting Keyboard Input
> ---------------------------------
> 
> There are two ways you can prevent 'patch' from asking you any
> questions.  The '--force' ('-f') option assumes that you know what you
> are doing.  It causes 'patch' to do the following:
> 
>    * Skip patches that do not contain file names in their headers.
> 
>    * Patch files even though they have the wrong version for the
>      'Prereq:' line in the patch;
> 
>    * Assume that patches are not reversed even if they look like they
>      are.
> 
> The '--batch' ('-t') option is similar to '-f', in that it suppresses
> questions, but it makes somewhat different assumptions:
> 
>    * Skip patches that do not contain file names in their headers (the
>      same as '-f').
> 
>    * Skip patches for which the file has the wrong version for the
>      'Prereq:' line in the patch;
> 
>    * Assume that patches are reversed if they look like they are.

Now consider what will happen when we upgrade 'libffi' to a newer
version that already includes this fix.  If the Guix developer who
performs the upgrade forgets to remove this patch, the 'patch'
invocation above will start silently re-inserting the old bug.

We ran into this exact problem in the early years of Guix, and
henceforth changed all of the invocations of 'patch' to use '--force'.

Can we fix this right away, before many powerpc64le-* binaries are built
on top of it?

In any case, thanks very much for working on the powerpc64le port!

      Regards,
        Mark




Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Tue, 22 Dec 2020 06:02:01 GMT) Full text and rfc822 format available.

Message #22 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: John Doe <dftxbs3e <at> free.fr>, Chris Marusich <cmmarusich <at> gmail.com>,
 Efraim Flashner <efraim <at> flashner.co.il>
Cc: guix-devel <at> gnu.org, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Tue, 22 Dec 2020 01:00:44 -0500
Earlier, I wrote:
> When invoking 'patch' in Guix, you should *always* use "--force" instead
> of "--batch".

(See <https://bugs.gnu.org/45252#19> for my earlier message).

Since writing the message above, I've found another problem in the same
commit (7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99): it searches for the
'patch' program in 'inputs'.  This is a mistake, because when
cross-compiling, 'inputs' will contain software compiled to run on the
target system instead of the build system.

If 'native-inputs' is not #f, we should search for the 'patch' program
in 'native-inputs' instead of 'inputs'.  Unless there's now a better way
that I don't know, I suggest adding 'native-inputs' to the list of
keyword arguments accepted by the 'lambda*', and changing 'inputs' to
"(or native-inputs inputs)" in the call to 'assoc-ref'.  Something like
this (untested):

_ ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
__________________________________________ (%current-system)))
_______ '(#:phases (modify-phases %standard-phases
____________________ (add-after 'unpack 'apply-patch2
______________________ (lambda* (#:key inputs native-inputs
________________________________ #:allow-other-keys)
________________________ (let ((patch (assoc-ref (or native-inputs inputs)
________________________________________________ "powerpc64le-patch")))
__________________________ (invoke "patch" "--force" "-p1"
__________________________________ "-i" patch))))))
_______ '())

I see now that both of these mistakes were already present in the
"powerpc-*" case immediately above the recently-added "powerpc64le-*"
case.  The "powerpc-*" case was added earlier this year in the following
commit:

  https://git.sv.gnu.org/cgit/guix.git/commit/?id=02f5ee01c96589fc13f1e21b85b0b48100aec4e8

I'm CC'ing 'guix-devel' to raise awareness about these common mistakes,
in the hopes that reviewers will be more likely to notice them in the
future.

      Thanks,
        Mark




Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Wed, 23 Dec 2020 06:39:02 GMT) Full text and rfc822 format available.

Message #25 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: guix-devel <at> gnu.org, John Doe <dftxbs3e <at> free.fr>,
 Efraim Flashner <efraim <at> flashner.co.il>, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Tue, 22 Dec 2020 22:38:29 -0800
[Message part 1 (text/plain, inline)]
Hi Mark,

Mark H Weaver <mhw <at> netris.org> writes:

> Earlier, I wrote:
>> When invoking 'patch' in Guix, you should *always* use "--force" instead
>> of "--batch".
>
> (See <https://bugs.gnu.org/45252#19> for my earlier message).

Thank you for letting me know about this.  I didn't know about the
difference between "--batch" and "--force".  I agree we should use
"--force" instead of "--batch".  How do you recommend that I proceed?

I can definitely make another commit on the master branch to change the
option from "--batch" to "--force".  However, I'm reluctant to change
the option in the existing code on the master branch (introduced in
commit 02f5ee01c96589fc13f1e21b85b0b48100aec4e8), since I'm not sure how
many packages would be rebuilt as a result.  The powerpc64le
architecture is not bootstrapped at all yet, so it's not a problem for
that architecture, but I don't know the status for all the other
architectures beginning with "powerpc".

Before I make a new commit to change the patch option on the master
branch, I'd appreciate your advice on how to proceed.  Do you think it
would be better to make a commit on the master branch to fix just the
option I introduced in commit 7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99?
Or, do you think it would be better to make a commit on the core-updates
branch to change all the "--batch" options to "--force" options in the
libffi package definition?  If we did it on core-updates, we could just
replace the manual invocation of the "patch" tool with a change that
looks more like 4fff5ab24126a152b50c036b9bf8dc6f2740f094, in particular
this part:

diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 0e6a31d78c..0db8fa3e82 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -51,7 +51,8 @@
               (sha256
                (base32
                 "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))
-              (patches (search-patches "libffi-3.3-powerpc-fixes.patch"))))
+              (patches (search-patches "libffi-3.3-powerpc-fixes.patch"
+                                       "libffi-float128-powerpc64le.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(;; Prevent the build system from passing -march and -mtune to the

I thought we wanted to apply patch 45252 on the master branch.  That's
why I made commit 7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99.  Afterwords,
I actually reverted commit 4fff5ab24126a152b50c036b9bf8dc6f2740f094 on
the core-updates branch in commit
b50341dba9811c048bed852c0279b828c7ddba66.  I reverted it because I
thought it would be undesirable to solve the same problem in two
different ways on two separate branches, and I thought that reverting it
would reduce the risk of merge conflicts later.

However, now that I think about it, I'm not sure the reversion was
necessary.  I'm actually not sure what the normal procedure is for
merging to/from core-updates and master (I've done many merges in my own
projects, but I've never done a merge in the Guix project), so I'm not
sure how a "TODO" task like the one mentioned in commit
7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99 ("Inline patches on next
rebuild cycle") would normally be resolved.  I would welcome any advice
you have about that.

By the way, a wip-ppc64le branch also exists, but I don't know what its
status is or whether I'm allowed to touch it.  I just assumed things
would be simpler if we applied patches to master branch when possible.

> Since writing the message above, I've found another problem in the same
> commit (7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99): it searches for the
> 'patch' program in 'inputs'.  This is a mistake, because when
> cross-compiling, 'inputs' will contain software compiled to run on the
> target system instead of the build system.

Is it searching for the "patch" program, or is it searching for the
patch file?  It looks to me like the code is searching for the patch
file in inputs, not the "patch" program.  The relevant code is here:

       ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
                                                (%current-system)))
             '(#:phases (modify-phases %standard-phases
                          (add-after 'unpack 'apply-patch2
                            (lambda* (#:key inputs #:allow-other-keys)
                              (let ((patch (assoc-ref inputs
                                                      "powerpc64le-patch")))
                                (invoke "patch" "--batch" "-p1"
                                        "-i" patch))))))

The code invokes the "patch" program in the usual way.  My understanding
is that whatever version of the "patch" program that Guix has placed in
the PATH environment variable will be used.  Therefore, Guix will use
the correct "patch" program, regardless of whether or not the package is
being cross-compiled.  Am I misunderstanding something?

Again, thank you for taking the time to bring these topics up.  I'm
always trying to make sure I do things the best way I can in Guix, so I
appreciate the feedback.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Wed, 23 Dec 2020 07:51:02 GMT) Full text and rfc822 format available.

Message #28 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: guix-devel <at> gnu.org, Mark H Weaver <mhw <at> netris.org>,
 John Doe <dftxbs3e <at> free.fr>, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Wed, 23 Dec 2020 09:50:27 +0200
[Message part 1 (text/plain, inline)]
"regular powerpc", ie macppc/ppc32/powerpc-linux-gnu, does have some
bootstrap binaries built but isn't near ready for merging. Go ahead and
make any changes necessary.


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Wed, 23 Dec 2020 21:24:02 GMT) Full text and rfc822 format available.

Message #31 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: guix-devel <at> gnu.org, John Doe <dftxbs3e <at> free.fr>,
 Efraim Flashner <efraim <at> flashner.co.il>, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Wed, 23 Dec 2020 16:22:21 -0500
Hi Chris,

Chris Marusich <cmmarusich <at> gmail.com> writes:

> Mark H Weaver <mhw <at> netris.org> writes:
>
>> Earlier, I wrote:
>>> When invoking 'patch' in Guix, you should *always* use "--force" instead
>>> of "--batch".
>>
>> (See <https://bugs.gnu.org/45252#19> for my earlier message).
>
> Thank you for letting me know about this.  I didn't know about the
> difference between "--batch" and "--force".  I agree we should use
> "--force" instead of "--batch".  How do you recommend that I proceed?

Simply changing "--batch" to "--force" on line 79 (in the powerpc64le-*
case, i.e. the one that was just added) seems like the right thing.
That will force a rebuild of almost everything on the powerpc64le-*
architecture, but should not cause any rebuilds on other architectures.

>> Since writing the message above, I've found another problem in the same
>> commit (7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99): it searches for the
>> 'patch' program in 'inputs'.  This is a mistake, because when
>> cross-compiling, 'inputs' will contain software compiled to run on the
>> target system instead of the build system.
>
> Is it searching for the "patch" program, or is it searching for the
> patch file?  It looks to me like the code is searching for the patch
> file in inputs, not the "patch" program.

LOL, you're right, I got confused.  Please disregard my second email in
this thread, and apologies for that noise.

> Again, thank you for taking the time to bring these topics up.  I'm
> always trying to make sure I do things the best way I can in Guix, so I
> appreciate the feedback.

Thank you, Chris.

    Warm regards,
        Mark




Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Wed, 23 Dec 2020 21:36:02 GMT) Full text and rfc822 format available.

Message #34 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Efraim Flashner <efraim <at> flashner.co.il>, Chris Marusich
 <cmmarusich <at> gmail.com>
Cc: guix-devel <at> gnu.org, John Doe <dftxbs3e <at> free.fr>, 45252 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Wed, 23 Dec 2020 16:34:29 -0500
Hi Efraim,

Efraim Flashner <efraim <at> flashner.co.il> writes:
> "regular powerpc", ie macppc/ppc32/powerpc-linux-gnu, does have some
> bootstrap binaries built but isn't near ready for merging. Go ahead and
> make any changes necessary.

I appreciate that, but if rebuilding the world on regular powerpc would
significantly add to the burden of even a single developer, then it's
probably not worth it.  I suggested fixing the powerpc64le case now only
because it was just added a few days ago, and more generally to raise
awareness about how best to run the 'patch' program in Guix.

If it's truly no extra burden, then you could change "--batch" to
"--force" on line 69 of libffi.c (in the "powerpc-*" case).

      Regards,
        Mark




Information forwarded to guix-patches <at> gnu.org:
bug#45252; Package guix-patches. (Mon, 28 Dec 2020 04:18:02 GMT) Full text and rfc822 format available.

Message #37 received at 45252 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>, Mark H Weaver <mhw <at> netris.org>
Cc: guix-devel <at> gnu.org, John Doe <dftxbs3e <at> free.fr>, 45252 <at> debbugs.gnu.org
Subject: Re: [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix
 float128 on powerpc64le.,
 [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.,
 [bug#45252] [PATCH] gnu: libffi: Add unreleased patch to fix float128 on
 powerpc64le.
Date: Sun, 27 Dec 2020 20:17:33 -0800
[Message part 1 (text/plain, inline)]
Hi,

Efraim Flashner <efraim <at> flashner.co.il> writes:

> "regular powerpc", ie macppc/ppc32/powerpc-linux-gnu, does have some
> bootstrap binaries built but isn't near ready for merging. Go ahead and
> make any changes necessary.

Mark H Weaver <mhw <at> netris.org> writes:

> Hi Efraim,
>
> Efraim Flashner <efraim <at> flashner.co.il> writes:
>> "regular powerpc", ie macppc/ppc32/powerpc-linux-gnu, does have some
>> bootstrap binaries built but isn't near ready for merging. Go ahead and
>> make any changes necessary.
>
> I appreciate that, but if rebuilding the world on regular powerpc would
> significantly add to the burden of even a single developer, then it's
> probably not worth it.  I suggested fixing the powerpc64le case now only
> because it was just added a few days ago, and more generally to raise
> awareness about how best to run the 'patch' program in Guix.
>
> If it's truly no extra burden, then you could change "--batch" to
> "--force" on line 69 of libffi.c (in the "powerpc-*" case).

OK.  I've made this change on master in commit
662e7e28d576ada91fc9dec7d27c100666114f03.

Mark H Weaver <mhw <at> netris.org> writes:

> Hi Chris,
>
> Chris Marusich <cmmarusich <at> gmail.com> writes:
>
>> Mark H Weaver <mhw <at> netris.org> writes:
>>
>>> Earlier, I wrote:
>>>> When invoking 'patch' in Guix, you should *always* use "--force" instead
>>>> of "--batch".
>>>
>>> (See <https://bugs.gnu.org/45252#19> for my earlier message).
>>
>> Thank you for letting me know about this.  I didn't know about the
>> difference between "--batch" and "--force".  I agree we should use
>> "--force" instead of "--batch".  How do you recommend that I proceed?
>
> Simply changing "--batch" to "--force" on line 79 (in the powerpc64le-*
> case, i.e. the one that was just added) seems like the right thing.
> That will force a rebuild of almost everything on the powerpc64le-*
> architecture, but should not cause any rebuilds on other architectures.

OK, I've made this change on master in commit
fdb90e9ee8a578c88ef3a33067e8a532e43ae7b8.

>>> Since writing the message above, I've found another problem in the same
>>> commit (7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99): it searches for the
>>> 'patch' program in 'inputs'.  This is a mistake, because when
>>> cross-compiling, 'inputs' will contain software compiled to run on the
>>> target system instead of the build system.
>>
>> Is it searching for the "patch" program, or is it searching for the
>> patch file?  It looks to me like the code is searching for the patch
>> file in inputs, not the "patch" program.
>
> LOL, you're right, I got confused.  Please disregard my second email in
> this thread, and apologies for that noise.

No worries!  Thanks again for your help.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 25 Jan 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.