[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is the status of cross pkg-configs?



On Mon, 26 Aug 2019 at 02:54:29 +0300, Jussi Pakkanen wrote:
> Debian wiki says the following about pkg-config executables for cross
> compilation in https://wiki.debian.org/CrossBuildPackagingGuidelines:
> 
> > When cross-building the build must select the correct tools who's output varies with architecture. This is usually done with an explicit GNU triplet prefix (arm-linux-gnueabi- ia64-linux-gnu-). This applies to the following tools: gcc, g++, binutils (ld, as, strip, ar, readelf etc), pkg-config
> 
> However these prefixed pkg-config executables do not exist e.g. for
> armhf.

They are meant to be created by a dpkg trigger (as symlinks to
/usr/share/pkg-config-crosswrapper) when you add the armhf architecture:

% ls -l /usr/bin/*pkg-config
lrwxrwxrwx 1 root root    34 Mar  5  2017 /usr/bin/i686-linux-gnu-pkg-config -> /usr/share/pkg-config-crosswrapper
lrwxrwxrwx 1 root root    32 Nov 11  2018 /usr/bin/i686-w64-mingw32-pkg-config -> ../share/pkg-config-crosswrapper
-rwxr-xr-x 2 root root 56144 Jan 27  2019 /usr/bin/pkg-config
lrwxrwxrwx 1 root root    34 Nov 16  2015 /usr/bin/x86_64-linux-gnu-pkg-config -> /usr/share/pkg-config-crosswrapper
-rwxr-xr-x 2 root root 56144 Jan 27  2019 /usr/bin/x86_64-pc-linux-gnu-pkg-config
lrwxrwxrwx 1 root root    32 Nov 11  2018 /usr/bin/x86_64-w64-mingw32-pkg-config -> ../share/pkg-config-crosswrapper

% sudo dpkg --add-architecture armhf

% ls -l /usr/bin/*pkg-config
lrwxrwxrwx 1 root root    34 Aug 26 10:19 /usr/bin/arm-linux-gnueabihf-pkg-config -> /usr/share/pkg-config-crosswrapper
lrwxrwxrwx 1 root root    34 Mar  5  2017 /usr/bin/i686-linux-gnu-pkg-config -> /usr/share/pkg-config-crosswrapper
lrwxrwxrwx 1 root root    32 Nov 11  2018 /usr/bin/i686-w64-mingw32-pkg-config -> ../share/pkg-config-crosswrapper
-rwxr-xr-x 2 root root 56144 Jan 27  2019 /usr/bin/pkg-config
lrwxrwxrwx 1 root root    34 Nov 16  2015 /usr/bin/x86_64-linux-gnu-pkg-config -> /usr/share/pkg-config-crosswrapper
-rwxr-xr-x 2 root root 56144 Jan 27  2019 /usr/bin/x86_64-pc-linux-gnu-pkg-config
lrwxrwxrwx 1 root root    32 Nov 11  2018 /usr/bin/x86_64-w64-mingw32-pkg-config -> ../share/pkg-config-crosswrapper

You usually need to add the foreign architecture to dpkg for
cross-compilation anyway, to get packages like libc6-dev:armhf.

    smcv


Reply to: