* Re: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
[not found] <D2EE012454FB9F4A86B9302E531B435E708B3C53@BADAG02.ba.imgtec.org>
@ 2016-06-17 18:31 ` Riku Voipio
2016-06-20 9:13 ` Andre Przywara
0 siblings, 1 reply; 4+ messages in thread
From: Riku Voipio @ 2016-06-17 18:31 UTC (permalink / raw)
To: Dejan Latinovic, 827525, kvm, Andre Przywara
[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]
On 17 June 2016 at 15:04, Dejan Latinovic <Dejan.Latinovic@imgtec.com> wrote:
> 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.
I think the patch is better applied directly upstream, I'm sure there
are non-Debian users who would like to use kvmtool on mips64el.
Riku
[-- Attachment #2: use-xxd-instead-of-ld.patch --]
[-- Type: text/x-patch, Size: 1021 bytes --]
--- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
2016-06-17 18:31 ` Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code Riku Voipio
@ 2016-06-20 9:13 ` Andre Przywara
2016-11-28 10:40 ` Dejan Latinovic
0 siblings, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2016-06-20 9:13 UTC (permalink / raw)
To: Riku Voipio, Dejan Latinovic, 827525, kvm
Hi,
(thanks Riku for forwarding this!)
On 17/06/16 19:31, Riku Voipio wrote:
> On 17 June 2016 at 15:04, Dejan Latinovic <Dejan.Latinovic@imgtec.com> wrote:
>> 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.
>
> I think the patch is better applied directly upstream, I'm sure there
> are non-Debian users who would like to use kvmtool on mips64el.
Dejan, do you have a mean of actually _testing_ this?
I haven't seen a kvmtool/MIPS user for a while (also the build is broken
for ages), so I am curious ...
Let me take a look and revive this old patch, which needs some
adjustments due to the new (pre-)init code.
Cheers,
Andre.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
2016-06-20 9:13 ` Andre Przywara
@ 2016-11-28 10:40 ` Dejan Latinovic
2017-01-02 13:39 ` Riku Voipio
0 siblings, 1 reply; 4+ messages in thread
From: Dejan Latinovic @ 2016-11-28 10:40 UTC (permalink / raw)
To: Andre Przywara, Riku Voipio, 827525, kvm
Hi Andre,
Did you have a chance to look at the patch?
I did not do any additional testing. If you specify what particular tests you mean I am willing to run it.
Are you planing to forward this patch upstream or you want me to do that?
Regards,
Dejan
________________________________________
From: Andre Przywara [andre.przywara@arm.com]
Sent: Monday, June 20, 2016 11:13 AM
To: Riku Voipio; Dejan Latinovic; 827525@bugs.debian.org; kvm@vger.kernel.org
Subject: Re: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
Hi,
(thanks Riku for forwarding this!)
On 17/06/16 19:31, Riku Voipio wrote:
> On 17 June 2016 at 15:04, Dejan Latinovic <Dejan.Latinovic@imgtec.com> wrote:
>> 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.
>
> I think the patch is better applied directly upstream, I'm sure there
> are non-Debian users who would like to use kvmtool on mips64el.
Dejan, do you have a mean of actually _testing_ this?
I haven't seen a kvmtool/MIPS user for a while (also the build is broken
for ages), so I am curious ...
Let me take a look and revive this old patch, which needs some
adjustments due to the new (pre-)init code.
Cheers,
Andre.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
2016-11-28 10:40 ` Dejan Latinovic
@ 2017-01-02 13:39 ` Riku Voipio
0 siblings, 0 replies; 4+ messages in thread
From: Riku Voipio @ 2017-01-02 13:39 UTC (permalink / raw)
To: Dejan Latinovic; +Cc: Andre Przywara, 827525, kvm
Hi Andre and Dejan,
Debian stretch freeze is closing in, what's the state with the patch
for fixing mips64el build?
Riku
On 28 November 2016 at 12:40, Dejan Latinovic
<Dejan.Latinovic@imgtec.com> wrote:
> Hi Andre,
>
> Did you have a chance to look at the patch?
>
> I did not do any additional testing. If you specify what particular tests you mean I am willing to run it.
> Are you planing to forward this patch upstream or you want me to do that?
>
> Regards,
> Dejan
>
> ________________________________________
> From: Andre Przywara [andre.przywara@arm.com]
> Sent: Monday, June 20, 2016 11:13 AM
> To: Riku Voipio; Dejan Latinovic; 827525@bugs.debian.org; kvm@vger.kernel.org
> Subject: Re: Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code
>
> Hi,
>
> (thanks Riku for forwarding this!)
>
> On 17/06/16 19:31, Riku Voipio wrote:
>> On 17 June 2016 at 15:04, Dejan Latinovic <Dejan.Latinovic@imgtec.com> wrote:
>>> 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.
>>
>> I think the patch is better applied directly upstream, I'm sure there
>> are non-Debian users who would like to use kvmtool on mips64el.
>
> Dejan, do you have a mean of actually _testing_ this?
> I haven't seen a kvmtool/MIPS user for a while (also the build is broken
> for ages), so I am curious ...
>
> Let me take a look and revive this old patch, which needs some
> adjustments due to the new (pre-)init code.
>
> Cheers,
> Andre.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-02 13:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <D2EE012454FB9F4A86B9302E531B435E708B3C53@BADAG02.ba.imgtec.org>
2016-06-17 18:31 ` Bug#827525: kvmtool: FTBFS on mips64el: guest/guest_init.o: linking 32-bit code with 64-bit code Riku Voipio
2016-06-20 9:13 ` Andre Przywara
2016-11-28 10:40 ` Dejan Latinovic
2017-01-02 13:39 ` Riku Voipio
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.