Skip to content

Commit

Permalink
geographiclib: enable static build and stage bindir
Browse files Browse the repository at this point in the history
* both are needed for robot-localization-2.6.9-1 build in melodic
  without static enabled it fails with:
  CMake Error at CMakeLists.txt:35 (find_package):
  Could not find a configuration file for package "GeographicLib" that is
  compatible with requested version "".

  The following configuration files were considered but not accepted:

    TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-config.cmake, version: 1.48 (without STATIC)

  and without ${bindir}/CartConvert:

-- Reading TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-config.cmake
-- GeographicLib configuration, version 1.48
CMake Error at TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-targets.cmake:123 (message):
  The imported target "CartConvert" references the file

     "TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/bin/CartConvert"

  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

     "TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  TOPDIR/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-config.cmake:61 (include)
  CMakeLists.txt:35 (find_package)

Signed-off-by: Martin Jansa <martin.jansa@lge.com>
  • Loading branch information
shr-project committed Apr 15, 2021
1 parent 8d0094a commit 67c0375
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,21 @@ FILES_${PN}-node = "${libdir}/node_modules"
FILES_${PN}-python = "${libdir}/python"

inherit cmake

# enable both shared and static libraries (static is required by robot-localization-2.6.9-1 in melodic)
EXTRA_OECMAKE += "-DGEOGRAPHICLIB_LIB_TYPE=BOTH"

# stage bindir to keep CMake happy
# | -- Reading /jenkins/mjansa/build/ros/webos-melodic-hardknott/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-config.cmake
# | -- GeographicLib configuration, version 1.48
# | CMake Error at /jenkins/mjansa/build/ros/webos-melodic-hardknott/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/lib/cmake/GeographicLib/geographiclib-targets.cmake:123 (message):
# | The imported target "CartConvert" references the file
# |
# | "/jenkins/mjansa/build/ros/webos-melodic-hardknott/tmp-glibc/work/qemux86-webos-linux/robot-localization/2.6.9-1-r0/recipe-sysroot/usr/bin/CartConvert"
# |
# | but this file does not exist. Possible reasons include:
# OE doesn't stage ${bindir} for target recipes, but in this case the CartConvert isn't
# being called during the cross-build, so we can include it just to keep CMake happy
sysroot_stage_all_append() {
sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
}

0 comments on commit 67c0375

Please sign in to comment.