[OpenWrt-Devel] pkgconf issue with kmods and libelf [Was: Re: tools/pkg-config: Replace with pkgconf]

Rosen Penev rosenp at gmail.com
Fri Mar 13 15:39:02 EDT 2020


On Fri, Mar 13, 2020 at 7:33 AM Petr Štetiar <ynezz at true.cz> wrote:
>
> Rosen Penev <rosenp at gmail.com> [2020-02-28 20:12:45]:
>
> Hi,
>
> > It's more portable and smaller. And as stated, it is still fairly active.
>
> Jo has today brought following issue to my attention:
>
> ## pkgconf
>  $ PATH=$(pwd)/staging_dir/host/bin:$PATH STAGING_PREFIX=$(pwd)/staging_dir/host PKG_CONFIG_PATH=$(pwd)/staging_dir/host/lib/pkgconfig PKG_CONFIG_LIBDIR=$(pwd)/staging_dir/host/lib/pkgconfig pkg-config libelf --libs
>  -lelf
>
> ## pkg-config
>
>  $ PATH=$(pwd)/staging_dir/host/bin:$PATH STAGING_PREFIX=$(pwd)/staging_dir/host PKG_CONFIG_PATH=$(pwd)/staging_dir/host/lib/pkgconfig PKG_CONFIG_LIBDIR=$(pwd)/staging_dir/host/lib/pkgconfig pkg-config libelf --libs
>  -L/home/jow/devel/lede/staging.git/staging_dir/host/lib -lelf
>
> So it looks like pkgconf is filtering out some library paths, causing for
> example following issues:
>
>  make[5]: *** No rule to make target 'tools/objtool/objtool', needed by '/home/jow/devel/lede/staging.git/build_dir/target-x86_64_musl/linux-x86_64/siit-1.2/siit.o'.  Stop.
>
> < jow> the main kernel build will skip building objtool (and forcibly disable CONFIG_STACK_VALIDATION) because it cannot link libelf
> < jow> any external kmod will assume CONFIG_STACK_VALIDATION is enabled and kbuild will try to invoke objtool which doesn't exist in the precompiled kernel soure tree
>
> Possibly caused by:
>
>  ## linker flags optimization
>
>  As previously mentioned, pkgconf makes optimizations to the linker flags in
>  both the case of static and shared linking in order to avoid overlinking
>  binaries and also simplifies the `CFLAGS` and `LIBS` output of the pkgconf
>  tool for improved readability.
>
> Ref: https://github.com/openwrt/openwrt/pull/2832
Never seen this. Then again, I've only dealt with target packages.
>
> -- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list