Hi Frank,
That's right, as your packages build, if they have any .pc files, they
should be installined into the rootfs/usr/lib/pkgconfig area. The
/opt/freescale/ltib/usr/bin/pkg-config will look there.
What I mean by ac_cv stuff is that sometimes if a package is not
cross-compiler aware and there's no easy fix (say you can't run the arm
executable on the host to get a result), you need to pre-stuff the
result. For example in boa.spec, it has:
%Build
ac_cv_func_setvbuf_reversed=no \
CFLAGS="-DSERVER_ROOT='\"/etc\"' -g -Os" \
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
make
This means that configure will not run the test for setvbuf_reversed and
accept the pre-calculated version set on the command line.
Regards, Stuart
On 20/10/11 09:52, Franz TRIERWEILER wrote:
Hi Stuart,
In fact the configure script fails when
invoking /opt/freescale/ltib/usr/bin/pkg-config
Indeed, there is no pc file in the ltib/rootfs/usr/lib/pkgconfig
directory. This I guess if LTIB pkg-config really updates this
directory. There should be pc files corresponding to packages already
installed in rootfs.
In addition to this, what is ac_cv ?
Regards,
Franz
2011/10/20 Stuart Hughes <[email protected] <mailto:[email protected]>>
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
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib