Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/uhd: fix build with riscV
Date: Sun, 1 Nov 2020 11:14:24 +0100	[thread overview]
Message-ID: <20201101101424.GC2887157@scaer> (raw)
In-Reply-To: <20201030153145.1198183-1-gwenj@trabucayre.com>

Gwenhael, All,

On 2020-10-30 16:31 +0100, Gwenhael Goavec-Merou spake thusly:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> UHD with riscV CPU fails to build with error like:
> /xxx/output-1/build/uhd-3.15.0.0/host/lib/deps/rpclib/include/rpc/msgpack/pack.hpp:190:2: error: #error msgpack-c supports only big endian and little endian
>   190 | #error msgpack-c supports only big endian and little endian
>       |  ^~~~~
> 
> msgpack, required by MPMD, support many architecture but not riscV, and,
> consequently is unable to determine the endianess.

The issue is two folds:
 1. uhd bundles (or re-implements?) its own copy of msgpack-c;
 2. the bundled msgpack-c borked its detection of the endianness.

So, I think a better solution would be to actually fix the endian
detection [0]. Indeed, a CPU is either big or little endian [1], so
failing to detect actually detect that is pretty serious...

[0] uhd-3.15.0.0/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h

[1] Yeah, back in the good old days, we had mixed endian CPUs that were
word-swapped, but those really no longer exist, and are definitely not a
target for Buildroot.

Regards,
Yann E. MORIN.

> This patch add a depends on !(BR2_RISCV_64 || BR2_RISCV_32) to disable MPMD
> for riscV target.
> Since E300 and E320 needs MPMD, the select is replaced by depends on
> 
> Fixes:
> - http://autobuild.buildroot.net/results/b501a8bf90f2eb10c3f98f26a52539392d320088/
> - http://autobuild.buildroot.net/results/f7ae898c6ecdfa568eb97f7cae6447e97ce306a0/
> 
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
>  package/uhd/Config.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/package/uhd/Config.in b/package/uhd/Config.in
> index 32cb4cf89d..cf4f470629 100644
> --- a/package/uhd/Config.in
> +++ b/package/uhd/Config.in
> @@ -45,13 +45,13 @@ config BR2_PACKAGE_UHD_B200
>  
>  config BR2_PACKAGE_UHD_E300
>  	bool "E300 support"
> -	select BR2_PACKAGE_UHD_MPMD
> +	depends on BR2_PACKAGE_UHD_MPMD
>  	help
>  	  enable E300 support
>  
>  config BR2_PACKAGE_UHD_E320
>  	bool "E320 support"
> -	select BR2_PACKAGE_UHD_MPMD
> +	depends on BR2_PACKAGE_UHD_MPMD
>  	help
>  	  enable E320 support
>  
> @@ -62,6 +62,7 @@ config BR2_PACKAGE_UHD_EXAMPLES
>  
>  config BR2_PACKAGE_UHD_MPMD
>  	bool "MPMD support"
> +	depends on !(BR2_RISCV_64 || BR2_RISCV_32)
>  	help
>  	  enable MPMD support
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2020-11-01 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 15:31 [Buildroot] [PATCH] package/uhd: fix build with riscV Gwenhael Goavec-Merou
2020-11-01 10:14 ` Yann E. MORIN [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-12  6:30 Gwenhael Goavec-Merou
2021-01-23 21:00 ` Thomas Petazzoni
2021-01-28 17:01 ` Peter Korsgaard

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=20201101101424.GC2887157@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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