All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Maciej Grela <enki@fsck.pl>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue
Date: Mon, 6 Nov 2023 14:30:12 +0100	[thread overview]
Message-ID: <20231106133012.GB2625@scaer> (raw)
In-Reply-To: <20231106130835.116844-1-enki@fsck.pl>

Maciej, All,

On 2023-11-06 14:08 +0100, Maciej Grela spake thusly:
> spirv-tools requires a toolchain w/ shared libs, add flag dependency and comment.
> 
> Fixes: http://autobuild.buildroot.net/results/a1f615d2410bffb6fdacc8586761c9def05aafa9
> Fixes: http://autobuild.buildroot.net/results/294ade8c9aa3d650fa5ab6cc34701c4176bc197f

Sorry, but I still don't understansd how those two build failures relate
to static builds.

Both failed build logs are about a broken C++ compiler:

    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Check for working CXX compiler: /usr/bin/clang++
    -- Check for working CXX compiler: /usr/bin/clang++ - broken

And indeed, it is not surprising that the host C++ compiler be broken
when doing cross-compilation, as it is used to tentatively build taget
code:

    /usr/bin/clang++ --sysroot=/home/thomas/autobuild/instance-1/output-1/host/armeb-buildroot-linux-uclibcgnueabi/sysroot -O3 -DNDEBUG -static  CMakeFiles/cmTC_faefe.dir/testCXXCompiler.cxx.o -o cmTC_faefe
    /usr/bin/ld: /home/thomas/autobuild/instance-1/output-1/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/crt1.o: relocations in generic ELF (EM: 40)
    /usr/bin/ld: /home/thomas/autobuild/instance-1/output-1/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/crt1.o: error adding symbols: file in wrong format
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

So, if it really is about a static linking issue, we need more
details...

Regards,
Yann E. MORIN.

> Signed-off-by: Maciej Grela <enki@fsck.pl>
> ---
>  package/spirv-tools/Config.in | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/package/spirv-tools/Config.in b/package/spirv-tools/Config.in
> index 39fdb80b86..c1d3a4f9bc 100644
> --- a/package/spirv-tools/Config.in
> +++ b/package/spirv-tools/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_SPIRV_TOOLS
>  	bool "spirv-tools"
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
> +	depends on !BR2_STATIC_LIBS
>  	select BR2_PACKAGE_SPIRV_HEADERS
>  	help
>  	  The SPIR-V Tools project provides an API and commands for
> @@ -9,6 +10,8 @@ config BR2_PACKAGE_SPIRV_TOOLS
>  
>  	  https://github.com/KhronosGroup/SPIRV-Tools
>  
> -comment "spirv-tools needs a toolchain w/ C++, gcc >= 7"
> +comment "spirv-tools needs a toolchain w/ C++, gcc >= 7, dynamic library"
>  	depends on !BR2_INSTALL_LIBSTDCPP || \
> -		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> +		BR2_STATIC_LIBS
> +
> -- 
> 2.39.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-11-06 13:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27  9:15 [Buildroot] [PATCH v2 1/1] package/spirv-tools: fix build issue Maciej Grela
2023-10-28 22:13 ` Yann E. MORIN
2023-10-30 13:23 ` enki
2023-10-30 13:28   ` [Buildroot] [PATCH v3 " Maciej Grela
2023-11-04 13:35     ` Thomas Petazzoni via buildroot
2023-11-05 19:40       ` [Buildroot] [PATCH v4 " Maciej Grela
2023-11-05 19:45       ` [Buildroot] [PATCH v3 " enki
2023-11-06  7:48         ` Thomas Petazzoni via buildroot
2023-11-06 13:08           ` [Buildroot] [PATCH v4 " Maciej Grela
2023-11-06 13:30             ` Yann E. MORIN [this message]
2023-11-06 21:00               ` enki
2023-11-06 21:43                 ` Yann E. MORIN

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=20231106133012.GB2625@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=enki@fsck.pl \
    /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 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.