On Mon, Sep 13, 2021 at 11:45 PM Purushottam Choudhary
<[email protected]> wrote:
>
> From: Purushottam Choudhary <[email protected]>
>
> Fix path for _IMPORT_CHECK_FILES_FOR_assimp
> As it is giving configuration error during validation of path
> when used by 3rd party component to configure itself
> using assimp::assimp target.
> Compute the installation prefix relative to file.

I'm getting errors in the build of vulkan-demos with these two patches:

ERROR: vulkan-demos-git-r0 do_configure: Build of do_configure failed
ERROR: vulkan-demos-git-r0 do_configure: Traceback (most recent call last):
  File "/home/steve/builds/poky-contrib/bitbake/lib/bb/build.py", line
584, in _exec_task
    exec_func(task, localdata)
  File "/home/steve/builds/poky-contrib/bitbake/lib/bb/build.py", line
251, in exec_func
    exec_func_shell(func, d, runfile, cwd=adir)
  File "/home/steve/builds/poky-contrib/bitbake/lib/bb/build.py", line
452, in exec_func_shell
    bb.process.run(cmd, shell=False, stdin=stdin, log=logfile,
extrafiles=[(fifo,readfifo)])
  File "/home/steve/builds/poky-contrib/bitbake/lib/bb/process.py",
line 182, in run
    raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
bb.process.ExecutionError: Execution of
'/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/temp/run.do_configure.3192682'
failed with exit code 1:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler:
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc
-- Check for working C compiler:
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler:
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++
-- Check for working CXX compiler:
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++
-- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using module to find Vulkan
-- Found Vulkan:
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot/usr/lib64/libvulkan.so
CMake Error at 
/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot/usr/lib64/cmake/assimp-5.0/assimpTargets.cmake:84
(message):
  The imported target "assimp::assimp" references the file

     
"/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot/usr/lib/libassimp.so.5"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     
"/home/steve/builds/poky-contrib/build/tmp/work/core2-64-poky-linux/vulkan-demos/git-r0/recipe-sysroot/usr/lib64/cmake/assimp-5.0/assimpTargets.cmake"

  but not all the files it references.

Steve

