ltib
[Top][All Lists]
Advanced

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

Re: [Ltib] Can we use /opt/freescale/ltib/usr/bin/pkg-config in spec fil


From: Stuart Hughes
Subject: Re: [Ltib] Can we use /opt/freescale/ltib/usr/bin/pkg-config in spec files invoking autotools ?
Date: Thu, 20 Oct 2011 08:49:00 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

Hi Franz,

You need to look at the package itself (in configure) to see how it is doing the test that's failing. Often you'll find packages that are not cross-compiler aware. If that is the case, you have to pre-stuff the result with something like:

ac_cv.... ./configure

Take a look at some of the existing .spec files to get an idea.

Note also, you should also pass --host in your configure line (see template.spec). It should be something like:

%Build
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
make

Regards, Stuart


On 19/10/11 13:21, Franz TRIERWEILER wrote:
Hi,

I am trying to make a rpm package for LTIB of a software which uses autotools.

The goal is to try not to modify the config files by hand and to generate everything with the famous ./configure and make steps in the RPM spec file.

In my RPM file, I have:

%Build
which gcc
./configure --host=arm-linux --disable-libudev --enable-libusb

(Note: I use which gcc to make sure the right gcc is used). The configure script calls the RPM tools to know if libusb is installed on the target machine (in the rootfs).

....
checking for strlcat... no
checking for inline... inline
checking for -fvisibility=hidden... yes
checking for dlopen in -ldl... yes
checking for socket in -lsocket... no
/opt/freescale/ltib/usr/bin/pkg-config
checking for LIBUSB... no

As you can see, the right ltib tools are called (pkg-config is displayed because I added echo $PKG_CONFIG in the configure script). Despite the fact that libusb has been installed then I always get a "not installed libusbd" by the package manager.

I tried to play with /opt/freescale/ltib/usr/bin/pkg-config --exists --print-errors libusb-1.0

but always get this error:

Package libusb was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb' found

Maybe it is not a LTIB related question but I would like to know if we can rely on the pkg-config program to know if a package has been installed with LTIB.

Regards,
Franz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]