unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44445: json-c cross-build fails from x86-64 to armhf
@ 2020-11-04 15:44 Jesse Gibbons
  2020-11-04 16:47 ` Danny Milosavljevic
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jesse Gibbons @ 2020-11-04 15:44 UTC (permalink / raw)
  To: 44445

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

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.



[-- Attachment #2: x5hnlp9d9qmg72a0c7rqlz40yc0x0m-json-c-0.14.drv.bz2 --]
[-- Type: application/octet-stream, Size: 4753 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#44445: json-c cross-build fails from x86-64 to armhf
  2020-11-04 15:44 bug#44445: json-c cross-build fails from x86-64 to armhf Jesse Gibbons
@ 2020-11-04 16:47 ` Danny Milosavljevic
  2020-11-06 10:01 ` Ludovic Courtès
  2021-08-27 19:43 ` Maxim Cournoyer
  2 siblings, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2020-11-04 16:47 UTC (permalink / raw)
  To: Jesse Gibbons; +Cc: 44445

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

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)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#44445: json-c cross-build fails from x86-64 to armhf
  2020-11-04 15:44 bug#44445: json-c cross-build fails from x86-64 to armhf Jesse Gibbons
  2020-11-04 16:47 ` Danny Milosavljevic
@ 2020-11-06 10:01 ` Ludovic Courtès
  2021-08-27 19:43 ` Maxim Cournoyer
  2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-11-06 10:01 UTC (permalink / raw)
  To: Jesse Gibbons; +Cc: 44445

Hi,

Jesse Gibbons <jgibbons2357@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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#44445: json-c cross-build fails from x86-64 to armhf
  2020-11-04 15:44 bug#44445: json-c cross-build fails from x86-64 to armhf Jesse Gibbons
  2020-11-04 16:47 ` Danny Milosavljevic
  2020-11-06 10:01 ` Ludovic Courtès
@ 2021-08-27 19:43 ` Maxim Cournoyer
  2 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2021-08-27 19:43 UTC (permalink / raw)
  To: Jesse Gibbons; +Cc: 44445-done

Hello,

Jesse Gibbons <jgibbons2357@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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-27 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 15:44 bug#44445: json-c cross-build fails from x86-64 to armhf Jesse Gibbons
2020-11-04 16:47 ` Danny Milosavljevic
2020-11-06 10:01 ` Ludovic Courtès
2021-08-27 19:43 ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).