glslang: generate glslang pkg-config
PATCH v2 1/3 glslang: generate glslang pkg-config
- it will be useful for shaderc
--- .../0001-generate-glslang-pkg-config.patch | 47 +++++++++++++++++++ .../glslang/glslang_11.1.0.bb | 3 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch
meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 6692611126b40d499c94bbcc8e29604560262072 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <[email protected]> +Date: Sun, 7 Feb 2021 01:30:39 +0000 +Subject: [PATCH] generate glslang pkg-config + +Based on https://src.fedoraproject.org/rpms/glslang/blob/main/f/0001-pkg-config-compatibility.patch + +Upstream-Status: Pending + +Signed-off-by: Jose Quaresma <[email protected]> + +--- + glslang/CMakeLists.txt | 2 ++ + glslang/glslang.pc.cmake.in | 11 +++++++++++ + 2 files changed, 13 insertions(+) + create mode 100644 glslang/glslang.pc.cmake.in + +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 1c7d22a2..10c1e841 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -209,6 +209,8 @@ if(ENABLE_GLSLANG_INSTALL) + EXPORT glslangTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + +diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in +new file mode 100644 +index 00000000..64b6882d +--- /dev/null ++++ b/glslang/glslang.pc.cmake.in +@@ -0,0 +1,11 @@ ++ prefix=@CMAKE_INSTALL_PREFIX@ ++ exec_prefix=@CMAKE_INSTALL_PREFIX@ ++ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++ Name: @PROJECT_NAME@ ++ Description: OpenGL and OpenGL ES shader front end and validator ++ Requires: ++ Version: @GLSLANG_VERSION@ ++ Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper ++ Cflags: -I${includedir}
meta/recipes-graphics/glslang/glslang_11.1.0.bb +2 -1
@@ -9,7 +9,8 @@ LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exc LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5ce49c0456e9b413b98a4368c378229" SRCREV = "c594de23cdd790d64ad5f9c8b059baae0ee2941d" -SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https" +SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https \ + file://0001-generate-glslang-pkg-config.patch" UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git"
Signature · 1 line
2.30.0
PATCH v2 2/3 shaderc: add option to skip building the examples
---
...dd-option-to-skip-build-the-examples.patch | 45 +++++++++++++++++++
...lding-external-dependencies-in-thir.patch} | 32 +++++--------
.../shaderc/shaderc_2020.4.bb | 6 ++-
3 files changed, 61 insertions(+), 22 deletions(-)
create mode 100644 meta/recipes-graphics/shaderc/files/0001-cmake-add-option-to-skip-build-the-examples.patch
rename meta/recipes-graphics/shaderc/files/{0001-cmake-de-vendor-libs-and-disable-git-versioning.patch => 0002-cmake-disable-building-external-dependencies-in-thir.patch} (55%)meta/recipes-graphics/shaderc/files/0001-cmake-add-option-to-skip-build-the-examples.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 23114b9862482ef325768b5e2d47f6c247e5044e Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <[email protected]> +Date: Sun, 7 Feb 2021 01:30:39 +0000 +Subject: [PATCH] cmake: add option to skip build the examples + +Upstream-Status: Submitted [https://github.com/google/shaderc/pull/1170] + +Signed-off-by: Jose Quaresma <[email protected]> + +--- + CMakeLists.txt | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c74cd8..0c8d1ae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,16 @@ else() + message(STATUS "Configuring Shaderc to avoid building tests.") + endif() + ++option(SHADERC_SKIP_EXAMPLES "Skip building examples" ${SHADERC_SKIP_EXAMPLES}) ++if(NOT ${SHADERC_SKIP_EXAMPLES}) ++ set(SHADERC_ENABLE_EXAMPLES ON) ++endif() ++if(${SHADERC_ENABLE_EXAMPLES}) ++ message(STATUS "Configuring Shaderc to build examples.") ++else() ++ message(STATUS "Configuring Shaderc to avoid building examples.") ++endif() ++ + option(SHADERC_ENABLE_WERROR_COMPILE "Enable passing -Werror to compiler, if available" ON) + + set (CMAKE_CXX_STANDARD 11) +@@ -107,7 +117,9 @@ add_subdirectory(third_party) + add_subdirectory(libshaderc_util) + add_subdirectory(libshaderc) + add_subdirectory(glslc) +-add_subdirectory(examples) ++if(${SHADERC_ENABLE_EXAMPLES}) ++ add_subdirectory(examples) ++endif() + + add_custom_target(build-version + ${PYTHON_EXECUTABLE}
meta/recipes-graphics/shaderc/files/0002-cmake-disable-building-external-dependencies-in-thir.patch renamed from meta/recipes-graphics/shaderc/files/0001-cmake-de-vendor-libs-and-disable-git-versioning.patch +12 -20
@@ -1,36 +1,31 @@ -From a07ac322a5a5fd4f0339913eb4456321ad1a69fd Mon Sep 17 00:00:00 2001 +From fdef5b662df941c49fd2d6e486d0427f8dfb602e Mon Sep 17 00:00:00 2001 From: Jose Quaresma <[email protected]> -Date: Sat, 17 Oct 2020 12:51:50 +0100 -Subject: [PATCH] cmake: de-vendor libs and disable git versioning +Date: Sun, 7 Feb 2021 01:30:39 +0000 +Subject: [PATCH] cmake: disable building external dependencies in /third_party -Upstream-Status: Inappropriate [configuration] +Upstream-Status: Inappropriate [OE-core specific] Signed-off-by: Jose Quaresma <[email protected]> --- - CMakeLists.txt | 2 -- - glslc/CMakeLists.txt | 1 - - glslc/src/build-version.inc | 0 - 3 files changed, 3 deletions(-) - create mode 100644 glslc/src/build-version.inc + CMakeLists.txt | 3 --- + glslc/CMakeLists.txt | 1 - + 2 files changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c74cd8..9451fbc 100644 +index 0c8d1ae..c7940f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -102,12 +102,10 @@ endif(MSVC) +@@ -111,9 +111,6 @@ endif(MSVC) + # Configure subdirectories. - # We depend on these for later projects, so they should come first. +-# We depend on these for later projects, so they should come first. -add_subdirectory(third_party) - +- add_subdirectory(libshaderc_util) add_subdirectory(libshaderc) add_subdirectory(glslc) --add_subdirectory(examples) - - add_custom_target(build-version - ${PYTHON_EXECUTABLE} diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index 31664d1..358d91b 100644 --- a/glslc/CMakeLists.txt
@@ -43,6 +38,3 @@ index 31664d1..358d91b 100644 shaderc_add_tests( TEST_PREFIX glslc -diff --git a/glslc/src/build-version.inc b/glslc/src/build-version.inc -new file mode 100644 -index 0000000..e69de29
meta/recipes-graphics/shaderc/shaderc_2020.4.bb +4 -2
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRCREV = "0dbd899941a43ffd55df527d65128b3b66e75c9c" SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \ - file://0001-cmake-de-vendor-libs-and-disable-git-versioning.patch \ + file://0001-cmake-add-option-to-skip-build-the-examples.patch \ + file://0002-cmake-disable-building-external-dependencies-in-thir.patch \ " UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git"
@@ -19,8 +20,9 @@ DEPENDS = "spirv-headers spirv-tools glslang" EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=Release \ - -DSHADERC_SKIP_TESTS=ON \ -Dglslang_SOURCE_DIR=${STAGING_INCDIR}/glslang \ + -DSHADERC_SKIP_TESTS=ON \ + -DSHADERC_SKIP_EXAMPLES=ON \ " BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.0
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Quoted 8 lines · Jose Quaresma
Signed-off-by Jose Quaresma <[email protected]>---
...dd-option-to-skip-build-the-examples.patch | 45 +++++++++++++++++++ ...lding-external-dependencies-in-thir.patch} | 32 +++++-------- .../shaderc/shaderc_2020.4.bb | 6 ++- 3 files changed, 61 insertions(+), 22 deletions(-)create mode 100644
meta/recipes-graphics/shaderc/files/0001-cmake-add-option-to-skip-build-the-examples.patch
renamemeta/recipes-graphics/shaderc/files/{0001-cmake-de-vendor-libs-and-disable-git-versioning.patch=> 0002-cmake-disable-building-external-dependencies-in-thir.patch} (55%)
There is still something odd going on with the shaderc changes unfortunately:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
Cheers,
Richard
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Hi Richard,
I need some help to analyze the log of the compilation. where can i find it? is it possible?
The compilation log mentioned on
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
are /home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/shaderc-native/2020.4-r0/temp/log.do_compile.199121
On my side it build fine on x86_64 so I don't understand the problem!
Thank you,
Jose
Richard Purdie <[email protected]> escreveu no dia domingo, 7/02/2021 à(s) 22:25:
Quoted 23 lines · Jose Quaresma
Quoted 7 lines
Signed-off-by Jose Quaresma <[email protected]>--- ...dd-option-to-skip-build-the-examples.patch | 45 +++++++++++++++++++ ...lding-external-dependencies-in-thir.patch} | 32 +++++-------- .../shaderc/shaderc_2020.4.bb | 6 ++- 3 files changed, 61 insertions(+), 22 deletions(-) create mode 100644
meta/recipes-graphics/shaderc/files/0001-cmake-add-option-to-skip-build-the-examples.patchQuoted 1 line
rename
meta/recipes-graphics/shaderc/files/{0001-cmake-de-vendor-libs-and-disable-git-versioning.patch=> 0002-cmake-disable-building-external-dependencies-in-thir.patch} (55%)There is still something odd going on with the shaderc changes unfortunately:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
Cheers,
Richard
Signature · 2 lines
best regards, José Quaresma
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Quoted 5 lines · Jose Quaresma
Hi Richard,
I need some help to analyze the log of the compilation. where can i find it? is it possible?
Quoted 7 lines
The compilation log mentioned on
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
are/home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/shaderc-native/2020.4-r0/temp/log.do_compile.199121On my side it build fine on x86_64 so I don't understand the problem!
That log is included here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/3034/steps/11/logs/stdio
or here is another:
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/3056/steps/11/logs/stdio
Cheers,
Richard
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Richard Purdie <[email protected]> escreveu no dia domingo, 7/02/2021 à(s) 23:00:
Quoted 17 lines · Jose Quaresma
Quoted 5 lines
Hi Richard,
I need some help to analyze the log of the compilation. where can i find it? is it possible?
Quoted 7 lines
The compilation log mentioned on
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
are/home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/shaderc-native/2020.4-r0/temp/log.do_compile.199121On my side it build fine on
x86_64so I don't understand the problem!That log is included here:
Quoted 8 lines
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/3034/steps/11/logs/stdio
or here is another:
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/3056/steps/11/logs/stdio
I have seen the log of the bitbake but what I liked to access was the log of the compilation in the WORKDIR of the shaderc.
Is it possible ?
Thank you
Quoted 7 lines
Cheers,
Richard
Signature · 3 lines
Best regards, José Quaresma
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Quoted 23 lines · Jose Quaresma
Richard Purdie <[email protected]> escreveu no dia domingo, 7/02/2021 à(s) 23:00:
Quoted 20 lines · Jose Quaresma
Quoted 7 lines
Hi Richard,
I need some help to analyze the log of the compilation. where can i find it? is it possible?
The compilation log mentioned on
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
Quoted 5 lines
are
/home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/shaderc-native/2020.4-r0/temp/log.do_compile.199121On my side it build fine on x86_64 so I don't understand the
problem!
That log is included here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/3034/steps/11/logs/stdio
Quoted 8 lines
Quoted 5 lines
or here is another:
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/3056/steps/11/logs/stdio
I have seen the log of the bitbake but what I liked to access was the log of the compilation in the WORKDIR of the shaderc.Is it possible ?
That logfile is printed onto stdout so the log in that file is what you see printed on the console in the above logs.
Did you click the magnifying glass on the top right and then search for "error:"? You should find the compile output there.
Cheers,
Richard
Re: [OE-core] [PATCH v2 2/3] shaderc: add option to skip building the examples
Richard Purdie <[email protected]> escreveu no dia domingo, 7/02/2021 à(s) 23:37:
Quoted 32 lines · Jose Quaresma
Quoted 22 lines
Richard Purdie <[email protected]> escreveu no dia domingo, 7/02/2021 à(s) 23:00:
Quoted 19 lines · Jose Quaresma
Quoted 7 lines
Hi Richard,
I need some help to analyze the log of the compilation. where can i find it? is it possible?
The compilation log mentioned on
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1835
Quoted 5 lines
are
/home/pokybuild/yocto-worker/no-x11/build/build/tmp/work/x86_64-linux/shaderc-native/2020.4-r0/temp/log.do_compile.199121On my side it build fine on
x86_64so I don't understand theproblem!
That log is included here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/3034/steps/11/logs/stdio
Quoted 4 lines
Quoted 4 lines
or here is another:
https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/3056/steps/11/logs/stdio
Quoted 3 lines
Quoted 2 lines
Quoted 9 lines
Quoted 2 lines
I have seen the log of the bitbake but what I liked to access was the log of the compilation in the WORKDIR of the shaderc.Is it possible ?
That logfile is printed onto stdout so the log in that file is what you see printed on the console in the above logs.
Did you click the magnifying glass on the top right and then search for "error:"? You should find the compile output there.
On the autobuilder web page I have only see the the bitbake error at the end of the stdio log.
I downloaded the stdout log and now I can see the shaderc compilation output.
Many thanks for the help.
Quoted 10 lines
Cheers,
Richard
Signature · 3 lines
Best regards, José Quaresma
PATCH v2 3/3 shaderc: remove the glslang-native from dependencies
In reply to Jose Quaresma- glslang now provides pkg-config, so use it
--- meta/recipes-graphics/shaderc/shaderc_2020.4.bb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
meta/recipes-graphics/shaderc/shaderc_2020.4.bb +4 -9
@@ -14,7 +14,7 @@ SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \ UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git" -inherit cmake python3native +inherit cmake python3native pkgconfig DEPENDS = "spirv-headers spirv-tools glslang"
@@ -25,17 +25,12 @@ EXTRA_OECMAKE = " \ -DSHADERC_SKIP_EXAMPLES=ON \ " -BBCLASSEXTEND = "native nativesdk" - -# TODO: probably there is better solution for this. -# I don't know any method for get the version of a receipe in DEPENDS, -# so do this ugly hack -inherit pkgconfig -DEPENDS += "glslang-native" do_configure_prepend() { cat <<- EOF > ${S}/glslc/src/build-version.inc "${PV}\\n" "$(pkg-config --modversion SPIRV-Tools)\\n" -"$(glslangValidator --version | head -1 | cut -d' ' -f3)\\n" +"$(pkg-config --modversion glslang)\\n" EOF } + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.0