LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-18-2007, 03:59 PM   #1
yakoub
Member
 
Registered: Oct 2006
Posts: 99

Rep: Reputation: 15
pthread_create man page


i got slackware 12
i type : man pthread_create
but the page is not found
what is wrong with pthread man pages ?
i don't want to read the man page on web every
time i need it

when i do man pthreads , it is found
but any other pthread routine is not found by man

i can compile and run pthread code without problems

Last edited by yakoub; 08-18-2007 at 04:06 PM.
 
Old 08-19-2007, 09:58 AM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
The pages were there with Slackware 11. Seems the newer glibc with Slackware 12 (glibc-2.5-i486-4) doesn't include them. The old glibc2.4.6-i486-6 that came with Slackware 11 also had several examples for linuxthreads.

NB I have just found this in the file "/usr/lib/glibc-2.5/README" :

Quote:
All Linux kernel versions prior to 2.6.16 are known to have some bugs that
may cause some of the tests related to pthreads in "make check" to fail.
If you see such problems, please try the test suite on the most recent
Linux kernel version that you can use, before pursuing those bugs further.

The old LinuxThreads add-on implementation of pthreads for older Linux
kernels is no longer supported, and we are not distributing it with this
release. Someone has volunteered to revive its maintenance unofficially
for at least a short time for the benefit of those using Linux kernels
older than 2.6, but a working version is not presently available. When
it is in working condition, we will make it available alongside future
glibc releases. LinuxThreads will not be supported.
This would seem to be relevant.
 
Old 08-19-2007, 12:35 PM   #3
yakoub
Member
 
Registered: Oct 2006
Posts: 99

Original Poster
Rep: Reputation: 15
not relevant

Quote:
Originally Posted by bgeddy View Post
The pages were there with Slackware 11. Seems the newer glibc with Slackware 12 (glibc-2.5-i486-4) doesn't include them. The old glibc2.4.6-i486-6 that came with Slackware 11 also had several examples for linuxthreads.

NB I have just found this in the file "/usr/lib/glibc-2.5/README" :



This would seem to be relevant.
man pthreads does present the page and even in
"see also" section , it recommends pthread_cond_wait
and pthread_mutex_create ..
but when writing man pthread_cond_wait no page is found
 
Old 08-19-2007, 02:23 PM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
The pages were there with Slackware 11. Seems the newer glibc with Slackware 12 (glibc-2.5-i486-4) doesn't include them. The old glibc2.4.6-i486-6 that came with Slackware 11 also had several examples for linuxthreads.
Please read this statement again. This is why you cannot acccess the pthread_ man pages as they are no longer included in the supplied version of glibc. If you really want them then why not download and install them to your file system. There may be a reason they are no longer included but I'm not sure.
 
Old 08-20-2007, 12:40 AM   #5
yakoub
Member
 
Registered: Oct 2006
Posts: 99

Original Poster
Rep: Reputation: 15
not true

Quote:
Originally Posted by bgeddy View Post
Please read this statement again. This is why you cannot acccess the pthread_ man pages as they are no longer included in the supplied version of glibc. If you really want them then why not download and install them to your file system. There may be a reason they are no longer included but I'm not sure.
they are included since i can compile and run pthread applications

what they speak about is linuxthreads which are now replaced by nptl , but that is just a newer implementation of pthreads
and the interface doesn't change
 
Old 08-20-2007, 09:07 AM   #6
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
i guess it is an error in the build process which got unnoticed throughout the development. since only the man pages seem to be missing, downloading just them might solve your problem.
 
Old 08-20-2007, 11:47 AM   #7
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
erklaebaer: thank you .

yakoub: We seem to have a language problem here. What I was saying was that the pthread MAN PAGES were not included, not the pthread library functions which obviously are included.

Last edited by bgeddy; 08-20-2007 at 11:48 AM.
 
Old 08-20-2007, 11:53 AM   #8
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
I have already noticed this issue and have emailed Volkerding about it, but he hasn't replied to me (sometimes he does not reply but _does_ read the email and solves the issue; it means nothing).

Previous posts already summarized the situation well more or less. In previous versions of glibc, LinuxThreads was included. That means libraries, include files _and_ manpages explaining the different threading functions with comments about the specifics of LinuxThreads, which had a good amount of POSIX nonconformances. With the new glibc, every bit of LinuxThreads was removed, including the manpages. The new implementation, NPTL, is much more POSIX conformant. According to "man 7 pthreads", the only nonconformance with POSIX if you use a recent kernel is that "Threads [in the same process, I suppose] do not share a common nice value." As for the rest, you can asssume POSIX behaviour.

This means that the POSIX manpages (manual sections ending with 'p') are a good reference for the pthread functions, but where are the POSIX manpages? They are present in the man-pages source tarball, but they are removed from the resulting package by the SlackBuild script. Every *p section is removed, and the POSIX pthread manpages are located in section 3p. Just download the source tarball and install them yourself.

