unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Error cross-compiling Mesa: failing test
@ 2019-09-06 19:10 Pierre Neidhardt
  2019-09-07 14:58 ` Marius Bakke
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2019-09-06 19:10 UTC (permalink / raw)
  To: guix-devel, Marius Bakke

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

Hi!

Our current `mesa' package has this bit:

--8<---------------cut here---------------start------------->8---
         ,@(if (string-prefix? "i686" (%current-system))
               ;; Disable new test from Mesa 19 that fails on i686.  Upstream
               ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
               `((add-after 'unpack 'disable-failing-test
                   (lambda _
                     (substitute* "src/gallium/tests/unit/meson.build"
                       (("'u_format_test',") ""))
                     #t)))
               '())
--8<---------------cut here---------------end--------------->8---

When I attempt to cross-compile the package from x86-64 to x686, the
faulty test is not disabled and the check phase fails.

If I turn (%current-system) to (%current-target-system) it works.
Should we update the package to use (%current-target-system) then?

Marius?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-06 19:10 Error cross-compiling Mesa: failing test Pierre Neidhardt
@ 2019-09-07 14:58 ` Marius Bakke
  2019-09-19 10:44   ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Marius Bakke @ 2019-09-07 14:58 UTC (permalink / raw)
  To: Pierre Neidhardt, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Hi!
>
> Our current `mesa' package has this bit:
>
> --8<---------------cut here---------------start------------->8---
>          ,@(if (string-prefix? "i686" (%current-system))
>                ;; Disable new test from Mesa 19 that fails on i686.  Upstream
>                ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
>                `((add-after 'unpack 'disable-failing-test
>                    (lambda _
>                      (substitute* "src/gallium/tests/unit/meson.build"
>                        (("'u_format_test',") ""))
>                      #t)))
>                '())
> --8<---------------cut here---------------end--------------->8---
>
> When I attempt to cross-compile the package from x86-64 to x686, the
> faulty test is not disabled and the check phase fails.
>
> If I turn (%current-system) to (%current-target-system) it works.
> Should we update the package to use (%current-target-system) then?

I did not expect anyone to run tests when cross-compiling :-)

I think gnu-build-system disables tests in that case, but perhaps it
should not?

In any case you can change (%current-system) to:

  (or (%current-target-system) (%current-system))

...and it should work.  Feel free to push this change to 'master' :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-07 14:58 ` Marius Bakke
@ 2019-09-19 10:44   ` Pierre Neidhardt
  2019-09-19 10:57     ` Jelle Licht
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2019-09-19 10:44 UTC (permalink / raw)
  To: Marius Bakke, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

Sorry for the delay :p

> In any case you can change (%current-system) to:
>
>   (or (%current-target-system) (%current-system))
>
> ...and it should work.  Feel free to push this change to 'master' :-)

OK, I could do that.
Now I'm trying to build a i686-linux mesa on a x86_64, but the following

--8<---------------cut here---------------start------------->8---
(define-public (to32 package64)
  "Build package for i686-linux.
Only x86_64-linux and i686-linux are supported.
- If i686-linux, return the package unchanged.
- If x86_64-linux, return the 32-bit version of the package."
  (match (%current-system)
    ("x86_64-linux"
     (package
       (inherit package64)
       (name (string-append (package-name package64) "32"))
       (arguments `(#:system "i686-linux"
                    ,@(package-arguments package64)))))
    (_ package64)))

