LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-05-2010, 02:56 PM   #31
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30

Sorry,

The problem is that I can do src2pkg --setup but that the build stops with
build libsentry : oops, can't live without it.

I have that directory and libsentry can be found in that directory.

Roelof
 
Old 07-05-2010, 02:59 PM   #32
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello,

Sorry for thr Dutch.

I have that directory.
But the build stops now at :

build libsentry : oops, can't live without it.

Libsentry can be found at the directory.

Roelof
 
Old 07-06-2010, 12:24 AM   #33
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 07-06-2010, 01:08 AM   #34
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by charlie_lab View Post
Sorry,

The problem is that I can do src2pkg --setup but that the build stops with
build libsentry : oops, can't live without it.

I have that directory and libsentry can be found in that directory.

Roelof
Did you move/symlink a copy of mkdir into one of the directories that I had mentioned earlier?
 
Old 07-06-2010, 04:20 AM   #35
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello gnashley,

The first command failed with this :
Code:
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 :
Code:
x86_64-unknown-linux-gnu-gcc -Wall -U_FORTIFY_SOURCE -D_GNU_SOURCE -DLIBDIR=\"/usr/local/lib\" -DPIC -fPIC -D_REENTRANT -DVERSION=\"0.6.9\" -c libsentry.c
libsentry.c:2949: error: conflicting types for 'readlink'
Richard,

Yes, I did therefore almost every error message disappear except this one.
Thank you for the tip.

Roelof
 
Old 07-06-2010, 09:09 AM   #36
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Okay, we finally start finding out what is going on. What version of glibc and gcc are you using?
 
Old 07-06-2010, 09:32 AM   #37
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello,

I use the 64 bit version of both.

Version GCC : 4.2.4.
Version Glibc : 2.7

Roelof
 
Old 07-07-2010, 03:33 AM   #38
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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
 
Old 07-07-2010, 06:58 AM   #39
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello gnashley.

Contents of localdefines.h
Code:
#ifndef __LOCALDEFINES_H_
#define __LOCALDEFINES_H_

#define TRUNCATE_T off_t
#define READLINKAT_T int
#define LIBC_VERSION ""

#endif
Roelof
 
Old 07-07-2010, 09:18 AM   #40
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Yeah: #define LIBC_VERSION ""

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?
 
Old 07-07-2010, 10:00 AM   #41
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello,

I have them all.

grep provided bu grep-2.5.3
awk provided by gawk-3.1.6
ldd provided by glibc-2.7
strings provided by binutils-2.18

Roelof

Edit :

I also checked where the files can be found.

grep can be found at /bin/grep
awk can be found at /tools/bin/awk
ldd can be found at /tools/bin/ldd
strings can be found at /tools/bin/strings.

Last edited by charlie_lab; 07-07-2010 at 11:41 AM.
 
Old 07-07-2010, 12:41 PM   #42
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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
 
Old 07-07-2010, 01:16 PM   #43
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Hello ,

The output is
Code:
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 :
Code:
/tools/include/asm/unistd.h
/tools/include/linux/unistd.h
/tools/include/bits/unistd.h
/tools/include/sys/unistd.h
/tools/include/unistd.h
Or hack your code so it can work for now.

The path is made by this chroot command :
Code:
chroot "${CLFS}" /tools/bin/env -i \
>     HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \
>     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>     /tools/bin/bash --login +h
Roelof



Roelof
 
Old 07-08-2010, 12:52 AM   #44
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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?

You've got to get your kernel headers and the headers installed by glibc into /usr/include. And you've got to get all the expected binaries into /bin and /usr/bin.
Here are links to lists of commands expected to be found in those locations.
http://www.pathname.com/fhs/pub/fhs-...OMMANDBINARIES
http://www.pathname.com/fhs/pub/fhs-...STUSERCOMMANDS

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.
 
Old 07-08-2010, 05:13 AM   #45
charlie_lab
Member
 
Registered: Nov 2006
Posts: 255

Original Poster
Rep: Reputation: 30
Oke,

I will install GCC, binutils and the kernle-headers and then try again.

Roelof
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Src2pkg install issue with helpers rpedrica Slackware 9 03-13-2010 03:26 PM
src2pkg install error wit Slackware64 Daedra Slackware 1 05-21-2009 11:29 PM
src2pkg and post install options rpedrica Slackware 6 11-12-2008 01:35 PM
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
New problem with src2pkg browser Slackware 67 02-09-2008 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration