Re: dpkg-cross and -config scripts, (e.g. libusb-config)
> Dear All,
>
> I am trying to cross-compile a program that uses libusb. I have
> installed a dpkg-cross'd version of libusb for this program to build
> against and it mostly works.
>
> The difficulty is that the program's configure script calls the
> libusb-config script (eg "libusb-config --libs"), but that was removed
> from the .deb by dpkg-cross. (And even if it hadn't been removed I
> guess that it would have reported wrong paths.) It instead picks up my
> native libusb-config and returns "-L/usr/lib -lusb".
>
> I notice that libusb-dev includes a pkg-config .pc file, and "pkg-config
> --libs libusb" returns "-lusb". This .pc file is transformed and
> retained in the .deb by dpkg-cross so
> "PKG_CONFIG_PATH=/usr/armeb-linux/lib/pkgconfig pkg-config --libs
> libusb" returns "-L/usr/armeb-linux/lib -lusb".
Look at 'man gccross', seems it's exactly what you need.
Reply to: