[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#827525: marked as done (kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code)



Your message dated Tue, 20 Dec 2022 16:05:26 +0000
with message-id <[🔎] E1p7f7O-004a3i-Ak@fasolo.debian.org>
and subject line Bug#1026459: Removed package(s) from unstable
has caused the Debian Bug report #827525,
regarding kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
827525: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827525
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: kvmtool
Version: 0.20160419-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-mips@lists.debian.org
Usertags: mips-patch


Package kvmtool FTBFS for mips64el with the following error:

> LINK     lkvm
> /usr/bin/ld: guest/guest_init.o: warning: linking abicalls files with non-abicalls files
> /usr/bin/ld: guest/guest_init.o: linking 32-bit code with 64-bit code
> /usr/bin/ld: failed to merge target specific data of file guest/guest_init.o
> collect2: error: ld returned 1 exit status
> Makefile:381: recipe for target 'lkvm' failed
> make[1]: *** [lkvm] Error 1

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=kvmtool&arch=mips64el&ver=0.20160419-1&stamp=1463209003

The reason for that is behaviour is the way of creation guest_init.o.
> ld -r -b binary -o guest/guest_init.o guest/init

Resulting file is "MIPS-I" instead of expected "MIPS64 rel2".
> file guest/guest_init.o.cp 
> guest/guest_init.o.cp: ELF 64-bit LSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped

If options "-r -b binary" are used, linker will ignore flags of input file "Flags: 0x80000006, pic, cpic, mips64r2",
and flags of resulting guest_init.o file will be  "Flags: 0x0".

Solution for this issue could be using different method for creation guest_init.o.
If xxd and gcc are used instead of ld, resulting file will have regular flags.
> xxd -i guest/init | $(CC) -c -x c - -o guest/guest_init.o
Here are proposed changes for this issue.
http://www.spinics.net/lists/kvm/msg118016.html

I have created a patch that fixes this issue modeled on mentioned solution.
Using this patch I was able to build kvmtool for mips64el, mipsel, i386, amd64.
The patch is attached.

Could you please consider including this patch.

--- kvmtool-0.20160419.orig/Makefile
+++ kvmtool-0.20160419/Makefile
@@ -395,8 +395,7 @@ endif
 $(GUEST_INIT): guest/init.c
 	$(E) "  LINK    " $@
 	$(Q) $(CC) $(GUEST_INIT_FLAGS) guest/init.c -o $@
-	$(Q) $(LD) -r -b binary -o guest/guest_init.o $(GUEST_INIT)
-
+	$(Q) xxd -i $@ | $(CC) -c -x c - -o guest/guest_init.o
 %.s: %.c
 	$(Q) $(CC) -o $@ -S $(CFLAGS) -fverbose-asm $<
 
--- kvmtool-0.20160419.orig/builtin-setup.c
+++ kvmtool-0.20160419/builtin-setup.c
@@ -146,8 +146,8 @@ static int extract_file(const char *gues
 	return 0;
 }
 
-extern char _binary_guest_init_start;
-extern char _binary_guest_init_size;
+extern char guest_init;
+extern char guest_init_len;
 extern char _binary_guest_pre_init_start;
 extern char _binary_guest_pre_init_size;
 
@@ -163,8 +163,8 @@ int kvm_setup_guest_init(const char *gue
 		return err;
 #endif
 	err = extract_file(guestfs_name, "virt/init",
-				&_binary_guest_init_start,
-				&_binary_guest_init_size);
+				&guest_init,
+				&guest_init_len);
 	return err;
 }
 #else

--- End Message ---
--- Begin Message ---
Version: 0.20170904-2+rm

Dear submitter,

as the package kvmtool has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1026459

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: