satimis 发表于 2005-7-20 18:08:44

LFS 6.1 - Tricks and problems

Hi folks,

I encountered following problems on continue building LFS 6.1

1)
5.5. Linux-Libc-Headers-2.6.11.2
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-libc-headers.html       

lfs:/mnt/lfs/sources/gcc-build$ cd ../
lfs:/mnt/lfs/sources$ tar xjf linux-libc-headers-2.6.11.2.tar.bz2
lfs:/mnt/lfs/sources$ cp -R include/asm-i386 /tools/include/asm
cp: cannot stat `include/asm-i386': No such file or directory
It did not work

lfs:/mnt/lfs/sources$ cp -R linux-libc-headers-2.6.11.2/include/asm-i386 /tools/include/asm
It worked with no complaint

lfs:/mnt/lfs/sources$ cp -R include/linux /tools/includecp: cannot stat `include/linux': No such file or directory
It did not work

lfs:/mnt/lfs/sources$ cp -R linux-libc-headers-2.6.11.2/include/linux /tools/include
It worked with no complaint

Did I make mistakes here???


2)
5.6. Glibc-2.3.4
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html       

lfs:/mnt/lfs/sources$ patch -Np1 -i glibc-2.3.4-fix_test-1.patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org)
|Date: 2005-04-27
|Initial Package Version: 2.3.4
|Origin: [url]http://sources.redhat.com/ml/libc-alpha/2005-04/msg00056.html[/url]
|Upstream Status: Applied
|Description: Allows tst-cancel17 and tst-cancelx17 to pass with kernel-2.6.11.x
|
|diff -Naur glibc-2.3.5.orig/nptl/tst-cancel17.c glibc-2.3.5/nptl/tst-cancel17.c
|--- glibc-2.3.5.orig/nptl/tst-cancel17.c       2003-08-08 02:09:57.000000000 -0500
|+++ glibc-2.3.5/nptl/tst-cancel17.c    2005-04-27 10:46:26.000000000 -0500
--------------------------
File to patch: glibc-2.3.4.tar.bz2

patching file glibc-2.3.4.tar.bz2
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 228.
2 out of 2 hunks FAILED -- saving rejects to file glibc-2.3.4.tar.bz2.rej

cat /mnt/lfs/sources/glibc-2.3.4.tar.bz2.rej***************
*** 1,4 ****
- /* Copyright (C) 2003 Free Software Foundation, Inc.
   This file is part of the GNU C Library.
   Contributed by Ulrich Drepper <[email protected]>, 2003.

--- 1,4 ----
+ /* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
   This file is part of the GNU C Library.
   Contributed by Ulrich Drepper <[email protected]>, 2003.

***************
*** 228,234 ****

    size_t len2 = fpathconf (fds[1], _PC_PIPE_BUF);
    size_t page_size = sysconf (_SC_PAGESIZE);
-   len2 = (len2 < page_size ? page_size : len2) + sizeof (mem) + 1;
    char *mem2 = malloc (len2);
    if (mem2 == NULL)
      {
--- 228,234 ----

    size_t len2 = fpathconf (fds[1], _PC_PIPE_BUF);
    size_t page_size = sysconf (_SC_PAGESIZE);
+   len2 = 20 * (len2 < page_size ? page_size : len2) + sizeof (mem) + 1;
    char *mem2 = malloc (len2);
    if (mem2 == NULL)
      {


Please advise how to fix it.TIA

B.R.
satimis

satimis 发表于 2005-7-20 19:17:16

Hi folks,

Further to point 2) on my first posting,I left out extracting the tarball.I repeated this step and subsequent steps as follows;

lfs:/mnt/lfs/sources$ tar xjf glibc-2.3.4.tar.bz2
lfs:/mnt/lfs/sources$ patch -Np1 -i glibc-2.3.4-fix_test-1.patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org)
|Date: 2005-04-27
|Initial Package Version: 2.3.4
|Origin: http://sources.redhat.com/ml/libc-alpha/2005-04/msg00056.html
|Upstream Status: Applied
|Description: Allows tst-cancel17 and tst-cancelx17 to pass with kernel-2.6.11.x
|
|diff -Naur glibc-2.3.5.orig/nptl/tst-cancel17.c glibc-2.3.5/nptl/tst-cancel17.c
|--- glibc-2.3.5.orig/nptl/tst-cancel17.c       2003-08-08 02:09:57.000000000 -0500
|+++ glibc-2.3.5/nptl/tst-cancel17.c    2005-04-27 10:46:26.000000000 -0500
--------------------------
File to patch: glibc-2.3.4
patch: **** File glibc-2.3.4 is not a regular file -- can't patch

Tried again;
lfs:/mnt/lfs/sources$ patch -Np1 -i glibc-2.3.4-fix_test-1.patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By: Archaic (archaic -aT- linuxfromscratch -DoT- org)
|Date: 2005-04-27
|Initial Package Version: 2.3.4
|Origin: http://sources.redhat.com/ml/libc-alpha/2005-04/msg00056.html
|Upstream Status: Applied
|Description: Allows tst-cancel17 and tst-cancelx17 to pass with kernel-2.6.11.x
|
|diff -Naur glibc-2.3.5.orig/nptl/tst-cancel17.c glibc-2.3.5/nptl/tst-cancel17.c
|--- glibc-2.3.5.orig/nptl/tst-cancel17.c       2003-08-08 02:09:57.000000000 -0500
|+++ glibc-2.3.5/nptl/tst-cancel17.c    2005-04-27 10:46:26.000000000 -0500
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
2 out of 2 hunks ignored
lfs:/mnt/lfs/sources$               

Stil the same result procured.Which file I have to patch?

TIA

B.R.
satimis

satimis 发表于 2005-7-20 21:52:05

Problem solved

Hi folks,

I figured out the solution.Command must be run inside the directory of the package to be patched.Steps performed as follows;

lfs:/mnt/lfs/sources$ tar xjf glibc-2.3.4.tar.bz2
lfs:/mnt/lfs/sources$ cd glibc-2.3.4
lfs:/mnt/lfs/sources/glibc-2.3.4$ patch -Np1 -i ../glibc-2.3.4-fix_test-1.patch
patching file nptl/tst-cancel17.c
lfs:/mnt/lfs/sources/glibc-2.3.4$ cd ../glibc-build
lfs:/mnt/lfs/sources/glibc-build$ ../glibc-2.3.4/configure --prefix=/tools --disable-profile --enable-add-ons --enable-kernel=2.6.0 --with-binutils=/tools/bin --without-gd --with-headers=/tools/include --without-selinux
lfs:/mnt/lfs/sources/glibc-build$ make
lfs:/mnt/lfs/sources/glibc-build$ make check
lfs:/mnt/lfs/sources/glibc-build$ mkdir /tools/etc
lfs:/mnt/lfs/sources/glibc-build$ touch /tools/etc/ld.so.conf
lfs:/mnt/lfs/sources/glibc-build$ make install
lfs:/mnt/lfs/sources/glibc-build$ mkdir -p /tools/lib/locale
etc.

Went through this Section and 5.7. Adjusting the Toolchain
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/adjusting.html

all without problem.

B.R.
satimis

blackwolf 发表于 2005-7-21 08:41:23

After you run "tar xjf ..." and before you run the following command, you muct change you work directory to the directory that just created by the tar.

satimis 发表于 2005-7-21 11:04:16

Hi blackwol,

After you run "tar xjf ..." and before you run the following command...Tks.Occasionally I forgot thsoe steps.

I'm searching for a way to do it without changing directory frequently.

B.R.
satimis
页: [1]
查看完整版本: LFS 6.1 - Tricks and problems