Preconditions/Environment ------------------------- Eclipse: Oxygen.1a Release (4.7.1a) Yocto Project SDK Plugin: 1.4.1.201710162310 SDK: http://downloads.yoctoproject.org/releases/yocto/yocto-2.4/toolchain/x86_64/poky-glibc-x86_64-core-image-minimal-cortexa8hf-neon-toolchain-ext-2.4.sh Triggering Action/Cause ----------------------- 1. Install SDK. 2. Configure Eclipse to use the SDK. 3. Create new "C++ Project", select "Yocto Project SDK Autotools Project" and then "Hello World C++ Autotools Project". 4. Select "Project", "Properties", "C/C++ Build", "Environment" and take a look at PKG_CONFIG_PATH. Expectation ----------- PKG_CONFIG_PATH should have been set to "$SDKTARGETSYSROOT/usr/lib/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfig". Actual Result ------------- PKG_CONFIG_PATH is set to "$SDKTARGETSYSROOT/usr/lib/pkgconfig". Reproducibility --------------- Always.
meta/classes/toolchain-scripts.bbclass: echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script This was fixed in oe-core 1bea760f3f462fdcc3eefc0d8597688d61447ddd which is in morty/pyro/rocko. So maybe this is an Eclipse thing after all.
Examining the current master of eclipse-poky (126e707a6de212feeaaf093edc170aaa74192ce7) reveals the following: $ git grep -n PKG_CONFIG_PATH plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java:164: } else if (sKey.matches("PKG_CONFIG_PATH")) { plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java:174: else if (sKey.matches("PKG_CONFIG_PATH")) $ head -n 171 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | tail -n 8 ~/projects/foreign/eclipse-poky } else if (sKey.matches("PKG_CONFIG_PATH")) { sValue = elem.getStrSysrootLoc(); targetFilePath = elem.getStrSysrootLoc() + "/" + elem.getStrTarget(); targetFile = new File(targetFilePath); if (targetFile.exists()) sValue = sValue + "/" + elem.getStrTarget(); sValue = sValue + "/usr/lib/pkgconfig"; } From what I can tell, the actual value of the environment variable PKG_CONFIG_PATH is not read at all, but instead constructed by concatenating <sysroot location>, <target> and the hardcoded string "/usr/lib/pkgconfig". This would also explain why the second path "$SDKTARGETSYSROOT/usr/share/pkgconfig" is entirely missing.
Moving to Chin Huat.
Eclipse got dropped from project support.
closing