Skip to content

Conversation

@jiaxli-QC
Copy link

@jiaxli-QC jiaxli-QC commented Oct 9, 2025

  • Update MINKIDLC_BIN_DIR assignment to allow override via BitBake. This resolves the issue where minkidlc could not be downloaded during Yocto builds.
  • Abandon renaming Mink idl compiler. This will includes compilation dependency issue.
  • Deprecate to avoid compilation warning in C++17.

Copy link

@vksharma-oss vksharma-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good.

CMakeLists.txt Outdated
https://github.com/quic/mink-idl-compiler/releases/download/v0.2.0/idlc
${MINKIDLC_BIN_DIR}/minkidlc
)
if ("${MINKIDLC_BIN_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/minkidlc")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jiaxli-QC, I am not able to understand completely from the commit message what you are trying to do here.
It seems that you are only allowing downloading of the minkidlc binary if the MINKIDLC_BIN_DIR variable is set to ${CMAKE_CURRENT_SOURCE_DIR}/minkidlc.

Is the idea here that user/recipes can override the MINKIDLC_BIN_DIR variable in which case you want to skip downloading the minkidlc binary since user would have already placed it in their own provided path?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this modification is to overwrite MINKIDLC_BIN_DIR by using yacto compilation. Since yacto project cannot run the download command in cmake, minkipc cannot locate the minkidlc file during compilation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exact issues are you encountering with trying to download the binary via a Yocto recipe? Can you perhaps add a log for the build error here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @harshaldev27, here is the relevant section of the logs for compiling the minkipc target. I have attached the full log file. The issue is that the yacto project cannot locate the minkidlc file, which is needed to generate the correct headers during compilation.

| [79/118] /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarc
h64-poky-linux-gcc --sysroot=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot -Dminkteec_EXPORTS -
I/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/include -I/local/mnt2/works
pace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/idl -I/local/mnt2/workspace/K2L/upstream/buil
d/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/src -I/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-po
ky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkadaptor/include -march=armv8.2-a+crypto -mbranch-protection=standard -fstack-protector-strong
 -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky
-linux/minkipc/0.0+git/recipe-sysroot  -O2 -g  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git
/sources/minkipc-0.0+git=/usr/src/debug/minkipc/0.0+git  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minki
pc/0.0+git/build=/usr/src/debug/minkipc/0.0+git  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+g
it/recipe-sysroot=  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot-native=  -p
ipe -fPIC -Wall -Wextra -Werror -Wshadow -Wcast-align -Wmissing-declarations -Wformat-security -Wmissing-noreturn -Wdeprecated -fPIC -Wstrict-prototyp
es -Wmissing-prototypes -Wbad-function-cast -MD -MT libminkteec/CMakeFiles/minkteec.dir/src/mink_teec.c.o -MF libminkteec/CMakeFiles/minkteec.dir/src/
mink_teec.c.o.d -o libminkteec/CMakeFiles/minkteec.dir/src/mink_teec.c.o -c /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/mink
ipc/0.0+git/sources/minkipc-0.0+git/libminkteec/src/mink_teec.c
| FAILED: [code=1] libminkteec/CMakeFiles/minkteec.dir/src/mink_teec.c.o
| /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot-native/usr/bin/aarch64-poky-linux/aarch64-poky-
linux-gcc --sysroot=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot -Dminkteec_EXPORTS -I/local/m
nt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/include -I/local/mnt2/workspace/K2L/
upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/idl -I/local/mnt2/workspace/K2L/upstream/build/tmp/wor
k/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/src -I/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/
minkipc/0.0+git/sources/minkipc-0.0+git/libminkadaptor/include -march=armv8.2-a+crypto -mbranch-protection=standard -fstack-protector-strong  -O2 -D_F
ORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/mi
nkipc/0.0+git/recipe-sysroot  -O2 -g  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/
minkipc-0.0+git=/usr/src/debug/minkipc/0.0+git  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+gi
t/build=/usr/src/debug/minkipc/0.0+git  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe
-sysroot=  -ffile-prefix-map=/local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/recipe-sysroot-native=  -pipe -fPIC
 -Wall -Wextra -Werror -Wshadow -Wcast-align -Wmissing-declarations -Wformat-security -Wmissing-noreturn -Wdeprecated -fPIC -Wstrict-prototypes -Wmiss
