Build failure on ppc64le
Dear GRUB folks,
Building GRUB at commit 7346682 (Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.) for the platform powerpc-ieee1275 with Ubuntu 16.04.02 LTS (Xenial Xerus) on such a machine (ppc64le), fails with the error below.
``` $ ./autogen.sh $ ./configure $ make […] gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror -mcpu=powerpc -ffreestanding -mbig-endian -m32 -Wl,--build-id=none -nostdlib -Wl,-N -Wl,-Ttext,0x200000 -o kernel.exec kern/powerpc/ieee1275/kernel_exec-startup.o kern/powerpc/kernel_exec-cache.o kern/powerpc/kernel_exec-dl.o kern/powerpc/kernel_exec-compiler-rt.o disk/ieee1275/kernel_exec-ofdisk.o kern/ieee1275/kernel_exec-cmain.o kern/ieee1275/kernel_exec-ieee1275.o kern/ieee1275/kernel_exec-mmap.o kern/ieee1275/kernel_exec-openfw.o term/ieee1275/kernel_exec-console.o kern/ieee1275/kernel_exec-init.o term/kernel_exec-terminfo.o term/kernel_exec-tparm.o commands/kernel_exec-extcmd.o lib/kernel_exec-arg.o kern/kernel_exec-compiler-rt.o kern/kernel_exec-mm.o kern/kernel_exec-time.o kern/generic/kernel_exec-millisleep.o kern/kernel_exec-command.o kern/kernel_exec-corecmd.o kern/kernel_exec-device.o kern/kernel_exec-disk.o kern/kernel_exec-dl.o kern/kernel_exec-env.o kern/kernel_exec-err.o kern/kernel_exec-file.o kern/kernel_exec-fs.o kern/kernel_exec-list.o kern/kernel_exec-main.o kern/kernel_exec-misc.o kern/kernel_exec-parser.o kern/kernel_exec-partition.o kern/kernel_exec-rescue_parser.o kern/kernel_exec-rescue_reader.o kern/kernel_exec-term.o kernel_exec-symlist.o kernel_exec-symlist.o:(.data+0x214): undefined reference to `grub_arch_sync_dma_caches' collect2: error: ld returned 1 exit status […] ```
Thanks,
Paul
Quoted 7 lines · Paul Menzel
Dear GRUB folks,
Building GRUB at commit 7346682 (Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.) for the platform
powerpc-ieee1275with Ubuntu 16.04.02 LTS (Xenial Xerus) on such a machine (ppc64le), fails with the error below.
Quoted 10 lines
``` $ ./autogen.sh $ ./configure $ make […] gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror -mcpu=powerpc -ffreestanding -mbig-endian -m32 -Wl,--build-id=none -nostdlib -Wl,-N -Wl,-Ttext,0x200000 -o kernel.exec kern/powerpc/ieee1275/kernel_exec-startup.o kern/powerpc/kernel_exec-cache.o kern/powerpc/kernel_exec-dl.o kern/powerpc/kernel_exec-compiler-rt.o disk/ieee1275/kernel_exec-ofdisk.o kern/ieee1275/kernel_exec-cmain.o kern/ieee1275/kernel_exec-ieee1275.o kern/ieee1275/kernel_exec-mmap.o kern/ieee1275/kernel_exec-openfw.o term/ieee1275/kernel_exec-console.o kern/ieee1275/kernel_exec-init.o term/kernel_exec-terminfo.o term/kernel_exec-tparm.o commands/kernel_exec-extcmd.o lib/kernel_exec-arg.o kern/kernel_exec-compiler-rt.o kern/kernel_exec-mm.o kern/kernel_exec-time.o kern/generic/kernel_exec-millisleep.o kern/kernel_exec-command.o kern/kernel_exec-corecmd.o kern/kernel_exec-device.o kern/kernel_exec-disk.o kern/kernel_exec-dl.o kern/kernel_exec-env.o kern/kernel_exec-err.o kern/kernel_exec-file.o kern/kernel_exec-fs.o kern/kernel_exec-list.o kern/kernel_exec-main.o kern/kernel_exec-misc.o kern/kernel_exec-parser.o kern/kernel_exec-partition.o kern/kernel_exec-rescue_parser.o kern/kernel_exec-rescue_reader.o kern/kernel_exec-term.o kernel_exec-symlist.o kernel_exec-symlist.o:(.data+0x214): undefined reference to `grub_arch_sync_dma_caches' collect2: error: ld returned 1 exit status […] ```
Yeah, this is related to the same change that broke arm64:
http://lists.gnu.org/archive/html/grub-devel/2017-05/msg00043.html
If ppc64le does not require any manual DMA cache synchronization, you could probably just add something like:
include/grub/cache.h +0 -0
@@ -34,7 +34,8 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void
*address, grub_size_t len);
#endif
#ifndef GRUB_MACHINE_EMU
-#if defined (__i386__) || defined (__x86_64__)
+#if defined (__i386__) || defined (__x86_64__) || (defined (__PPC64__) && \
+ defined (__LITTLE_ENDIAN__))
static inline void
grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)),
grub_size_t len __attribute__ ((unused)))/
Leif
Quoted 68 lines · On Tue, Jul 4, 2017, 19:48 Leif Lindholm <[email protected]> wrote:
Quoted 13 lines · Paul Menzel
Dear GRUB folks,
Building GRUB at commit 7346682 (Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.) for the platform
powerpc-ieee1275with Ubuntu 16.04.02 LTS (Xenial Xerus) on such a machine (ppc64le), fails with the error below.```
$ ./autogen.sh $ ./configure $ make […] gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts(quoted diff) +0
-18-Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror -mcpu=powerpc -ffreestanding -mbig-endian -m32 -Wl,--build-id=none -nostdlib -Wl,-N -Wl,-Ttext,0x200000 -o kernel.exec
kern/powerpc/ieee1275/kernel_exec-startup.okern/powerpc/kernel_exec-cache.okern/powerpc/kernel_exec-dl.okern/powerpc/kernel_exec-compiler-rt.odisk/ieee1275/kernel_exec-ofdisk.okern/ieee1275/kernel_exec-cmain.okern/ieee1275/kernel_exec-ieee1275.okern/ieee1275/kernel_exec-mmap.okern/ieee1275/kernel_exec-openfw.oterm/ieee1275/kernel_exec-console.okern/ieee1275/kernel_exec-init.oterm/kernel_exec-terminfo.oterm/kernel_exec-tparm.ocommands/kernel_exec-extcmd.olib/kernel_exec-arg.okern/kernel_exec-compiler-rt.okern/kernel_exec-mm.okern/kernel_exec-time.okern/generic/kernel_exec-millisleep.okern/kernel_exec-command.okern/kernel_exec-corecmd.okern/kernel_exec-device.okern/kernel_exec-disk.okern/kernel_exec-dl.okern/kernel_exec-env.okern/kernel_exec-err.okern/kernel_exec-file.okern/kernel_exec-fs.okern/kernel_exec-list.okern/kernel_exec-main.okern/kernel_exec-misc.okern/kernel_exec-parser.okern/kernel_exec-partition.okern/kernel_exec-rescue_parser.okern/kernel_exec-rescue_reader.okern/kernel_exec-term.okernel_exec-symlist.oQuoted 1 line
kernel_exec-symlist.o:(.data+0x214): undefined reference to
`grub_arch_sync_dma_caches'
Quoted 3 lines
collect2: error: ld returned 1 exit status
[…]
```Yeah, this is related to the same change that broke arm64:
http://lists.gnu.org/archive/html/grub-devel/2017-05/msg00043.htmlIf ppc64le does not require any manual DMA cache synchronization, you could probably just add something like:
include/grub/cache.h +0
-0
include/grub/cache.h void EXPORT_FUNC(grub_arch_sync_caches) (void
Quoted 8 lines
include/grub/cache.h +0
-0@@ -34,7 +34,8 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);#endif #ifndef GRUB_MACHINE_EMU -#if defined (__i386__) || defined (__x86_64__) +#if defined (__i386__) || defined (__x86_64__) || (defined (__PPC64__) && \ + defined (__LITTLE_ENDIAN__))
Grub core isn't built for ppc64le but ppc. So it needs to be __ppc__. But better solution is not to attempt to export unused function
Quoted 13 lines
static inline void
grub_arch_sync_dma_caches(volatile void *address__attribute__
((unused)),grub_size_t len __attribute__ ((unused)))/
Leif_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel