QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2598|回复: 2

新手求救.:编译内核过程中make config 的错误

[复制链接]
发表于 2006-4-30 12:06:34 | 显示全部楼层 |阅读模式
编译内核linux-2.6.x过程中make config 的错误:

scripts/kconfig/conf.o:conf.c:<.text+0x91>:undefined reference to '_libintl_gettext'
scripts/kconfig/conf.o:conf.c:<.text+0xa5>:undefined reference to '_libintl_gettext'
scripts/kconfig/conf.o:conf.c:<.text+0xb9>:undefined reference to '_libintl_gettext'
等类似错误

我看到conf.c中有这句:#include "lkc.h"

然后我到"lkc.h"中发现#include <libintl.h>

然后再找libintl.h,找到好多个,不知道include了哪个


我估计可能是gettext这个函数没找到定义,
麻烦哪位高手指点一下迷津..谢谢先啦..
 楼主| 发表于 2006-4-30 17:55:27 | 显示全部楼层

前进了一步,新问题继续出现,继续请教.

我把linux-2.6.x\scripts\kconfig\lkc.h中的
#ifndef KBUILD_NO_NLS
# include <libintl.h>
前面加了一句
#define KBUILD_NO_NLS
就可以进入make了.(不知道有没有问题?)

但是在make的过程中提示:
Error:not ELF
不知道是什么错误,望高手指教一下.
回复

使用道具 举报

发表于 2006-5-29 19:55:42 | 显示全部楼层
将linux\scripts\kconfig下makefile文件相应部分更改如下:
# Needed for systems without gettext
KBUILD_HAVE_NLS := $(shell \
     if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \
     then echo yes ; \
     else echo no ; fi)
ifeq ($(KBUILD_HAVE_NLS),no)
HOSTCFLAGS        += -DKBUILD_NO_NLS
else
KBUILD_NEED_LINTL := $(shell \
if echo -e "\#include <libintl.h>\nint main(int a, char** b) { gettext(\"\"); return 0; }\n" | \
$(HOSTCC) $(HOSTCFLAGS) -x c - > /dev/null 2>&1 ; \
then echo no ; \
else echo yes ; fi)
ifeq ($(KBUILD_NEED_LINTL),yes)
HOSTLOADLIBES_conf += -lintl
HOSTLOADLIBES_mconf += -lintl
endif
endif
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-3-29 06:22 , Processed in 0.088109 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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