GNU bug report logs - #44445
json-c cross-build fails from x86-64 to armhf

Previous Next

Package: guix;

Reported by: Jesse Gibbons <jgibbons2357 <at> gmail.com>

Date: Wed, 4 Nov 2020 15:45:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44445 in the body.
You can then email your comments to 44445 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#44445; Package guix. (Wed, 04 Nov 2020 15:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jesse Gibbons <jgibbons2357 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 04 Nov 2020 15:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jesse Gibbons <jgibbons2357 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: json-c cross-build fails from x86-64 to armhf
Date: Wed, 4 Nov 2020 08:44:39 -0700
[Message part 1 (text/plain, inline)]
I'm trying to build a guix system for my banana pi m2u, but json-c fails 
to cross-build.

~$ guix describe
Generation 319    Nov 04 2020 06:41:25    (current)
  guix 3d67269
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 3d67269ee787c8624bafdd68df9fbf7eedd8eb1e

~$ guix build --system=armhf-linux json-c
...
command "cmake" "../json-c-0.14" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" 
"-DCMAKE_INSTALL_PREFIX=/gnu/store/yqaw63n8wmg7f2ncc24019z87m5cwhim-json-c-0.14" 
"-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" 
"-DCMAKE_INSTALL_RPATH=/gnu/store/yqaw63n8wmg7f2ncc24019z87m5cwhim-json-c-0.14/lib" 
"-DCMAKE_VERBOSE_MAKEFILE=ON" failed with status 1
builder for 
`/gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv' failed 
with exit code 1
build of /gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv failed
View build log at 
'/var/log/guix/drvs/m3/x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv.bz2'.
guix build: error: build of 
`/gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv' failed


Log attached.


[x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv.bz2 (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#44445; Package guix. (Wed, 04 Nov 2020 16:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 44445 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Jesse Gibbons <jgibbons2357 <at> gmail.com>
Cc: 44445 <at> debbugs.gnu.org
Subject: Re: bug#44445: json-c cross-build fails from x86-64 to armhf
Date: Wed, 4 Nov 2020 17:47:16 +0100
[Message part 1 (text/plain, inline)]
Are you really using a cross-compiler or are you using qemu transparent emulation?

If the latter, this is a known problem, see bug# 43513.

Right now, I wouldn't use qemu transparent emulation in order to build anything
for systems where the register width of guest and Linux kernel is different.

If you are lucky, the build fails.  If you are unlucky, the build succeeds but
is subtly broken.

(I tried to fix that on core-updates, but core-updates without any changes
already doesn't work--so I gave up)
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#44445; Package guix. (Fri, 06 Nov 2020 10:02:02 GMT) Full text and rfc822 format available.

Message #11 received at 44445 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jesse Gibbons <jgibbons2357 <at> gmail.com>
Cc: 44445 <at> debbugs.gnu.org
Subject: Re: bug#44445: json-c cross-build fails from x86-64 to armhf
Date: Fri, 06 Nov 2020 11:01:04 +0100
Hi,

Jesse Gibbons <jgibbons2357 <at> gmail.com> skribis:

> ~$ guix build --system=armhf-linux json-c

Like Danny hinted, this is *not* cross-compilation: this is native
compilation on ARMv7.  It works because either you’ve set up offloading
to an actual ARMv7 machine, or you’ve set up transparent QEMU emulation.

In the latter case, you may encounter issues like those Danny mentions.

Thanks,
Ludo’.




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 27 Aug 2021 19:44:02 GMT) Full text and rfc822 format available.

Notification sent to Jesse Gibbons <jgibbons2357 <at> gmail.com>:
bug acknowledged by developer. (Fri, 27 Aug 2021 19:44:02 GMT) Full text and rfc822 format available.

Message #16 received at 44445-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Jesse Gibbons <jgibbons2357 <at> gmail.com>
Cc: 44445-done <at> debbugs.gnu.org
Subject: Re: bug#44445: json-c cross-build fails from x86-64 to armhf
Date: Fri, 27 Aug 2021 15:43:14 -0400
Hello,

Jesse Gibbons <jgibbons2357 <at> gmail.com> writes:

> I'm trying to build a guix system for my banana pi m2u, but json-c
> fails to cross-build.
>
> ~$ guix describe
> Generation 319    Nov 04 2020 06:41:25    (current)
>   guix 3d67269
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 3d67269ee787c8624bafdd68df9fbf7eedd8eb1e
>
> ~$ guix build --system=armhf-linux json-c
> ...
> command "cmake" "../json-c-0.14" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
> "-DCMAKE_INSTALL_PREFIX=/gnu/store/yqaw63n8wmg7f2ncc24019z87m5cwhim-json-c-0.14" 
> "-DCMAKE_INSTALL_LIBDIR=lib"
> "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
> "-DCMAKE_INSTALL_RPATH=/gnu/store/yqaw63n8wmg7f2ncc24019z87m5cwhim-json-c-0.14/lib" 
> "-DCMAKE_VERBOSE_MAKEFILE=ON" failed with status 1
> builder for
> `/gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv' failed 
> with exit code 1
> build of /gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv failed
> View build log at
> '/var/log/guix/drvs/m3/x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv.bz2'.
> guix build: error: build of
> `/gnu/store/m3x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv' failed
>
>
> Log attached.

As others have said, it looks like you used a native system here (via
offloading/QEMU user emulation) or both.  QEMU has limitations that
often causes run time failure, such as during the test suites.

There are substitutes for json-c for both the aarch64-linux and
arm-linux systems, and cross-compiling tested fine as well too:

$ guix build json-c --target=arm-linux-gnueabihf
/gnu/store/dmcii1kjf7035gfn8rg5xws3an7avffl-json-c-0.14

$ guix build json-c --target=aarch64-linux-gnu
/gnu/store/7y20nqvp19254picqa0l345lklf4zih1-json-c-0.14

Closing,

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Sep 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.