* [Buildroot] [PATCH v2 1/1] package/spirv-tools: fix build issue @ 2023-10-27 9:15 Maciej Grela 2023-10-28 22:13 ` Yann E. MORIN 2023-10-30 13:23 ` enki 0 siblings, 2 replies; 12+ messages in thread From: Maciej Grela @ 2023-10-27 9:15 UTC (permalink / raw) To: buildroot; +Cc: Maciej Grela spirv-tools requires a C++ toolchain with shared libs, add flag dependency and comment. Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff Fixes: http://autobuild.buildroot.net/results/a1f615d2410bffb6fdacc8586761c9def05aafa9 Fixes: http://autobuild.buildroot.net/results/294ade8c9aa3d650fa5ab6cc34701c4176bc197f Fixes: http://autobuild.buildroot.net/results/40e8f50eb7e82ca42f84fa5f4336cefb51204a28 Fixes: http://autobuild.buildroot.net/results/3c3be2c454863709d0db896bafbe11cd9df092a3 Fixes: http://autobuild.buildroot.net/results/8df8de1aeaf1317f6ba43f6752502da2eedcdea1 Fixes: http://autobuild.buildroot.net/results/ea2c1f97e82efcd867c79f05ab02f5f099140379 Fixes: http://autobuild.buildroot.net/results/fa4e39d1e78e885d20851201ed8a6fcf9d48d7d6 Fixes: http://autobuild.buildroot.net/results/4ed3f13b3ce178f8fe87de7aee86acb9642e3434 Fixes: http://autobuild.buildroot.net/results/e1b4853a7e8714fd2af8f8677681c9895034b3e8 Signed-off-by: Maciej Grela <enki@fsck.pl> --- package/spirv-tools/Config.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/spirv-tools/Config.in b/package/spirv-tools/Config.in index e2f46253a9..f1ae11bd09 100644 --- a/package/spirv-tools/Config.in +++ b/package/spirv-tools/Config.in @@ -1,6 +1,11 @@ +comment "spirv-tools needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || ( !BR2_SHARED_LIBS && !BR2_SHARED_STATIC_LIBS ) + config BR2_PACKAGE_SPIRV_TOOLS bool "spirv-tools" select BR2_PACKAGE_SPIRV_HEADERS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_SHARED_LIBS || BR2_SHARED_STATIC_LIBS help The SPIR-V Tools project provides an API and commands for processing SPIR-V modules. -- 2.39.2 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/spirv-tools: fix build issue 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 1 sibling, 0 replies; 12+ messages in thread From: Yann E. MORIN @ 2023-10-28 22:13 UTC (permalink / raw) To: Maciej Grela; +Cc: buildroot Maciej, All, On 2023-10-27 11:15 +0200, Maciej Grela spake thusly: > spirv-tools requires a C++ toolchain with shared libs, add flag dependency and comment. Fabrice had already sent a patch adding C++ requirement, and since it also was more strict in requiring C++17, I applied his patch. > Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff > Fixes: http://autobuild.buildroot.net/results/a1f615d2410bffb6fdacc8586761c9def05aafa9 > Fixes: http://autobuild.buildroot.net/results/294ade8c9aa3d650fa5ab6cc34701c4176bc197f > Fixes: http://autobuild.buildroot.net/results/40e8f50eb7e82ca42f84fa5f4336cefb51204a28 > Fixes: http://autobuild.buildroot.net/results/3c3be2c454863709d0db896bafbe11cd9df092a3 > Fixes: http://autobuild.buildroot.net/results/8df8de1aeaf1317f6ba43f6752502da2eedcdea1 > Fixes: http://autobuild.buildroot.net/results/ea2c1f97e82efcd867c79f05ab02f5f099140379 > Fixes: http://autobuild.buildroot.net/results/fa4e39d1e78e885d20851201ed8a6fcf9d48d7d6 > Fixes: http://autobuild.buildroot.net/results/4ed3f13b3ce178f8fe87de7aee86acb9642e3434 > Fixes: http://autobuild.buildroot.net/results/e1b4853a7e8714fd2af8f8677681c9895034b3e8 AFAICS, none of those relate to shared libraries, but only to C++. Can you point to a build failure that is explicitly about shared libs? > Signed-off-by: Maciej Grela <enki@fsck.pl> > --- > package/spirv-tools/Config.in | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/package/spirv-tools/Config.in b/package/spirv-tools/Config.in > index e2f46253a9..f1ae11bd09 100644 > --- a/package/spirv-tools/Config.in > +++ b/package/spirv-tools/Config.in > @@ -1,6 +1,11 @@ > +comment "spirv-tools needs a toolchain w/ C++, dynamic library" > + depends on !BR2_INSTALL_LIBSTDCPP || ( !BR2_SHARED_LIBS && !BR2_SHARED_STATIC_LIBS ) > + > config BR2_PACKAGE_SPIRV_TOOLS > bool "spirv-tools" > select BR2_PACKAGE_SPIRV_HEADERS > + depends on BR2_INSTALL_LIBSTDCPP > + depends on BR2_SHARED_LIBS || BR2_SHARED_STATIC_LIBS Also this is technically correct (and I would thinkg semantically the best), we usally use the shorter dependnecy on !static: depends on !BR2_STATIC_LIBS You also forgot to add a comment for when the condition is not met. So, if sahred libs is really required, can you respin a patch with the above fixed, please? Regards, Yann E. MORIN. > help > The SPIR-V Tools project provides an API and commands for > processing SPIR-V modules. > -- > 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/spirv-tools: fix build issue 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 1 sibling, 1 reply; 12+ messages in thread From: enki @ 2023-10-30 13:23 UTC (permalink / raw) To: buildroot > Maciej, All, Sorry for not replying to your email directly but instead mashing this response out of the original email as I seem to have deleted the thread somehow :/. > On 2023-10-27 11:15 +0200, Maciej Grela spake thusly: > > spirv-tools requires a C++ toolchain with shared libs, add flag dependency and comment. > > Fabrice had already sent a patch adding C++ requirement, and since it > also was more strict in requiring C++17, I applied his patch. > > > Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff > > Fixes: http://autobuild.buildroot.net/results/a1f615d2410bffb6fdacc8586761c9def05aafa9 > > Fixes: http://autobuild.buildroot.net/results/294ade8c9aa3d650fa5ab6cc34701c4176bc197f > > Fixes: http://autobuild.buildroot.net/results/40e8f50eb7e82ca42f84fa5f4336cefb51204a28 > > Fixes: http://autobuild.buildroot.net/results/3c3be2c454863709d0db896bafbe11cd9df092a3 > > Fixes: http://autobuild.buildroot.net/results/8df8de1aeaf1317f6ba43f6752502da2eedcdea1 > > Fixes: http://autobuild.buildroot.net/results/ea2c1f97e82efcd867c79f05ab02f5f099140379 > > Fixes: http://autobuild.buildroot.net/results/fa4e39d1e78e885d20851201ed8a6fcf9d48d7d6 > > Fixes: http://autobuild.buildroot.net/results/4ed3f13b3ce178f8fe87de7aee86acb9642e3434 > > Fixes: http://autobuild.buildroot.net/results/e1b4853a7e8714fd2af8f8677681c9895034b3e8 > > AFAICS, none of those relate to shared libraries, but only to C++. > > Can you point to a build failure that is explicitly about shared libs? > Consider a1f615d2410bffb6fdacc8586761c9def05aafa9, when you try download the config and try to build spirv-tools with just enabling the C++ toolchain it fails with the following error: [ 54%] Building CXX object source/opt/CMakeFiles/SPIRV-Tools-opt.dir/dataflow.cpp.o [ 55%] Building CXX object source/opt/CMakeFiles/SPIRV-Tools-opt.dir/dead_branch_elim_pass.cpp.o /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): in function `__uClibc_fini': __uClibc_main.c:(.text+0x140): undefined reference to `__fini_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x144): undefined reference to `__fini_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x148): undefined reference to `__fini_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): in function `__uClibc_main': __uClibc_main.c:(.text+0x430): undefined reference to `__preinit_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x434): undefined reference to `__preinit_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x438): undefined reference to `__init_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x43c): undefined reference to `__init_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: libSPIRV-Tools-shared.so: hidden symbol `__preinit_array_start' isn't defined /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status As far as my research about these errors suggested this is a result of trying to do a dynamic link with a static library. After enabling BR2_SHARED_LIBS and rebuilding the entire toolchain (make clean + make spirv-tools again) the build succeeds: [ 99%] Building CXX object tools/CMakeFiles/spirv-reduce.dir/util/cli_consumer.cpp.o [ 99%] Building CXX object tools/CMakeFiles/spirv-reduce.dir/reduce/reduce.cpp.o [ 99%] Linking CXX executable spirv-link [ 99%] Built target spirv-link [100%] Linking CXX executable spirv-diff [100%] Built target spirv-diff [100%] Linking CXX executable spirv-reduce [100%] Built target spirv-reduce >>> spirv-tools 1.3.261.1 Installing to staging directory PATH="/home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/bin:/home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/sbin:/home/enki/.local/bin:/home/enki/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" DESTDIR=/home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/armeb-buildroot-linux-uclibcgnueabi/sysroot /usr/bin/cmake --install /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/build/spirv-tools-1.3.261.1/ The failure mode here might be caused by the fact that the .mk file explicitly disables static builds for spirv-tools: ➜ buildroot git:(75fa573ef9) ✗ cat package/spirv-tools/spirv-tools.mk # Keep in sync with spirv-headers version SPIRV_TOOLS_VERSION = 1.3.261.1 SPIRV_TOOLS_SITE = $(call github,KhronosGroup,SPIRV-Tools,sdk-$(SPIRV_TOOLS_VERSION)) SPIRV_TOOLS_LICENSE = Apache-2.0 SPIRV_TOOLS_LICENSE_FILES = LICENSE SPIRV_TOOLS_DEPENDENCIES = spirv-headers SPIRV_TOOLS_INSTALL_STAGING = YES SPIRV_TOOLS_CONF_OPTS = \ -DSPIRV-Headers_SOURCE_DIR=$(STAGING_DIR)/usr \ *** -DSPIRV_TOOLS_BUILD_STATIC=OFF \ **** -DSPIRV_SKIP_TESTS=ON \ -DSPIRV_WERROR=OFF > > Signed-off-by: Maciej Grela <enki at fsck.pl> > > --- > > package/spirv-tools/Config.in | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/package/spirv-tools/Config.in b/package/spirv-tools/Config.in > > index e2f46253a9..f1ae11bd09 100644 > > --- a/package/spirv-tools/Config.in > > +++ b/package/spirv-tools/Config.in > > @@ -1,6 +1,11 @@ > > +comment "spirv-tools needs a toolchain w/ C++, dynamic library" > > + depends on !BR2_INSTALL_LIBSTDCPP || ( !BR2_SHARED_LIBS && !BR2_SHARED_STATIC_LIBS ) > > + > > config BR2_PACKAGE_SPIRV_TOOLS > > bool "spirv-tools" > > select BR2_PACKAGE_SPIRV_HEADERS > > + depends on BR2_INSTALL_LIBSTDCPP > > + depends on BR2_SHARED_LIBS || BR2_SHARED_STATIC_LIBS > Also this is technically correct (and I would thinkg semantically the > best), we usally use the shorter dependnecy on !static: > > depends on !BR2_STATIC_LIBS > > You also forgot to add a comment for when the condition is not met. > > So, if sahred libs is really required, can you respin a patch with the > above fixed, please? Yes, one sec. -- enki _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/1] package/spirv-tools: fix build issue 2023-10-30 13:23 ` enki @ 2023-10-30 13:28 ` Maciej Grela 2023-11-04 13:35 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 12+ messages in thread From: Maciej Grela @ 2023-10-30 13:28 UTC (permalink / raw) To: buildroot; +Cc: Maciej Grela spirv-tools requires a toolchain w/ shared libs, add flag dependency and comment. Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff Fixes: http://autobuild.buildroot.net/results/a1f615d2410bffb6fdacc8586761c9def05aafa9 Fixes: http://autobuild.buildroot.net/results/294ade8c9aa3d650fa5ab6cc34701c4176bc197f Fixes: http://autobuild.buildroot.net/results/40e8f50eb7e82ca42f84fa5f4336cefb51204a28 Fixes: http://autobuild.buildroot.net/results/8df8de1aeaf1317f6ba43f6752502da2eedcdea1 Fixes: http://autobuild.buildroot.net/results/ea2c1f97e82efcd867c79f05ab02f5f099140379 Fixes: http://autobuild.buildroot.net/results/fa4e39d1e78e885d20851201ed8a6fcf9d48d7d6 Fixes: http://autobuild.buildroot.net/results/4ed3f13b3ce178f8fe87de7aee86acb9642e3434 Fixes: http://autobuild.buildroot.net/results/e1b4853a7e8714fd2af8f8677681c9895034b3e8 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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/spirv-tools: fix build issue 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 0 siblings, 2 replies; 12+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-11-04 13:35 UTC (permalink / raw) To: Maciej Grela; +Cc: Yann E. MORIN, buildroot Hello, On Mon, 30 Oct 2023 14:28:40 +0100 Maciej Grela <enki@fsck.pl> wrote: > spirv-tools requires a toolchain w/ shared libs, add flag dependency and comment. > > Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff This first build issue is a configuration with BR2_SHARED_STATIC_LIBS=y, so this patch definitely cannot fix it. Best regards, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue 2023-11-04 13:35 ` Thomas Petazzoni via buildroot @ 2023-11-05 19:40 ` Maciej Grela 2023-11-05 19:45 ` [Buildroot] [PATCH v3 " enki 1 sibling, 0 replies; 12+ messages in thread From: Maciej Grela @ 2023-11-05 19:40 UTC (permalink / raw) To: buildroot 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 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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/spirv-tools: fix build issue 2023-11-04 13:35 ` Thomas Petazzoni via buildroot 2023-11-05 19:40 ` [Buildroot] [PATCH v4 " Maciej Grela @ 2023-11-05 19:45 ` enki 2023-11-06 7:48 ` Thomas Petazzoni via buildroot 1 sibling, 1 reply; 12+ messages in thread From: enki @ 2023-11-05 19:45 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: Yann E. MORIN, Thomas Petazzoni via buildroot ---- On Sat, 04 Nov 2023 14:35:27 +0100 Thomas Petazzoni via buildroot wrote --- > Hello, > > > > On Mon, 30 Oct 2023 14:28:40 +0100 > > Maciej Grela enki@fsck.pl> wrote: > > > > > spirv-tools requires a toolchain w/ shared libs, add flag dependency and comment. > > > > > > Fixes: http://autobuild.buildroot.net/results/53b3cf124d6c299398e620120465eca396ddcdff > > > > This first build issue is a configuration with > > BR2_SHARED_STATIC_LIBS=y, so this patch definitely cannot fix it. > Right, the initial patch also added a dependency on the C++ compiler. I reworked it after Yann's reply to be applied on top of the already applied C++17 requirement patch. I forgot to adjust the list of Fixed: builds. This should now be ok only referencing BR2_STATIC_LIBS cases. -- enki _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/spirv-tools: fix build issue 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 0 siblings, 1 reply; 12+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-11-06 7:48 UTC (permalink / raw) To: enki; +Cc: Yann E. MORIN, Thomas Petazzoni via buildroot On Sun, 05 Nov 2023 20:45:45 +0100 enki <enki@fsck.pl> wrote: > Right, the initial patch also added a dependency on the C++ compiler. I reworked it after Yann's reply to be applied on top of the > already applied C++17 requirement patch. I forgot to adjust the list of Fixed: builds. > This should now be ok only referencing BR2_STATIC_LIBS cases. Thanks for the feedback. Could you send an updated patch, with an improved/update commit log? Thanks a lot, Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue 2023-11-06 7:48 ` Thomas Petazzoni via buildroot @ 2023-11-06 13:08 ` Maciej Grela 2023-11-06 13:30 ` Yann E. MORIN 0 siblings, 1 reply; 12+ messages in thread From: Maciej Grela @ 2023-11-06 13:08 UTC (permalink / raw) To: buildroot 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 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 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue 2023-11-06 13:08 ` [Buildroot] [PATCH v4 " Maciej Grela @ 2023-11-06 13:30 ` Yann E. MORIN 2023-11-06 21:00 ` enki 0 siblings, 1 reply; 12+ messages in thread From: Yann E. MORIN @ 2023-11-06 13:30 UTC (permalink / raw) To: Maciej Grela; +Cc: buildroot 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue 2023-11-06 13:30 ` Yann E. MORIN @ 2023-11-06 21:00 ` enki 2023-11-06 21:43 ` Yann E. MORIN 0 siblings, 1 reply; 12+ messages in thread From: enki @ 2023-11-06 21:00 UTC (permalink / raw) To: Yann E. MORIN; +Cc: buildroot ---- On Mon, 06 Nov 2023 14:30:12 +0100 Yann E. MORIN wrote --- > 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... > > If you take (as an example) the config from a1f615d2410bffb6fdacc8586761c9def05aafa9, enable the C++ support and try to build you get the failure caused by ld trying to do a dynamic link with a static library: [ 54%] Building CXX object source/opt/CMakeFiles/SPIRV-Tools-opt.dir/dataflow.cpp.o /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): in function `__uClibc_fini': __uClibc_main.c:(.text+0x140): undefined reference to `__fini_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x144): undefined reference to `__fini_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x148): undefined reference to `__fini_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/armeb-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): in function `__uClibc_main': __uClibc_main.c:(.text+0x430): undefined reference to `__preinit_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x434): undefined reference to `__preinit_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x438): undefined reference to `__init_array_start' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: __uClibc_main.c:(.text+0x43c): undefined reference to `__init_array_end' /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: libSPIRV-Tools-shared.so: hidden symbol `__preinit_array_start' isn't defined /home/enki/a1f615d2410bffb6fdacc8586761c9def05aafa9/output/host/lib/gcc/armeb-buildroot-linux-uclibcgnueabi/12.3.0/../../../../armeb-buildroot-linux-uclibcgnueabi/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[4]: *** [source/CMakeFiles/SPIRV-Tools-shared.dir/build.make:1223: source/libSPIRV-Tools-shared.so] Błąd 1 make[3]: *** [CMakeFiles/Makefile2:1091: source/CMakeFiles/SPIRV-Tools-shared.dir/all] Błąd 2 Enabling the shared libs and rebuilding the toolchain fixes this. In other words those two builds fail *both* because of missing C++ support as well as a static-only toolchain. It's just that the missing C++ makes it fail early. -- enki _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH v4 1/1] package/spirv-tools: fix build issue 2023-11-06 21:00 ` enki @ 2023-11-06 21:43 ` Yann E. MORIN 0 siblings, 0 replies; 12+ messages in thread From: Yann E. MORIN @ 2023-11-06 21:43 UTC (permalink / raw) To: enki; +Cc: buildroot Maciej, All, On 2023-11-06 22:00 +0100, enki spake thusly: > ---- On Mon, 06 Nov 2023 14:30:12 +0100 Yann E. MORIN wrote --- > > 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. > If you take (as an example) the config from a1f615d2410bffb6fdacc8586761c9def05aafa9, enable the C++ support and try to build you get the > failure caused by ld trying to do a dynamic link with a static library: [--SNIP--] > Enabling the shared libs and rebuilding the toolchain fixes this. In > other words those two builds fail *both* because of missing C++ support > as well as a static-only toolchain. It's just that the missing C++ > makes it fail early. Here is a minimalist defconfig with static-libs: BR2_arm=y BR2_cortex_a7=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE=y BR2_STATIC_LIBS=y BR2_PACKAGE_SPIRV_TOOLS=y And with this, spirv-tools does build successfully; $ make spirv-tools-configure [...] -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/ymorin/dev/buildroot/O/master/host/bin/arm-linux-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/ymorin/dev/buildroot/O/master/host/bin/arm-linux-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter -- Configuring done (0.4s) -- Generating done (0.1s) CMake Warning: Manually-specified variables were not used by the project: BUILD_DOC BUILD_DOCS BUILD_EXAMPLE BUILD_EXAMPLES BUILD_TEST BUILD_TESTING BUILD_TESTS -- Build files have been written to: /home/ymorin/dev/buildroot/O/master/build/spirv-tools-1.3.261.1 $ make spirv-tools-build [...] [ 99%] Linking CXX static library libSPIRV-Tools-reduce.a [ 99%] Built target SPIRV-Tools-reduce [100%] Building CXX object tools/CMakeFiles/spirv-reduce.dir/util/flags.cpp.o [100%] Building CXX object tools/CMakeFiles/spirv-reduce.dir/reduce/reduce.cpp.o [100%] Building CXX object tools/CMakeFiles/spirv-reduce.dir/util/cli_consumer.cpp.o [100%] Linking CXX executable spirv-reduce [100%] Built target spirv-reduce $ make spirv-tools-install [...] $ file target/usr/bin/spirv-* target/usr/bin/spirv-as: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-cfg: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-dis: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-lesspipe.sh: a /usr/bin/env sh script, ASCII text executable target/usr/bin/spirv-link: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-lint: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-objdump: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-opt: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-reduce: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped target/usr/bin/spirv-val: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped So, strictly speaking, spirv-tools do not require shared libs, and do build OK with static-only. So, if there is an issue with static-only, there is a hidden condition as well. Can you investigate a bit further, please? Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-11-06 21:43 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2023-11-06 21:00 ` enki 2023-11-06 21:43 ` Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox