QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1090|回复: 4

LFS 6.1 - Tricks and problems

[复制链接]
发表于 2005-7-20 18:08:44 | 显示全部楼层 |阅读模式
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/ ... x-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[code:1]
cp: cannot stat `include/asm-i386': No such file or directory[/code:1]
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/include[code:1]cp: cannot stat `include/linux': No such file or directory[/code:1]
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/ ... hapter05/glibc.html

lfs:/mnt/lfs/sources$ patch -Np1 -i glibc-2.3.4-fix_test-1.patch[code:1]
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 [/code:1]

[code:1]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[/code:1]

cat /mnt/lfs/sources/glibc-2.3.4.tar.bz2.rej[code:1]***************
*** 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)
      {
[/code:1]

Please advise how to fix it.  TIA

B.R.
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[code:1]
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[/code:1]

Tried again;
lfs:/mnt/lfs/sources$ patch -Np1 -i glibc-2.3.4-fix_test-1.patch[code:1]
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[/code:1]
lfs:/mnt/lfs/sources$               

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

TIA

B.R.
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
回复

使用道具 举报

发表于 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.
回复

使用道具 举报

 楼主| 发表于 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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-4 22:38 , Processed in 0.040273 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表