Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Milan P. Stanić" <mps@arvanta.net>
To: kexec@lists.infradead.org
Subject: Build failed on Alpine Linux for x86 arch
Date: Sat, 19 Oct 2019 22:10:57 +0200	[thread overview]
Message-ID: <20191019201057.GA21551@arya.arvanta.net> (raw)

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

Hi,

I'm trying to upgrade kexec-tools to version 2.0.20 on Alpine Linux
(musl libc based) and got error:
kexec/arch/i386/kexec-x86.c:40:4: error: 'multiboot2_x86_usage' undeclared here (not in a function); did you mean 'multiboot_x86_usage'?

Excerpt from build log is attached to this mail.

I changed kexec/arch/i386/kexec-x86.c file with patch attached to this
mail, and then it builds fine but I'm not sure if that patch is correct.

Would anyone review patch and issue, and post comment or fix.

-- 
Tia

[-- Attachment #2: kexec-build.log --]
[-- Type: text/plain, Size: 2067 bytes --]

gcc -Os -fomit-frame-pointer -fno-strict-aliasing -Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I./include -I./util_lib/include -Iinclude/  -I./kexec/arch/i386/include  -c -MD -o kexec/arch/i386/kexec-elf-x86.o kexec/arch/i386/kexec-elf-x86.c
gcc -Os -fomit-frame-pointer -fno-strict-aliasing -Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I./include -I./util_lib/include -Iinclude/  -I./kexec/arch/i386/include  -c -MD -o kexec/arch/i386/kexec-elf-rel-x86.o kexec/arch/i386/kexec-elf-rel-x86.c
kexec/arch/i386/kexec-x86.c:39:22: error: 'multiboot2_x86_probe' undeclared here (not in a function); did you mean 'multiboot_x86_probe'?
   39 |  { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
      |                      ^~~~~~~~~~~~~~~~~~~~
      |                      multiboot_x86_probe
kexec/arch/i386/kexec-x86.c:39:44: error: 'multiboot2_x86_load' undeclared here (not in a function); did you mean 'multiboot_x86_load'?
   39 |  { "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
      |                                            ^~~~~~~~~~~~~~~~~~~
      |                                            multiboot_x86_load
kexec/arch/i386/kexec-x86.c:40:4: error: 'multiboot2_x86_usage' undeclared here (not in a function); did you mean 'multiboot_x86_usage'?
   40 |    multiboot2_x86_usage },
      |    ^~~~~~~~~~~~~~~~~~~~
      |    multiboot_x86_usage
make: *** [Makefile:113: kexec/arch/i386/kexec-x86.o] Error 1
make: *** Waiting for unfinished jobs....
kexec/arch/i386/kexec-x86-common.c: In function 'efi_get_acpi_rsdp':
kexec/arch/i386/kexec-x86-common.c:419:19: warning: format '%lx' expects argument of type 'long unsigned int *', but argument 3 has type 'uint64_t *' {aka 'long long unsigned int *'} [-Wformat=]
  419 |    sscanf(s, "0x%lx", &acpi_rsdp);
      |                 ~~^   ~~~~~~~~~~
      |                   |   |
      |                   |   uint64_t * {aka long long unsigned int *}
      |                   long unsigned int *
      |                 %llx
>>> ERROR: kexec-tools: build failed

[-- Attachment #3: fix-build-on-Alpine-linux.patch --]
[-- Type: text/x-diff, Size: 1067 bytes --]

From d390f1f873fa42fa5791ba48f9acf0f41da33632 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <mps@arvanta.net>
Date: Sat, 19 Oct 2019 17:10:16 +0000
Subject: [PATCH] kexec/arch/i386/kexec-x86.c: fix build on Alpine linux x86
 arch

---
 kexec/arch/i386/kexec-x86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kexec/arch/i386/kexec-x86.c b/kexec/arch/i386/kexec-x86.c
index 444cb69..6001e76 100644
--- a/kexec/arch/i386/kexec-x86.c
+++ b/kexec/arch/i386/kexec-x86.c
@@ -36,8 +36,8 @@
 struct file_type file_type[] = {
 	{ "multiboot-x86", multiboot_x86_probe, multiboot_x86_load,
 	  multiboot_x86_usage },
-	{ "multiboot2-x86", multiboot2_x86_probe, multiboot2_x86_load,
-	  multiboot2_x86_usage },
+	{ "multiboot2-x86", multiboot_x86_probe, multiboot_x86_load,
+	  multiboot_x86_usage },
 	{ "elf-x86", elf_x86_probe, elf_x86_load, elf_x86_usage },
 	{ "bzImage", bzImage_probe, bzImage_load, bzImage_usage },
 	{ "beoboot-x86", beoboot_probe, beoboot_load, beoboot_usage },
-- 
2.23.0


[-- Attachment #4: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

                 reply	other threads:[~2019-10-19 20:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20191019201057.GA21551@arya.arvanta.net \
    --to=mps@arvanta.net \
    --cc=kexec@lists.infradead.org \
    /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