> Signed-off-by: Purushottam Choudhary <[email protected]>
> ---
>  ...h-for-_IMPORT_CHECK_FILES_FOR_assimp.patch | 93 +++++++++++++++++++
>  ...hared-lib-from-_IMPORT_CHECK_TARGETS.patch | 32 -------
>  meta/recipes-graphics/vulkan/assimp_5.0.1.bb  |  2 +-
>  3 files changed, 94 insertions(+), 33 deletions(-)
>  create mode 100644 
> meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch
>  delete mode 100644 
> meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch
>
> diff --git 
> a/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch
>  
> b/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch
> new file mode 100644
> index 0000000000..61c40a33c8
> --- /dev/null
> +++ 
> b/meta/recipes-graphics/vulkan/assimp/0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch
> @@ -0,0 +1,93 @@
> +From 330914fed75cde09f48553cae92bed89925d98d8 Mon Sep 17 00:00:00 2001
> +From: Purushottam Choudhary <[email protected]>
> +Date: Mon, 6 Sep 2021 16:30:38 +0530
> +Subject: [PATCH] Fix path for _IMPORT_CHECK_FILES_FOR_assimp
> +
> +Fix path for _IMPORT_CHECK_FILES_FOR_assimp
> +As it is giving configuration error during validation of path
> +when used by 3rd party component to configure itself
> +using assimp::assimp target.
> +Compute the installation prefix relative to file.
> +
> +Upstream-Status: Submitted [https://github.com/assimp/assimp/pull/4071]
> +
> +Signed-off-by: Ranjitsinh Rathod <[email protected]>
> +Signed-off-by: Purushottam Choudhary <[email protected]>
> +---
> + assimpTargets-release.cmake.in | 10 +++++-----
> + assimpTargets.cmake.in         | 12 ++++++++++++
> + 2 files changed, 17 insertions(+), 5 deletions(-)
> +
> +diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in
> +index a416e8899..cd91e1277 100644
> +--- a/assimpTargets-release.cmake.in
> ++++ b/assimpTargets-release.cmake.in
> +@@ -46,8 +46,8 @@ if(MSVC)
> +       IMPORTED_LOCATION_RELEASE 
> "@CMAKE_INSTALL_FULL_BINDIR@/${sharedLibraryName}"
> +     )
> +     list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> +-    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${importLibraryName}")
> +-    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_BINDIR@/${sharedLibraryName}" )
> ++    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "${_IMPORT_PREFIX}/lib/${importLibraryName}")
> ++    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "${_IMPORT_PREFIX}/bin/${sharedLibraryName}")
> +   else()
> +     set(staticLibraryName 
> "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
> +
> +@@ -57,7 +57,7 @@ if(MSVC)
> +       IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
> +     )
> +     list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> +-    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}")
> ++    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "${_IMPORT_PREFIX}/lib/${staticLibraryName}")
> +   endif()
> +
> + else()
> +@@ -73,14 +73,14 @@ else()
> +       IMPORTED_LOCATION_RELEASE 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}"
> +     )
> +     list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> +-    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" )
> ++    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
> +   else()
> +     set(staticLibraryName 
> "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
> +     set_target_properties(assimp::assimp PROPERTIES
> +       IMPORTED_LOCATION_RELEASE 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}"
> +     )
> +     list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> +-    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${staticLibraryName}" )
> ++    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "${_IMPORT_PREFIX}/lib/${staticLibraryName}" )
> +   endif()
> + endif()
> +
> +diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in
> +index ef90c834a..140386660 100644
> +--- a/assimpTargets.cmake.in
> ++++ b/assimpTargets.cmake.in
> +@@ -40,6 +40,15 @@ unset(_targetsDefined)
> + unset(_targetsNotDefined)
> + unset(_expectedTargets)
> +
> ++# Compute the installation prefix relative to this file.
> ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
> ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
> ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
> ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
> ++if(_IMPORT_PREFIX STREQUAL "/")
> ++  set(_IMPORT_PREFIX "")
> ++endif()
> ++
> + # Create imported target assimp::assimp
> + if(@BUILD_SHARED_LIBS@)
> +   add_library(assimp::assimp SHARED IMPORTED)
> +@@ -65,6 +74,9 @@ foreach(f ${CONFIG_FILES})
> +   include(${f})
> + endforeach()
> +
> ++# Cleanup temporary variables.
> ++set(_IMPORT_PREFIX)
> ++
> + # Loop over all imported files and verify that they actually exist
> + foreach(target ${_IMPORT_CHECK_TARGETS} )
> +   foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
> +--
> +2.17.1
> diff --git 
> a/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch
>  
> b/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch
> deleted file mode 100644
> index 1078148d6b..0000000000
> --- 
> a/meta/recipes-graphics/vulkan/assimp/0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -From: Ranjitsinh Rathod <[email protected]>
> -Date: Fri, 13 Aug 2021 16:42:48 +0530
> -Subject: [PATCH] assimp: remove shared lib from _IMPORT_CHECK_TARGETS
> -
> -In the target assimp::assimp shared library verification removed
> -as it is giving configuration error when used by 3rd part component to
> -configure itself using assimp::assimp target
> -
> -Upstream-Status: Inappropriate [oe specific]
> -
> -Signed-off-by: Ranjitsinh Rathod <[email protected]>
> ----
> - assimpTargets-release.cmake.in | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in
> -index cd2fac7e0..52edc7990 100644
> ---- a/assimpTargets-release.cmake.in
> -+++ b/assimpTargets-release.cmake.in
> -@@ -72,8 +72,8 @@ else()
> -       IMPORTED_SONAME_RELEASE "${sharedLibraryName}"
> -       IMPORTED_LOCATION_RELEASE 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}"
> -     )
> --    list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> --    list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" )
> -+    #list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
> -+    #list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp 
> "@CMAKE_INSTALL_FULL_LIBDIR@/${sharedLibraryName}" )
> -   else()
> -     set(staticLibraryName 
> "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
> -     set_target_properties(assimp::assimp PROPERTIES
> ---
> -2.17.1
> diff --git a/meta/recipes-graphics/vulkan/assimp_5.0.1.bb 
> b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb
> index a81be08481..154d17d26b 100644
> --- a/meta/recipes-graphics/vulkan/assimp_5.0.1.bb
> +++ b/meta/recipes-graphics/vulkan/assimp_5.0.1.bb
> @@ -11,7 +11,7 @@ DEPENDS = "zlib"
>  SRC_URI = "git://github.com/assimp/assimp.git;branch=assimp_5.0_release \
>             
> file://0001-closes-https-github.com-assimp-assimp-issues-2733-up.patch \
>             file://use-GNUInstallDirs-where-possible.patch \
> -           
> file://0001-assimp-remove-shared-lib-from-_IMPORT_CHECK_TARGETS.patch \
> +           file://0001-Fix-path-for-_IMPORT_CHECK_FILES_FOR_assimp.patch \
>             "
>  UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))"
>
> --
> 2.17.1
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156139): 
https://lists.openembedded.org/g/openembedded-core/message/156139
Mute This Topic: https://lists.openembedded.org/mt/85597935/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to