|
From: | Pauli, David, MU |
Subject: | Re: [Ltib] Problem with building libcap |
Date: | Thu, 22 Sep 2011 17:48:47 +0200 |
Hey, I commented 2 lines in
cap_flag.c: From (line 24) # [...] # if (raised &&
good_cap_t(cap_d) && value >= 0 && value < __CAP_BITS # &&
set >= 0 && set < NUMBER_OF_CAP_SETS) { #
[...] To # [...] # if (raised &&
good_cap_t(cap_d) && value >= 0 //&& value < __CAP_BITS # &&
set >= 0 && set < NUMBER_OF_CAP_SETS) { #
[...] And (line 48) # [...] # if (good_cap_t(cap_d) &&
no_values > 0 && no_values <= __CAP_BITS # &&
(set >= 0) && (set < NUMBER_OF_CAP_SETS) #
[...] To # [...] # if (good_cap_t(cap_d) && no_values > 0
//&& no_values <= __CAP_BITS # &&
(set >= 0) && (set < NUMBER_OF_CAP_SETS) #
[...] Now the error with
__CAP_BITS disappeared, but another error cames up: # $ ./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.3677 # + 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' # => making cap_names.list.h from
/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../libcap/include/linux/capability.h # perl -e 'while ($l=<>) { if ($l =~ /^\#define[
\t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/;
print "{\"$tok\",$val},\n"; } }'
/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../libcap/include/linux/capability.h
| fgrep -v 0x > cap_names.list.h # gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC
-I/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../libcap/include
-I/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../libcap/include
_makenames.c -o _makenames #./_makenames > cap_names.h # /bin/sh: ./_makenames: cannot execute binary file # make[1]: *** [cap_names.h] Error 126 # 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.3677 (%build) # # # RPM build errors: # Bad exit status from
/usr/LTIB/ltib-mpc8313erdb-20081222/tmp/rpm-tmp.3677 (%build) # Build time for libcap: 0 seconds # # Failed building libcap # # # f_scbuild() returned an error, exiting # traceback: # main:501 # # Exiting on error or interrupt What is wrong now =( So long, David Von: Stuart Hughes [mailto:address@hidden Hi David, Hey Stuart, yes, I uncommented the
./configure-line. But libcap don’t need a ./configure. So there would be
an error, that there is no ./configure in folder (which is correct). So, libcap only needs an # make # make install So long, David Von: Stuart Hughes [mailto:address@hidden]
Hi
David,
./configure
--prefix=%{_prefix} --host=$CFGHOST --build=%{_build} make
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/../libcap/include
-I/usr/LTIB/ltib-mpc8313erdb-20081222/rpm/BUILD/libcap-2.22/libcap/../libcap/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 |
[Prev in Thread] | Current Thread | [Next in Thread] |