SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay, lets try to find out why libsentry is not building.
Open the file /usr/src/src2pkg/src2pkg-helpers/src2pkg.setup and comment out the last line of the script -or run:
export DEBUG=1 ; src2pkg --setup
Then, when the build fails, cd into /usr/src/src2pkg/builds/src2pkg-helpers/libsentry-0.6.9 and then run 'make' manually and post the output from the command.
root:/# export DEBUG=1 ; src2pkg --setup
Notice - Creating src2pkg-helpers:
src2pkg uses a shared library and a few programs
when creating packages. These binaries will be
compiled on your system for best compatibility,
and installed. When done, src2pkg is ready for use.
TEMP_DIR=/usr/src/src2pkg/builds/src2pkg-helpers
Starting build in 5 seconds
Found global src2pkg.conf - Reading /etc/src2pkg/src2pkg.conf
Unpacking sources - OK
Creating libsentry - Ooops! Can't live without it...
Libsentry can't be found where you said it would be :
I can be found at : /usr/src/src2pkg/builds/src2pkg-helpers/src2pkg-helpers-1.1/libsentry-0.6.9
This build failed with this message :
It seems like your glibc version may not be correctly detected. Post the contents of the file: /usr/src/src2pkg/builds/src2pkg-helpers/src2pkg-helpers-1.1/libsentry-0.6.9/localdefines.h
cd into the libsentry sources.
The file localdefines.h is generated by the script 'create-defines'. The script implies that you have several things installed: grep, awk, ldd and strings.
Do you have all those installed?
I still think you need to get all the standard tools into the path(s) where every config/compile scheme on Earth is going to look for them.
How do you get /tools/bin into your path? -from /etc/profile or where?
Here's a modified version of the create-declares with some debugging code. Paste it into a blank file inside the libsentry sources, make it executable and then run it and post the output -it will show which of the listed commands is failing.
Code:
#!/bin/sh
# This file creates and compiles a small C program which
# allows us to check the glibc version being used. This
# then allows us to use 'ifdefs' in the regular program
# code which enable or disable features dpending on the
# version of glibc being used on your system.
OUTFILE='localdefines.h'
echo '/* This file is automatically generated *' > $OUTFILE
echo ' * Modify create-defines instead of this */' >> $OUTFILE
echo >> $OUTFILE
echo '#ifndef __LOCALDEFINES_H_' > $OUTFILE
echo '#define __LOCALDEFINES_H_' >> $OUTFILE
echo >> $OUTFILE
###
###
###
echo -n 'Checking truncate argument type... '
if grep -q 'truncate.*size_t' /usr/include/unistd.h ; then
echo 'size_t'
echo '#define TRUNCATE_T size_t' >> $OUTFILE
else
echo 'off_t' # At least, I HOPE it's off_t :-)
echo '#define TRUNCATE_T off_t' >> $OUTFILE
fi
echo -n 'Checking readlinkat result type... '
if grep -q 'ssize_t.*readlinkat' /usr/include/unistd.h ; then
echo 'ssize_t'
echo '#define READLINKAT_T ssize_t' >> $OUTFILE
else
echo 'int' # according to man page
echo '#define READLINKAT_T int' >> $OUTFILE
fi
###
###
###
echo -n 'Checking libc version... '
gcc -Wall -o libctest libctest.c
VERSION=`ldd libctest | grep libc\\.so | awk '{print $1}'`
echo $VERSION
echo "#define LIBC_VERSION \"$VERSION\"" >> $OUTFILE
if test "$VERSION" = 'libc.so.5' ; then
echo '#define BROKEN_RTLD_NEXT' >> $OUTFILE
echo '#define LIBC 5' >> $OUTFILE
fi
if test "$VERSION" = 'libc.so.6' ; then
echo -n 'Checking glibc subversion... '
tmp="`ldd libctest | grep libc.so 2> /dev/null`"
echo tmp=$tmp
LibcPath=`expr "$tmp" : '[^/]*\(/[^ ]*\)'`
echo LibcPath=$LibcPath
tmp="`strings $LibcPath | grep -i 'c library'`"
echo tmp=$tmp
OsLibcMajor=`expr "$tmp" : '.* \([0-9][0-9]*\)'`
echo OsLibcMajor=$OsLibcMajor
OsLibcMinor=`expr "$tmp" : '.* [0-9][0-9]*\.\([0-9][0-9]*\)'`
echo OsLibcMinor=$OsLibcMinor
case "$OsLibcMajor" in
2)
# 2 is the glibc version
echo "OsLibcMinor is $OsLibcMinor"
case "$OsLibcMinor" in
0)
echo '#define GLIBC_MINOR 0' >> $OUTFILE
SUBVERSION='glibc-2.0' ;;
1)
echo '#define GLIBC_MINOR 1' >> $OUTFILE
SUBVERSION='glibc-2.1' ;;
2)
echo '#define GLIBC_MINOR 2' >> $OUTFILE
SUBVERSION='glibc-2.2' ;;
3)
echo '#define GLIBC_MINOR 3' >> $OUTFILE
SUBVERSION='glibc-2.3' ;;
4)
echo '#define GLIBC_MINOR 4' >> $OUTFILE
SUBVERSION='glibc-2.4' ;;
5)
echo '#define GLIBC_MINOR 5' >> $OUTFILE
SUBVERSION='glibc-2.5' ;;
6)
echo '#define GLIBC_MINOR 6' >> $OUTFILE
SUBVERSION='glibc-2.6' ;;
7)
echo '#define GLIBC_MINOR 7' >> $OUTFILE
SUBVERSION='glibc-2.7' ;;
8)
echo '#define GLIBC_MINOR 8' >> $OUTFILE
SUBVERSION='glibc-2.8' ;;
9)
echo '#define GLIBC_MINOR 9' >> $OUTFILE
SUBVERSION='glibc-2.9' ;;
10)
echo '#define GLIBC_MINOR 10' >> $OUTFILE
SUBVERSION='glibc-2.10' ;;
11)
echo '#define GLIBC_MINOR 11' >> $OUTFILE
SUBVERSION='glibc-2.11' ;;
12)
echo '#define GLIBC_MINOR 12' >> $OUTFILE
SUBVERSION='glibc-2.12' ;;
13)
echo '#define GLIBC_MINOR 13' >> $OUTFILE
SUBVERSION='glibc-2.13' ;;
14)
echo '#define GLIBC_MINOR 14' >> $OUTFILE
SUBVERSION='glibc-2.14' ;;
15)
echo '#define GLIBC_MINOR 15' >> $OUTFILE
SUBVERSION='glibc-2.15' ;;
*)
echo 'Treated as glibc >= 2.1 (finger crossed)'
echo '#define GLIBC_MINOR 1' >> $OUTFILE
SUBVERSION='glibc-2.1' ;;
esac
;;
esac
fi
#rm libctest
echo >> $OUTFILE
echo SUBVERSION=$SUBVERSION
echo '#endif' >> $OUTFILE
Checking truncate argument type... grep: /usr/include/unistd.h: No such file or directory
off_t
Checking readlinkat result type... grep: /usr/include/unistd.h: No such file or directory
int
Checking libc version...
SUBVERSION=
So I think I better install the toolchain (kernel-headers, binutils, GCC) and then try on.
unistd can be found here now :
As I said, you need to get your installation past the chroot phase for things to really start working right.
This line is failing -in other words the detection is not even getting started:
VERSION=`ldd libctest | grep libc\\.so | awk '{print $1}'`
Is the libctest program even getting created?
I know it is a pain, but bootstrapping any sort of system is going to require you to get beyond the chroot phase before you can build packages. src2pkg itself doesn't have any unusual requirements, but it (and most other compilations) will be assuming standard locations for everything. The problem you are having probably begins with the kernel headers -gcc would have to be told where they are. The kernel-headers should be the first thing that gety installed into its' final location to be used when compiling glibc. Then glibc should go in /lib(64) to compile native versions of gcc and binutils.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.