ing-prototypes -Wbad-function-cast -MD -MT libminkteec/CMakeFiles/minkteec.dir/src/mink_teec.c.o -MF libminkteec/CMakeFiles/minkteec.dir/src/mink_teec
.c.o.d -o libminkteec/CMakeFiles/minkteec.dir/src/mink_teec.c.o -c /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+g
it/sources/minkipc-0.0+git/libminkteec/src/mink_teec.c
| In file included from /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/src/
mink_teec.c:6:
| /local/mnt2/workspace/K2L/upstream/build/tmp/work/armv8-2a-poky-linux/minkipc/0.0+git/sources/minkipc-0.0+git/libminkteec/src/mink_teec.h:10:10: fat
al error: IGPSession.h: No such file or directory
|    10 | #include "IGPSession.h"
|       |          ^~~~~~~~~~~~~~
| compilation terminated.

make_minkipc.log

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BitBake uses a sandbox to isolate the environment during the build process, which may limit CMake's download behavior. Therefore, we need to download the minkidlc file in advance in the bb file. pls refer to : https://github.com/qualcomm-linux/meta-qcom/blob/bd08893f7d5ff9fda6762c17ce0b2636f619720f/recipes-devtools/minkidlc/minkidlc-native_git.bb

Using inherit native in BitBake is a key mechanism for building native versions of tools or libraries, that is, programs that run on the build host (host) rather than the target device (target).

CMakeLists.txt Outdated
-Wall -Wextra -Werror -Wshadow -Wcast-align
-Wmissing-declarations -Wformat-security -Wmissing-noreturn
-Wdeprecated -fPIC
-Wno-error=cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like a real fix, just a way to work-around the compilation warning for C++ by turning off warnings as errors. Can you explain the warning here? If it's for <cstdbool> deprecated, can we not move to another new stdlib header?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/local/mnt2/workspace/jiaxli/K2L/upstream/minkipc/listeners/libfsservice/cmn/helper.c: In function ‘prepend_path’:
/local/mnt2/workspace/jiaxli/K2L/upstream/minkipc/listeners/libfsservice/cmn/helper.c:133:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration]
  133 |         strlcpy(new_path, prefix, TZ_FILE_DIR_LEN);
      |         ^~~~~~~
      |         strncpy
/local/mnt2/workspace/jiaxli/K2L/upstream/minkipc/listeners/libfsservice/cmn/helper.c:135:17: error: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Werror=implicit-function-declaration]
  135 |                 strlcat(new_path, old_path + 1, TZ_FILE_DIR_LEN);
      |                 ^~~~~~~
      |                 strncat
cc1: all warnings being treated as errors
gmake[2]: *** [listeners/libfsservice/fs/CMakeFiles/fsservice.dir/build.make:90: listeners/libfsservice/fs/CMakeFiles/fsservice.dir/__/cmn/helper.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:600: listeners/libfsservice/fs/CMakeFiles/fsservice.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Here is the error logs we encountered.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error seems to be related to the C library API, how is this related to the <cstdbool> header? Is this reproducible on newer Yocto builds with a specific compiler tool chain version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I experienced this issue, and CI also faced the same problem during testing. I have forwarded the email to you.

Update MINKIDLC_BIN_DIR assignment to allow override via BitBake. This
resolves the issue where minkidlc could not be downloaded during Yocto
builds.
Abandon renaming Mink idl compiler. This will includes compilation
dependency issue.
Deprecate cstdbool to avoid compilation warning in C++17.

Upstream-Status: Inappropriate [meta-qcom specific]
Signed-off-by: Jiaxing Li <[email protected]>
@jiaxli-QC
Copy link
Author

jiaxli-QC commented Nov 12, 2025

Hi @harshaldev27, @vksharma-oss , Could you help review the latest change? I have fixed compilation issue in Ycato project and compiled the minkipc component smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants