| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base problem this is trying to solve: capnproto has two main
components: libraries that can be linked against, and binary files
that can generate c++ code from capnproto definitions. When cross-compiling
one needs to use the cross-compiled libraries, but with the native
definition-compilers.
When linking against capnproto from another recipe, cross-compilation
fails, because the cmake files generated by capnproto verify the
existence of binary files in $bindir. When using a cross-compiled
version of capnproto, these binary files do not exist in RECIPE_SYSROOT, so
the compilation fails.
The previous patch: the previous solution patched the CMakeLists.txt
file in a way that it didn't export nor install the generated binary files.
Accidentally this also happened with native build (and happened knowingly with
target builds).
The new patch: instead of not installing and not exporting the binaries,
just install them without exporting, when creating a target build.
During compilation check is CMAKE_CROSSCOMPILING is set (coming from
cmake.bbclass) - if it is set, only install the binaries, without
exporting. When it is not set, resort to the original behavior.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When linking to capnproto from another project, cmake fails to
find this package with the following error:
| CMake Error at ${RECIPE_SYSROOT}/usr/lib/cmake/CapnProto/CapnProtoTargets.cmake:176 (message):
| The imported target "CapnProto::capnp_tool" references the file
|
| "${RECIPE_SYSROOT}/usr/bin/capnp"
|
| but this file does not exist. Possible reasons include:
To solve this, this change includes the following:
1. Add a patch that removes the files installed (and exported) in
${bindir} from the target build. The CMake file originally verified
that these files exist when another recipe tried to use it, however
the ${RECIPE_SYSROOT} does not contain the binaries in ${bindir},
so it failed quick in the do_configure step. (This alone is enough
to link against the cross-compiled libraries of capnproto successfully,
but code-generation from capnproto definition fails)
2. Add a new bbclass for capnproto. To cross-compile an application
that uses capnproto, the application needs to be linked against the
cross-compiled version of the libraries, however the native version
of the binaries need to be used to generate C++ code from the
capnproto definitions. This class sets the correct CMake arguments, to
use the capnproto binaries from the native package, instead of looking
for the non-existent cross-compiled binaries. (These variables can
be found in ${libdir}/cmake/CapnProto/CapnProtoConfig.cmake file)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Vulnerabilities against capnproto are sometimes reported as "capnp",
so add "capnp" to CVE_PRODUCT.
https://nvd.nist.gov/vuln/detail/CVE-2022-46149
Signed-off-by: Shunsuke Tokumoto <s-tokumoto@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|