cvs commit: hints nptl.txt

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Sun Oct 12 18:17:00 PDT 2003


tushar      03/10/12 19:17:00

  Modified:    .        nptl.txt
  Log:
  Updated Hint: nptl
  
  Revision  Changes    Path
  1.16      +72 -70    hints/nptl.txt
  
  Index: nptl.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/nptl.txt,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -u -r1.15 -r1.16
  --- nptl.txt	22 Sep 2003 19:23:45 -0000	1.15
  +++ nptl.txt	13 Oct 2003 01:17:00 -0000	1.16
  @@ -1,11 +1,11 @@
   AUTHOR:         Teemu Tervo <teemu.tervo at gmx.net>
   AUTHOR:         Original hint by Zack Winkles <winkie at linuxfromscratch.org>
  -DATE:           2003-09-22
  +DATE:           2003-10-12
   LICENSE:        The MIT License
   SYNOPSIS:       Building an LFS system with the NPTL library
   DESCRIPTION:    Using the new libpthread implementation Native POSIX
                   Threading Library (NPTL) instead of linuxthreads.
  -PREREQUISITES:  LFS version 5.0+ (Pure LFS)
  +PREREQUISITES:  LFS version 5.0+
   
   HINT:
   
  @@ -14,7 +14,8 @@
   1. Introduction
   2. Software requirements
   3. Inline installation
  -4. Feedback
  +4. Drawbacks
  +5. Feedback
   
   
   Introduction
  @@ -34,19 +35,10 @@
   already present.
   
   
  -Software requirements (as of NPTL-0.59)
  -=======================================
  +Software requirements (as of October 9th 2003)
  +==============================================
   
  -1. NPTL - duh. Grab the latest tarball from here.
  -
  -          ftp://people.redhat.com/drepper/nptl/
  -
  -2. LFS-5.0 and later
  -
  -   NPTL requires GCC 3.3.1 and the hint expects you to use the Pure
  -   LFS build method.
  -
  -3. A kernel with proper support for thread-local storage. This means
  +1. A kernel with proper support for thread-local storage. This means
      you must use a fairly recent 2.6 kernel. RedHat has managed to
      backport this functionality into 2.4, but the patch is rather messy
      and many parts of it will fail to apply on a vanilla kernel. If
  @@ -70,32 +62,13 @@
      2.6 on both the host and the target system.
   
   
  -4. A CVS tarball of Glibc. This is required because NPTL uses features
  -   of Glibc that aren't yet in any released tarball. You shouldn't
  -   just grab the latest and the greatest, instead, have a look at
  -   NPTL mailing list archives and Drepper's release announcement for
  -   the NPTL version you're using.
  -
  -         http://listman.redhat.com/archives/phil-list/
  -
  -   In each announcement, Drepper suggests what Glibc sources you
  -   should use. If not, have a look at the announcement of the previous
  -   version. Look for a date string like "2003-09-11T01:00:00-0700".
  -   Download the required source, and create a tarball with the
  -   following commands (be sure to change GLIBCDATE appropriately):
  -
  -         export GLIBCDATE=2003-09-11T01:00:00-0700
  -         export SHORTDATE=`echo $GLIBCDATE | sed -e 's/T.*//' -e s/-//g`
  -         export CVSROOT=:pserver:anoncvs at sources.redhat.com:/cvs/glibc
  -         cvs -z3 co -D $GLIBCDATE libc
  -         mv libc glibc-2.3-$SHORTDATE
  -         tar cjf glibc-2.3-$SHORTDATE.tar.bz2 glibc-2.3-$SHORTDATE
  -         rm -rf glibc-2.3-$SHORTDATE
  -         unset CVSROOT GLIBCDATE SHORTDATE
  -
  -   The release notes might also mention other requirements, so if you
  -   use a very fresh nptl release, the requirements below might not
  -   hold true anymore.
  +2. A CVS tarball of Glibc. NPTL is no longer distributed in a separate
  +   tarball as it has now been been added to the glibc source tree.
  +
  +         cvs -d :pserver:anoncvs at sources.redhat.com:/cvs/glibc -z3 co libc     
  +         mv libc glibc-2.3-`date +%Y%m%d`
  +         tar cjf glibc-2.3-`date +%Y%m%d`.tar.bz2 glibc-2.3-`date +%Y%m%d`
  +         rm -rf glibc-2.3-`date +%Y%m%d`
   
   5. H J Lu's Binutils version 2.14.90.0.5 or newer
   
  @@ -122,11 +95,10 @@
      I've also made the tarball available in http://ttervo.vectorstar.net/nptl,
      but don't expect it to be the latest one available. In the same directory,
      you'll also find POSIX compliancy patches for several packages (see notes
  -   in chapter 5 Glibc instructions below).
  +   after chapter 5 Glibc instructions).
   
  -   This hint was tested using LFS-5.0-pre1, glibc-20030911, nptl-0.59,
  -   binutils-2.14.90.0.6, a host running linux-2.6.0-test4, and the target
  -   using 2.6.0-test5.
  +   This hint was tested using glibc-20031009 and binutils-2.14.90.0.6, with
  +   both the host and the target systems using linux-2.6.0-test7.
   
   Inline installation
   ===================
  @@ -141,30 +113,45 @@
   Chapter 5 -- Installing Glibc
   -----------------------------
   
  -While inside the Glibc directory, extract the NPTL tarball as you would
  -normally do for linuxthreads. You may notice that linuxthreads is already
  -present within our CVS image. Ignore this.
  -
   You won't need to apply the sscanf patch, this has been fixed.
   
  -CVS Glibc has the _POSIX2_VERSION variable set to a newer version. This
  -causes problems, since many packages and scripts use non-POSIX syntax, for
  -example tail -1 instead of tail -n 1. You can either do as I, patch
  -each package using obsoleted syntax, or edit glibc/posix/unistd.h to use
  -an older version instead.
  -
  --   #define _POSIX2_VERSION 200112L
  -+   #define _POSIX2_VERSION 199209
  -
   Configure Glibc with the following command:
   
             ../glibc-2.3*/configure --prefix=/tools --disable-profile \
                 --with-headers=/tools/include --with-binutils=/tools/bin \
                 --enable-add-ons=nptl --enable-kernel=current --without-gd \
  -              --with-tls
  +              --without-cvs --with-tls
  +
  +During make check, you can expect some failures.
   
  -During make check, you can expect failures, segfaults and even kernel oopses.
   
  +About POSIX conformance
  +-----------------------
  +
  +Packages such as coreutils use the _POSIX2_VERSION variable defined in 
  +unistd.h to see which POSIX version to conform to. CVS Glibc has this variable
  +set to a newer version and this causes problems with many packages and scripts
  +which use obsoleted syntax like tail -1 instead of tail -n 1. To get around
  +this, export _POSIX2_VERSION=199209, and make sure it's set at all times.
  +
  +There are also few other methods, which means this will eventually be a nice
  +flamewar subject on lfs-dev when the next Glibc version is released. You
  +could:
  +  1) Patch each package using illegal syntax, like I do.
  +  2) Edit the _POSIX2_VERSION variable directly in unistd.h.
  +  3) Patch coreutils to also require POSIXLY_CORRECT variable set, before
  +     spouting out "You can't do this anymore." This is what RH does.
  +
  +The nice thing about standards is there are so many ways to avoid them.
  +
  +
  +Chapter 6 -- Mounting /dev/shm
  +------------------------------
  +
  +There seems to be a misconception that nothing uses /dev/shm and it's
  +needless. So let's make it clear, it's used by NPTL's semaphore code and thus
  +by the testsuite as well, hence should be mounted not only in chapter 6 but
  +also after booting to the final system.
   
   Chapter 6 -- Installing 2.6 kernel headers
   ------------------------------------------
  @@ -189,23 +176,21 @@
   Chapter 6 -- Installing Glibc
   -----------------------------
   
  -Once again, unpack nptl inside the source directory, and change
  -_POSIX2_VERSION if you don't want to patch a couple dozen packages. If you
  -looked at /tools/lib, you probably noticed the library is still called
  +If you looked at /tools/lib, you probably noticed the library is still called
   libc-2.3.2.so. If you're anal about these kinds of things, you can edit the
  -version string in version.h to read "2.3.3 experimental" or whatever
  -feeds your pumpkin.
  +version string in version.h to read "2.3.3 experimental" or whatever feeds
  +your pumpkin.
   
  -If you try Running /tools/lib/libc.so.6, you'll see it won't work due to
  +If you try running /tools/lib/libc.so.6, you'll see it won't work due to
   some assertions failing. http://ttervo.vectorstar.net/nptl contains a patch,
  -that removes these asserts, and it seems to work just fine. This is merely a
  -cosmetic issue, and is completely optional.
  +which fixes this problem. This is merely a cosmetic issue, and is optional.
   
   Use the following command to configure Glibc:
   
             ../glibc-2.3*/configure --prefix=/usr --libexecdir=/usr/bin \
                 --disable-profile --with-headers=/usr/src/glibcheaders \
  -              --enable-add-ons=nptl --enable-kernel=current --with-tls
  +              --enable-add-ons=nptl --enable-kernel=current --without-cvs \
  +              --with-tls
   
   After installation, you can remove /usr/src/glibcheaders.
   
  @@ -228,6 +213,15 @@
   built for 2.4.
   
   
  +Drawbacks
  +=========
  +
  +I've been running NPTL on my system for a few months now, and in that period
  +the only unsolvable problem I've come across is that the beautiful debugger
  +called Valgrind won't work. As an alternative though, GDB-6.0+ will. In
  +addition, all binaries linked against linuxthreads' libpthread will fail
  +to function.
  +
   Feedback
   ========
   
  @@ -281,4 +275,12 @@
   * Changed linux-2.5 > 2.6, added note about post-halloween doc
   * Added note about _POSIX2_VERSION and the Glibc version string
   * Added patch that removes a couple of asserts in glibc, thanks to NeoCool
  -* Removed reference to sysklogd patch, it's not needed
  \ No newline at end of file
  +* Removed reference to sysklogd patch, it's not needed
  +[2003-10-12]
  +* Removed references to the nptl tarball, as it no longer exists
  +* Revised glibc cvs checkout commands
  +* Added the drawbacks section
  +* Added a nicer assertion patch for glibc (Thanks to Ryan)
  +* Added --without-cvs to glibc configure commands (Ryan again)
  +* Added note about /dev/shm (Yeah, it's him once more)
  +* Added POSIX conformance section, describing the issue a bit more thoroughly
  \ No newline at end of file
  
  
  



More information about the hints mailing list