http://www.kernel.org/pub/linux/docs/manpages/

I used a the following posix-man-pages.slackbuild script to create a posix-man-pages package when I downloaded man-pages-2.63.tar.bz2:

Code:
#!/usr/bin/env bash

# Exit on errors
set -e

# Set sane umask
umask 022

# Set language (this helps sometimes)
export LANG=C

# Set a basic PATH
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Initial variables
NAME=man-pages		# Program name
PNAME=posix-man-pages	# Package name
VERSION=2.63		# Program version
PVERSION=$VERSION	# Package version (remove dashes if present)
ARCH=${ARCH:-noarch}	# Package architecture
BUILD=${BUILD:-1rg}	# Build number plus packager initials
SRCDIR=$NAME-$VERSION	# Source directory name (usually $NAME-$VERSION)
SRCTAR=$NAME-$VERSION.tar.bz2	# Source tarball name

# Check everything is properly set before starting
if [ -z "$NAME" -o -z "$PNAME" -o -z "$VERSION" -o -z "$PVERSION" -o -z "$SRCDIR" -o -z "$SRCTAR" ]; then
	echo "Missing initial parameters" 1>&2
	exit 1
fi

CWD=`pwd`
TMP=${TMP:-/tmp}	# Location to compile the source
PKG=$TMP/package-$NAME	# Location to build the package (use "package-$NAME" to avoid poss. conflicts)

# Clear sandbox directory
rm -rf $PKG
mkdir -p $PKG

# Extract tarball
cd $TMP
case $SRCTAR in
	*.tar.gz | *.tgz ) TAROPTS="xvzf" ;;
	*.tar.bz2 | *.tbz2 ) TAROPTS="xvjf" ;;
	* ) echo "Unknown tarball format" 1>&2 ; exit 1 ;;
esac
tar $TAROPTS $CWD/$SRCTAR
cd $SRCDIR

# Correct general permissions/ownership
chown -R 0:0 .
find . -print0 | xargs -0r chmod a+Xr,go-w,u+w

# Apply patches if present
if ls $CWD/patches/*.patch &>/dev/null; then
	for patch in $CWD/patches/*.patch; do
		patch -p1 <$patch
	done
fi

# Build and installation steps, usually ./configure, make, make install
mkdir -p $PKG/usr/man
cp -a man*p $PKG/usr/man

# Compress man pages
find $PKG -type f -path '*/man/*' -print0 | xargs -0r gzip --best
find $PKG -type l -path '*/man/*' -print0 | while read -d '' symlink; do
	ln -s "$( readlink "$symlink" ).gz" "${symlink}.gz"
	rm "$symlink"
done

# Create package docs
mkdir -p $PKG/usr/doc/$PNAME-$PVERSION
cat $CWD/$PNAME.slackbuild >$PKG/usr/doc/$PNAME-$PVERSION/$PNAME.slackbuild
cp -a Changes* [A-Z][A-Z][A-Z]* $PKG/usr/doc/$PNAME-$PVERSION

#
# FIX ANY POSSIBLE PROBLEM HERE, BEFORE CREATING THE PACKAGE
#

# Add package description
if [ -e $CWD/slack-desc ]; then
	mkdir -p $PKG/install
	cat $CWD/slack-desc > $PKG/install/slack-desc
fi

# Add install script (usually it does not exist)
if [ -e $CWD/doinst.sh ]; then
	cat $CWD/doinst.sh >> $PKG/install/doinst.sh
fi

# Create package
cd $PKG
makepkg -l y -c n $CWD/$PNAME-$PVERSION-$ARCH-$BUILD.tgz

# Clean up the compilation and package directories
rm -rf $PKG
cd $TMP
rm -rf $SRCDIR
And the following slack-desc file:

Code:
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

               |-----handy-ruler------------------------------------------------------|
posix-man-pages: posix-man-pages (POSIX online manual pages)
posix-man-pages:
posix-man-pages: These are the manpages from sections 0p, 1p and 3p, which describe
posix-man-pages: POSIX headers, commands and APIs. These are not included in the
posix-man-pages: man-pages package.
posix-man-pages:
posix-man-pages:
posix-man-pages:
posix-man-pages:
posix-man-pages:
posix-man-pages:
 
  


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
getting out of a man page! naijaguy Linux - Newbie 11 04-10-2018 05:21 PM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 08:52 AM
Is there a man page on how to use man page? jdruin Linux - Software 2 10-30-2004 09:29 AM
man page trobles e1000 Slackware 2 11-02-2003 08:11 PM
man page? chandan Linux - Newbie 1 07-16-2003 07:31 PM

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

All times are GMT -5. The time now is 09:12 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