LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 841|回复: 3

在BLFS阶段编译gcc-2.95.3的时候出现问题?

[复制链接]
发表于 2004-10-30 17:09:47 | 显示全部楼层 |阅读模式
解决方法:
/usr/include/bits/stdio-lock.h 24:26  lowlevellock.h
找不到lowlevellock.h
在stdio-lock.h里面将#include<lowlevellock.h> 注掉。
然后在其后面加上一句:
#include <stdio.h>
详见:

On Tue, Oct 28, 2003 at 01:25:16PM +1100, Greg Schafer wrote:
> Now that I look at this more closely, I think the correct fix is to simply
> delete the line in "bits/stdio-lock.h" that includes lowlevellock.h
>
> The line directly above that line does this:
>
> #include <bits/libc-lock.h>
>
> and inside bits/libc-lock.h we have:
>
> #ifdef _LIBC
> # include <lowlevellock.h>
> # include <tls.h>
> # include <pthread-functions.h>
> #endif
>
> Therefore lowlevellock.h gets included anyway (when compiling glibc itself).
>
> I've confirmed that glibc still builds with my suggested change. Just have
> to run the test suite and some BLFS stuff and see if all is well to be 100%
> certain.

Well, that didn't work. As noted by Ryan, some stuff in bits/libc-lock.h is
still needed from lowlevellock.h even when not inside _LIBC.

Teemu, the instruction in the current NPTL hint to manually install the
lowlevellock.h header would appear to be bogus. Could you please explain why
it was added in the first place?

The only app I've stumbled across that won't build due to this situation is
the old gcc-2.95 libstdc++ stuff. But even when adding the lowlevellock.h
header, it still won't build.

AFAICT, the problem is only tickled when "_IO_MTSAFE_IO" is defined, which is
almost never (apart from Glibc itself and the old gcc as mentioned above).
The problem can be reproduced by adding '#include <stdio.h>' to a dummy
prog then compiling like so:

root:~# gcc dummy.c -D_IO_MTSAFE_IO
In file included from /usr/include/libio.h:168,
                 from /usr/include/stdio.h:72,
                 from dummy.c:1:
/usr/include/bits/stdio-lock.h:24:26: lowlevellock.h: No such file or directory

Now, add the lowlevellock.h header:

root:~# gcc dummy.c -D_IO_MTSAFE_IO
In file included from /usr/include/bits/stdio-lock.h:24,
                 from /usr/include/libio.h:168,
                 from /usr/include/stdio.h:72,
                 from dummy.c:1:
/usr/include/lowlevellock.h:95: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:99: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:102: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:208: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:210: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:211: error: parse error before "attribute_hidden"
In file included from /usr/include/bits/stdio-lock.h:24,
                 from /usr/include/libio.h:168,
                 from /usr/include/stdio.h:72,
                 from dummy.c:1:
/usr/include/lowlevellock.h:229:18: tls.h: No such file or directory
/usr/include/lowlevellock.h:318: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:335: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:338: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:340: error: parse error before "attribute_hidden"
/usr/include/lowlevellock.h:342: error: parse error before "attribute_hidden"
 楼主| 发表于 2004-10-30 17:30:05 | 显示全部楼层
看来还是没有解决问题。
晕。再看看。
发表于 2004-10-31 02:51:15 | 显示全部楼层
我编译没问题啊。打齐BLFS提供的补丁就可以了。我没试过不打会不会不通过。

。你的host是什么版本的?
 楼主| 发表于 2004-10-31 20:14:17 | 显示全部楼层
我的host是 lfs-200410**
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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