GNU bug report logs -
#54407
Issues building grub for powerpc64le, could not force big-endian
Previous Next
To reply to this bug, email your comments to 54407 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Tue, 15 Mar 2022 21:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Tue, 15 Mar 2022 21:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
grub can't be built for powerpc64le, I believe the same failure occurs
with native builds or cross compilation from x86_64. I think this might
have always been the case.
This is the error from the build log:
checking for options to get big-endian compilation... no
configure: error: could not force big-endian
Looking in the config.log file, it tries a bunch of options with
different errors, but this one stands out:
cc1: error: '-m32' not supported in this configuration
I know very little about gcc, but I think this might relate to the
multilib thing, which I'm guessing is disabled for the gcc in use here.
Any ideas about this issue?
Thanks,
Chris
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Wed, 30 Mar 2022 17:42:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
On Tue, 15 Mar 2022 21:11:37 +0000
Christopher Baines <mail <at> cbaines.net> wrote:
> grub can't be built for powerpc64le, I believe the same failure occurs
> with native builds or cross compilation from x86_64. I think this might
> have always been the case.
>
> This is the error from the build log:
>
> checking for options to get big-endian compilation... no
> configure: error: could not force big-endian
>
> Looking in the config.log file, it tries a bunch of options with
> different errors, but this one stands out:
>
> cc1: error: '-m32' not supported in this configuration
>
> I know very little about gcc, but I think this might relate to the
> multilib thing, which I'm guessing is disabled for the gcc in use here.
-m32 is to compile 32 bit object files with a compiler that usually compiles 64 bit objects.
If you want to use any libraries, then those have to be available as a 32 bit version somewhere.
The Guix gcc package recipe disables this (and I think that was the right call to make).
There are not a lot of use cases for using "-m32" anyway since on x86_64 the generated instructions are already just as compact as the x86 (32 bit) ones if the immediate operand is not too big.
Not sure what the configure script is doing there.
But there are a few programs that need 32 bit compilers--BIOS-based bootloaders are one of them (since they start up in ancient 8088 real mode).
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Wed, 30 Mar 2022 17:47:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Christopher Baines schreef op di 15-03-2022 om 21:11 [+0000]:
> grub can't be built for powerpc64le, I believe the same failure
> occurs
> with native builds or cross compilation from x86_64. I think this
> might
> have always been the case.
>
> This is the error from the build log:
>
> checking for options to get big-endian compilation... no
> configure: error: could not force big-endian
>
> Looking in the config.log file, it tries a bunch of options with
> different errors, but this one stands out:
>
> cc1: error: '-m32' not supported in this configuration
>
> I know very little about gcc, but I think this might relate to the
> multilib thing, which I'm guessing is disabled for the gcc in use
> here.
>
> Any ideas about this issue?
Maybe you could add a gcc compiling for 32-bit ppc (maybe without a
glibc since this is grub) and patch the configuration script to use the
32-bit ppc gcc instead of using the 64-bit ppc+-m32?
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Tue, 05 Apr 2022 09:11:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:
> Christopher Baines schreef op di 15-03-2022 om 21:11 [+0000]:
>> grub can't be built for powerpc64le, I believe the same failure
>> occurs
>> with native builds or cross compilation from x86_64. I think this
>> might
>> have always been the case.
>>
>> This is the error from the build log:
>>
>> checking for options to get big-endian compilation... no
>> configure: error: could not force big-endian
>>
>> Looking in the config.log file, it tries a bunch of options with
>> different errors, but this one stands out:
>>
>> cc1: error: '-m32' not supported in this configuration
>>
>> I know very little about gcc, but I think this might relate to the
>> multilib thing, which I'm guessing is disabled for the gcc in use
>> here.
>>
>> Any ideas about this issue?
>
> Maybe you could add a gcc compiling for 32-bit ppc (maybe without a
> glibc since this is grub) and patch the configuration script to use the
> 32-bit ppc gcc instead of using the 64-bit ppc+-m32?
I've had a go at this, using something like what I've included below,
but I haven't stumbled upon the right options yet, or a way to work out
why gcc still thinks "-m32 not supported".
(define multilib-gcc
(package
(inherit gcc)
(name "foo-gcc")
(arguments
(substitute-keyword-arguments (package-arguments gcc)
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'fix-genmultilib
(lambda _
;; patch-shebang doesn't work here because there are actually
;; several scripts inside this script, each with a #!/bin/sh
;; that needs patching.
(substitute* "gcc/genmultilib"
(("#!/bin/sh") (string-append "#!" (which "sh"))))))))
((#:configure-flags flags)
`(append (list
"--with-endian=little,big"
"--enable-multilib"
"--with-multilib-list=mx32,m64,m32"
)
(delete "--disable-multilib" ,flags)))))))
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Thu, 18 Aug 2022 08:12:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 04-04-2022 21:37, Christopher Baines wrote:
>> Maybe you could add a gcc compiling for 32-bit ppc (maybe without a
>> glibc since this is grub) and patch the configuration script to use the
>> 32-bit ppc gcc instead of using the 64-bit ppc+-m32?
> I've had a go at this, using something like what I've included below,
> but I haven't stumbled upon the right options yet, or a way to work out
> why gcc still thinks "-m32 not supported". [...]
I was thinking of skipping the multilib and maybe skipping support for
multiple endians, something like:
> (use-modules (guix utils) (guix packages) (guix gexp))
> (define (ppc-32bit-gcc)
> (if (%current-target-system)
> (error "not supported -- TODO make a cross-compiler to 32-bit
> ppc here with cross-gcc")
> (package
> (inherit (@ (gnu packages gcc) gcc))
> (arguments
> (substitute-keyword-arguments
> (package-arguments (@ (gnu packages gcc) gcc))
> ((#:system _) "ppc-linux")
> ((#:configure-flags flags)
> (pk 'f #~(append (list "--with-endian=big") #$flags))))))))
> (ppc-32bit-gcc)
(currently compiling, let's see if if it works ...)
Greetings,
Maxime.
[Message part 2 (text/html, inline)]
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Thu, 18 Aug 2022 08:15:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 18-08-2022 10:11, Maxime Devos wrote:
>
>
> On 04-04-2022 21:37, Christopher Baines wrote:
>>> Maybe you could add a gcc compiling for 32-bit ppc (maybe without a
>>> glibc since this is grub) and patch the configuration script to use the
>>> 32-bit ppc gcc instead of using the 64-bit ppc+-m32?
>> I've had a go at this, using something like what I've included below,
>> but I haven't stumbled upon the right options yet, or a way to work out
>> why gcc still thinks "-m32 not supported". [...]
>
> I was thinking of skipping the multilib and maybe skipping support for
> multiple endians, something like:
>
>> (use-modules (guix utils) (guix packages) (guix gexp))
>> (define (ppc-32bit-gcc)
>> (if (%current-target-system)
>> (error "not supported -- TODO make a cross-compiler to 32-bit
>> ppc here with cross-gcc")
>> (package
>> (inherit (@ (gnu packages gcc) gcc))
>> (arguments
>> (substitute-keyword-arguments
>> (package-arguments (@ (gnu packages gcc) gcc))
>> ((#:system _) "ppc-linux")
>> ((#:configure-flags flags)
>> (pk 'f #~(append (list "--with-endian=big") #$flags))))))))
>> (ppc-32bit-gcc)
> (currently compiling, let's see if if it works ...)
The #:system doesn't work, trying
> (use-modules (guix utils) (guix packages) (guix gexp))
> (define (ppc-32bit-gcc)
> (if (%current-target-system)
> (error "not supported -- TODO make a cross-compiler to 32-bit
> ppc here with cross-gcc")
> (package
> (inherit (@ (gnu packages gcc) gcc))
> (arguments
> (substitute-keyword-arguments
> (cons* #:system "powerpc-linux" (package-arguments (@ (gnu
> packages gcc) gcc)))
> ((#:configure-flags flags)
> (pk 'f #~(append (list "--with-endian=big") #$flags))))))))
> (ppc-32bit-gcc)
instead.
[Message part 2 (text/html, inline)]
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#54407
; Package
guix
.
(Thu, 18 Aug 2022 08:34:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 54407 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Doesn't work for me:
> while setting up the build environment: a `powerpc-linux' is required
> to build
> `/gnu/store/gmq50nq4xf4wa0msqms140s3jkk5v47q-guile-bootstrap-2.0.drv',
> but I am a `x86_64-linux'
even though QEMU has been set up, though that's more a local
configuration problem than a problem in gcc package.
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 2 years and 173 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.