Hey guys,
I want to include a new package to LTIB: libcap2. A tarball is made and
moved to /opt/freescale/pkgs.
The specfile looks like this:
> %define pfx /opt/freescale/rootfs/%{_target_cpu}
>
> Summary : libcap v2
> Name : libcap
> Version : 2.22
> Release : 2
> License : dont know
> Vendor : Freescale
> Packager : xxxx
> Group : System Environment/Libraries
> URL : http://xxxx
> Source : %{name}-%{version}.tar.gz
> BuildRoot : %{_tmppath}/%{name}
> Prefix : %{pfx}
>
> %Description
> %{summary}
>
> %Prep
> %setup
>
> %Build
> #./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
> make
>
> %Install
> rm -rf $RPM_BUILD_ROOT
> make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
>
> %Clean
> rm -rf $RPM_BUILD_ROOT
>
> %Files
> %defattr(-,root,root)
> %{pfx}/*
There is no problem with prepate the file. But I can't build it with
# $ ./ltib -m scbuild -p libcap.spec
#
# Processing: libcap
# ====================
# Build path taken because: build key set, no prebuilt rpm,
#
# rpmbuild --dbpath
/usr/LTIB/ltib-mpc8313erdb-20081222/rootfs//var/lib/rpm --target ppc
--define '_unpackaged_files_terminate_build 0' --define '_target_cpu
ppc' --define '__strip strip' --define '_topdir
/usr/LTIB/ltib-mpc8313erdb-20081222/rpm' --define '_prefix /usr'
--define '_tmppath /usr/LTIB/ltib-mpc8313erdb-20081222/tmp' --define
'_mandir /usr/share/man' --define '_sysconfdir /etc' --define
'_localstatedir /var' -bc --short-circuit
/usr/LTIB/ltib-mpc8313erdb-20081222/dist/lfs-5.1/libcap/libcap.spec
# Building target platforms: ppc
# Building for target ppc
# Executing(%build): /bin/sh -e
/usr/LTIB/ltib-mpc8313erdb-20081222/tmp/rpm-tmp.95666
# + umask 022
# + cd /usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD
# + cd libcap-2.22
# + make
# make -C libcap all
# make[1]: Entering directory
`/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap'
# gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dlinux -Wall
-Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wshadow -g -fPIC
-I/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../li
bcap/include
-I/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../li
bcap/include -c cap_flag.c -o cap_flag.o
# cap_flag.c: In function 'cap_get_flag':
# cap_flag.c:24: error: '__CAP_BITS' undeclared (first use in this
function)
# cap_flag.c:24: error: (Each undeclared identifier is reported only
once
# cap_flag.c:24: error: for each function it appears in.)
# cap_flag.c: In function 'cap_set_flag':
# cap_flag.c:48: error: '__CAP_BITS' undeclared (first use in this
function)
# make[1]: *** [cap_flag.o] Error 1
# make[1]: Leaving directory
`/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap'
# make: *** [all] Error 2
# error: Bad exit status from
/usr/LTIB/ltib-mpc8313erdb-20081222/tmp/rpm-tmp.95666 (%build)
#
#
# RPM build errors:
# Bad exit status from
/usr/LTIB/ltib-mpc8313erdb-20081222/tmp/rpm-tmp.95666 (%build)
# Build time for libcap: 0 seconds
#
# Failed building libcap
#
#
# f_scbuild() returned an error, exiting
# traceback:
# main:501
#
# Exiting on error or interrupt
Where is the problem?
So long, David
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib