Dear LFS dev,
First time poster here so please be gentle. I've compiled LFS dev several
times before but this time libcap (section 6.28) is giving me a headache.
I'm following the latest version of LFS-systemd SVN-20200106 with ubuntu
19.10 as host system running in virutalbox. I even installed libcap-dev on
the host system as part of new dependencies mentioned in LFS book. Also
the  "Host system requirement" script reports that the host system has the
prerequisites installed properly. But no matter what I do libcap complains
that pthread and libc cannot be found:

make: Entering directory '/build_scripts/libcap/src/libcap-2.30'
make -C libcap all
make[1]: Entering directory '/build_scripts/libcap/src/libcap-2.30/libcap'
=> making cap_names.list.h from /usr/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/include/linux/capability.h | fgrep -v 0x >
cap_names.list.h
gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/usr/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include
_makenames.c -o _makenames
./_makenames > cap_names.h
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c
cap_alloc.c -o cap_alloc.o
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c
cap_proc.c -o cap_proc.o
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c
cap_extint.c -o cap_extint.o
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c
cap_flag.c -o cap_flag.o
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include  -c
cap_text.c -o cap_text.o
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c
cap_file.c -o cap_file.o
gcc -Wl,-x -shared -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   -L/build_scripts/libcap/src/libcap-2.30/libcap/../libcap
-Wl,-soname,libcap.so.2 -o libcap.so.2.30 cap_alloc.o cap_proc.o
cap_extint.o cap_flag.o cap_text.o cap_file.o
ln -sf libcap.so.2.30 libcap.so.2
ln -sf libcap.so.2 libcap.so
ar rcs libcap.a cap_alloc.o cap_proc.o cap_extint.o cap_flag.o cap_text.o
cap_file.o
ranlib libcap.a
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/include
-I/build_scripts/libcap/src/libcap-2.30/libcap/../libcap/include -c psx.c
-o psx.o
ar rcs libpsx.a psx.o
ranlib libpsx.a
make[1]: Leaving directory '/build_scripts/libcap/src/libcap-2.30/libcap'
make -C tests all
make[1]: Entering directory '/build_scripts/libcap/src/libcap-2.30/tests'
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/include
-I/build_scripts/libcap/src/libcap-2.30/tests/../libcap/include -DNOWRAP
psx_test.c -o psx_test
-L/build_scripts/libcap/src/libcap-2.30/tests/../libcap -lpsx -lpthread
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/include
-I/build_scripts/libcap/src/libcap-2.30/tests/../libcap/include psx_test.c
-o psx_test_wrap -L/build_scripts/libcap/src/libcap-2.30/tests/../libcap
-lpsx -lpthread -Wl,-wrap,pthread_create
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/include
-I/build_scripts/libcap/src/libcap-2.30/tests/../libcap/include
libcap_psx_test.c -o libcap_psx_test
-L/build_scripts/libcap/src/libcap-2.30/tests/../libcap -lcap
-L/build_scripts/libcap/src/libcap-2.30/tests/../libcap -lpsx -lpthread
-Wl,-wrap,pthread_create --static
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:35: libcap_psx_test] Error 1
make[1]: Leaving directory '/build_scripts/libcap/src/libcap-2.30/tests'
make: *** [Makefile:13: all] Error 2
make: Leaving directory '/build_scripts/libcap/src/libcap-2.30'

The other packages compile without problem so far. I would like to mention
I deviated a bit from the book by running everything inside bash scripts
(they used to work until now). I've been following the latest development
regarding libcap in LFS book including #4569 which was addressed today
2020/01/06. I tried recompiliing everything from scratch several times and
it always gthrows me error at this stage. I'm confused, any help would be
appreciated.
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to