(define mesa32
  (package
    (inherit (to32 mesa))
    (arguments
     (substitute-keyword-arguments (package-arguments mesa)
       ((#:phases phases)
        `(modify-phases ,phases
           (add-after 'unpack 'cross-disable-failing-test
             (lambda _
               (substitute* "src/gallium/tests/unit/meson.build"
                 (("'u_format_test',") ""))
               #t))))))))
--8<---------------cut here---------------end--------------->8---

still produces a x86_64 build of mesa.  Any clue what I'm missing?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-19 10:44   ` Pierre Neidhardt
@ 2019-09-19 10:57     ` Jelle Licht
  2019-09-19 10:59       ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Jelle Licht @ 2019-09-19 10:57 UTC (permalink / raw)
  To: Pierre Neidhardt, Marius Bakke, guix-devel

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> (define mesa32
>   (package
>     (inherit (to32 mesa))
>     (arguments
>      (substitute-keyword-arguments (package-arguments mesa)
                                                        ^
                                                        you use (64bit?)
                                                        mesa here.
>        ((#:phases phases)
>         `(modify-phases ,phases
>            (add-after 'unpack 'cross-disable-failing-test
>              (lambda _
>                (substitute* "src/gallium/tests/unit/meson.build"
>                  (("'u_format_test',") ""))
>                #t))))))))
> --8<---------------cut here---------------end--------------->8---
>
> still produces a x86_64 build of mesa.  Any clue what I'm missing?
>
> -- 
> Pierre Neidhardt
> https://ambrevar.xyz/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-19 10:57     ` Jelle Licht
@ 2019-09-19 10:59       ` Pierre Neidhardt
  2019-09-19 11:05         ` Jelle Licht
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2019-09-19 10:59 UTC (permalink / raw)
  To: Jelle Licht, Marius Bakke, guix-devel

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Jelle Licht <jlicht@fsfe.org> writes:

> Pierre Neidhardt <mail@ambrevar.xyz> writes:
>
>> (define mesa32
>>   (package
>>     (inherit (to32 mesa))
>>     (arguments
>>      (substitute-keyword-arguments (package-arguments mesa)
>                                                         ^
>                                                         you use (64bit?)
>                                                         mesa here.

What's the problem? O.o


-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-19 10:59       ` Pierre Neidhardt
@ 2019-09-19 11:05         ` Jelle Licht
  2019-09-19 11:32           ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Jelle Licht @ 2019-09-19 11:05 UTC (permalink / raw)
  To: Pierre Neidhardt, Marius Bakke, guix-devel

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Jelle Licht <jlicht@fsfe.org> writes:
>
>> Pierre Neidhardt <mail@ambrevar.xyz> writes:
>>
>>> (define mesa32
>>>   (package
>>>     (inherit (to32 mesa))
>>>     (arguments
>>>      (substitute-keyword-arguments (package-arguments mesa)
>>                                                         ^
>>                                                         you use (64bit?)
>>                                                         mesa here.
>
> What's the problem? O.o

It seems you inherit from the `(to32 mesa)', but then override the
arguments to come from `(package-arguments mesa)', so you always
ignore the `#:system "i686-linux"' in this setup, if I understand
correctly.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-19 11:05         ` Jelle Licht
@ 2019-09-19 11:32           ` Pierre Neidhardt
  2019-09-27 14:36             ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2019-09-19 11:32 UTC (permalink / raw)
  To: Jelle Licht, Marius Bakke, guix-devel

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Duh!  Now that I've put to32 next to mesa32, it's obvious! :)
Thanks for looking into this, Jelle!  I had completely missed that since
my to32 definition was in a separate file! :p

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-19 11:32           ` Pierre Neidhardt
@ 2019-09-27 14:36             ` Pierre Neidhardt
  2019-09-27 17:34               ` Marius Bakke
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2019-09-27 14:36 UTC (permalink / raw)
  To: Jelle Licht, Marius Bakke, guix-devel

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

Marius: you told me to update master, but

--8<---------------cut here---------------start------------->8---
> guix refresh -l mesa
Building the following 822 packages would ensure 1514 dependent packages are rebuilt:
--8<---------------cut here---------------end--------------->8---

I'd say this should go to staging.  Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-27 14:36             ` Pierre Neidhardt
@ 2019-09-27 17:34               ` Marius Bakke
  2019-10-03 10:04                 ` Pierre Neidhardt
  0 siblings, 1 reply; 10+ messages in thread
From: Marius Bakke @ 2019-09-27 17:34 UTC (permalink / raw)
  To: Pierre Neidhardt, Jelle Licht, guix-devel

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Marius: you told me to update master, but
>
> --8<---------------cut here---------------start------------->8---
>> guix refresh -l mesa
> Building the following 822 packages would ensure 1514 dependent packages are rebuilt:
> --8<---------------cut here---------------end--------------->8---
>
> I'd say this should go to staging.  Thoughts?

This change only affects i686 cross-builds of Mesa, because the
conditional is tested outside of the builder.  I.e. "guix build mesa"
should produce the same result before and after this change, even on
i686.  If that is the case, it is safe for 'master'.

I'm still not sure whether it is sensible for meson-build-system to run
tests when cross-compiling, but that is another story.  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Error cross-compiling Mesa: failing test
  2019-09-27 17:34               ` Marius Bakke
@ 2019-10-03 10:04                 ` Pierre Neidhardt
  0 siblings, 0 replies; 10+ messages in thread
From: Pierre Neidhardt @ 2019-10-03 10:04 UTC (permalink / raw)
  To: Marius Bakke, Jelle Licht, guix-devel

[-- Attachment #1: Type: text/plain, Size: 135 bytes --]

Pushed with ccbc1c5eb2f3cc1979902b6bfd3e7b31aa66e661.

Thanks for the explanations!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 483 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-10-03 10:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 19:10 Error cross-compiling Mesa: failing test Pierre Neidhardt
2019-09-07 14:58 ` Marius Bakke
2019-09-19 10:44   ` Pierre Neidhardt
2019-09-19 10:57     ` Jelle Licht
2019-09-19 10:59       ` Pierre Neidhardt
2019-09-19 11:05         ` Jelle Licht
2019-09-19 11:32           ` Pierre Neidhardt
2019-09-27 14:36             ` Pierre Neidhardt
2019-09-27 17:34               ` Marius Bakke
2019-10-03 10:04                 ` Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).