Open bram-vanderstreeck opened 2 years ago
This issue is affecting me too. Did you find any work around for this yet?
Hi @curlybeast
Sorry @bram-vanderstreeck this was not managed back then, we have a ton of activity around our repos, so we basically cannot process all notifications, and eventually some tickets might fall through the cracks. Feel free to ping or comment on issues to resurface them.
As this issue is a bit old, I'd suggest the following approach:
cmake-conan
integration from this one, as it is probably unrelated, and try to reproduce without it, directly from conan install
command line.conan new mypkg/0.1 -m=cmake_lib
or conan new myapp/0.1 -m=cmake_exe
, and then add minor changes to them-pr:b=mybuildprofile
in 1.X)CMakeDeps
and CMakeToolchain
and not cmake
or cmake_find_package
generators.conanfile.py
being used, as well as the exact Conan version (Conan 2.0 is out, it is more likely to get prioritized if reported against 2.0).To summarize, the best would be something as small as possible (minimum reproducible example) that is very focused on one thing, and that we could reproduce on our end, that really helps to investigate things and fix issue quickly, or at least being able to help faster.
For one of our projects we are using conan as our package manager. We are using conan in CMake through the CMake wrapper (https://github.com/conan-io/cmake-conan). Our project is intended to run on multiple platforms, so in order to accomplish this we've built a number of our own toolchains through crosstool-ng (https://crosstool-ng.github.io) and set up the corresponding conan profiles and CMake toolchain files for cross compilation.
Because of our pipeline needs, we are building everything in docker images, with our build image being based on Ubuntu 20.04. Some packages seem to be cross-compiling perfectly fine, e.g. https://conan.io/center/redis-plus-plus, https://conan.io/center/protobuf, https://conan.io/center/asio, ... and are perfectly usable. However certain packages seem to be giving us issues. Especially those which seem to rely on generated binaries used in turn as generators. One example of such a package is https://conan.io/center/sdbus-cpp and more in particular it's dependency selinux, which fails with:
As can be seen in the output above, the execution of
/home/bramv/.conan/data/flex/2.6.4/_/_/package/1f477ddc5d737c4319f1655902f1498a01405d90/bin/flex
seems to be causing the issue. It is my feeling that the error messageSyntax error: Unterminated quoted string
is not the actual issue occurring here, considering the following:It looks more like the build fails because it can't execute the flex binary since the host and build platforms are not the same.
The conan profile file for this particular toolchain is the following (we're using a jinja template):
While the contents of the CMake toolchain file is:
The same packages compile just fine for x86_64 with the
Debug
orRelease
build type, but not for theRelWithDebInfo
build type which seems to yield the following error:In both cases I feel like I'm missing something obvious here and was wondering if maybe you could shed a light on my erroneous ways. Any advice would be appreciated and I'll gladly provide more info if required.