LinuxSir.cn,穿越时空的Linuxsir!

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

Glibc-2.2.3 make 出错..提示信息如下:

[复制链接]
发表于 2008-4-4 14:39:03 | 显示全部楼层 |阅读模式
make[2]:***[/home/build-toos/buildlibc/iconv/gconv_db.o] Error 1
make[1]:***[iconv/subdir_lib] Error 2
make: ***[all] Error 2

都快疯了,差了很多资料都没解决。。希望哪位仁兄能给点帮助。

补充:处理器类型intel 赛扬 2.8
运行环境,虚拟机5.0
操作系统:red hat linux 9.0
gcc版本:gcc-3.2.2
我的configure是怎么配置的。../glibc-2.2.3/configure --prefix=/usr/libcfor386 --enable-add-ons=linuxthreads
而且不是在glibc源码同一个目录下编译的。。
这是configure生成的Makefile
# Generated automatically from Makefile.in by configure.
# Generated from $Id: Makefile.in,v 1.7 2000/11/15 23:03:08 drepper Exp $.

srcdir = ../glibc-2.2.3

# Uncomment the line below if you want to do parallel build.
# PARALLELMFLAGS = -j 4

# This option is for those who modify the sources and keep them in a
# CVS repository.  Sometimes it is necessary to pass options to the cvs
# program (not the command), like -z9 or -x.
# CVSOPTS = -z9

all .DEFAULT:
        $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@

install:
        LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \
        $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@



=====================================================================================================
以下是生成的config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:904: checking host system type
configure:1050: checking sysdep dirs
configure:1256: checking for a BSD compatible install
configure:1313: checking whether ln -s works
configure:1342: checking for pwd
configure:1381: checking build system type
configure:1409: checking for gcc
configure:1443: checking version of gcc
configure:1463: checking for gnumake
configure:1463: checking for gmake
configure:1497: checking version of gmake
configure:1526: checking for gnumsgfmt
configure:1526: checking for gmsgfmt
configure:1526: checking for msgfmt
configure:1560: checking version of msgfmt
configure:1580: checking for makeinfo
configure:1614: checking version of makeinfo
configure:1634: checking for gsed
configure:1634: checking for sed
configure:1668: checking version of sed
configure:1686: checking whether the C compiler (gcc  ) works
configure:1705: gcc -o conftest    conftest.c  1>&5
configure:1736: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1748: checking whether we are using GNU C
configure:1757: gcc -E conftest.c
configure:1770: checking build system type
configure:1825: checking how to run the C preprocessor
configure:1846: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1923: checking for ranlib
configure:1992: checking whether as is GNU as
configure:2011: checking whether ld is GNU ld
configure:2031: checking for mig
configure:2088: checking whether ranlib is necessary
configure:2122: checking LD_LIBRARY_PATH variable
configure:2142: checking for bash
configure:2238: checking for gawk
configure:2270: checking for perl
configure:2310: checking for install-info
configure:2345: checking for old Debian install-info
configure:2380: checking for bison
configure:2415: checking for signed size_t type
configure:2439: checking for libc-friendly stddef.h
configure:2459: gcc -c   conftest.c 1>&5
configure:2478: checking whether we need to use -P to assemble .S files
configure:2501: checking whether .text pseudo-op must be used
configure:2522: checking for assembler global-symbol directive
configure:2552: checking for .set assembler directive
configure:2595: checking for .symver assembler directive
configure:2614: checking for ld --version-script
configure:2637: gcc  -shared -o conftest.so conftest.o -nostartfiles -nostdlib -Wl,--version-script,conftest.map 1>&5
configure:2676: checking for .previous assembler directive
configure:2684: gcc -c  conftest.s 1>&5
configure:2725: checking for .protected and .hidden assembler directive
configure:2735: gcc -c  conftest.s 1>&5
configure:2747: checking for -z nodelete option
configure:2754: gcc -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,nodelete 1>&5
configure:2767: checking for -z nodlopen option
configure:2774: gcc -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,nodlopen 1>&5
configure:2787: checking for -z initfirst option
configure:2794: gcc -shared -o conftest.so conftest.c -Wl,--enable-new-dtags,-z,initfirst 1>&5
configure:2807: checking for -Bgroup option
configure:2814: gcc -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5
configure:2866: checking whether cc puts quotes around section names
configure:2972: checking for assembler .weak directive
configure:3071: checking for ld --no-whole-archive
configure:3082: gcc  -nostdlib -nostartfiles -Wl,--no-whole-archive -o conftest conftest.c 1>&5
configure:3096: checking for gcc -fexceptions
configure:3107: gcc  -nostdlib -nostartfiles -fexceptions -o conftest conftest.c 1>&5
configure:3190: checking for DWARF2 unwind info support
configure:3222: gcc  -DCHECK__register_frame_info -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&5
configure: In function `abort':
configure:3216: warning: `noreturn' function does return
/tmp/cca8BlSj.o(.text+0x12): In function `_start':
: undefined reference to `__register_frame_info'
/tmp/cca8BlSj.o(.text+0x25): In function `_start':
: undefined reference to `__deregister_frame_info'
collect2: ld returned 1 exit status
configure:3230: gcc  -DCHECK__register_frame -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&5
configure: In function `abort':
configure:3216: warning: `noreturn' function does return
/tmp/cc0HKoDr.o(.text+0x12): In function `_start':
: undefined reference to `__register_frame'
/tmp/cc0HKoDr.o(.text+0x25): In function `_start':
: undefined reference to `__deregister_frame'
collect2: ld returned 1 exit status
configure:3260: checking for __builtin_expect
configure:3273: gcc  -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&5
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
configure:3290: checking for local label subtraction
configure:3308: gcc  -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&5
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
configure:3325: checking for libgd
configure:3341: gcc -o conftest      conftest.c  -lgd -lpng -lz -lm 1>&5
configure:3361: checking size of long double
configure:3380: gcc -o conftest    conftest.c  1>&5
configure:16: checking installed Linux kernel header files
configure:209: checking for symlinks in /usr/local/share/libfor386/include
configure:3492: checking stdio selection
configure:3506: checking for old glibc 2.0.x headers
configure:3561: checking whether -fPIC is default


参考书籍:构建嵌入式linux系统

紧急等待中。。
 楼主| 发表于 2008-4-7 10:17:04 | 显示全部楼层
自己顶一下吧。。。
回复 支持 反对

使用道具 举报

发表于 2008-4-7 11:26:24 | 显示全部楼层
多帖两行 error 信息上来, 现在的不全, 关键的那几行都没帖
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-7 15:42:42 | 显示全部楼层
现在上面的问题解决了。。
解决方案如下,没搞懂什么意思,不过不报错了。。
perl -pi -e s'/__thread/__thread_param/'
../glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h
perl -pi -e s'/__thread/__thread_param/'
../glibc-2.2.5/linuxthreads/sysdeps/pthread/pthread.h

好像是接口问题。。

可是现在又出现新的问题了。make了20分钟后,竟然报出bug了。。。
提示信息如下:
make[2]: Entering directory `/home/marix/tmpglibc/glibc-2.2.3/elf'
gcc dl-load.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g   -Wno-unused   -I../include -I. -I/home/marix/tmpglibc/tmp/elf -I.. -I../libio  -I/home/marix/tmpglibc/tmp -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include -isystem /home/marix/lib-head/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h   -I/home/marix/tmpglibc/tmp/elf/. -I/home/marix/tmpglibc/tmp/csu/.  -o /home/marix/tmpglibc/tmp/elf/dl-load.o
dl-load.c:170: Internal compiler error in dwarf2out_finish, at dwarf2out.c:12301
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[2]: *** [/home/marix/tmpglibc/tmp/elf/dl-load.o] Error 1
make[2]: Leaving directory `/home/marix/tmpglibc/glibc-2.2.3/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/marix/tmpglibc/glibc-2.2.3'
make: *** [all] Error 2

运行平台:虚拟机下red hat linux9
gcc版本:3.2.2
其他参数都和上面的configure一致。。
我就不明白了,连bug都能出来。。。
回复 支持 反对

使用道具 举报

发表于 2008-5-20 18:26:52 | 显示全部楼层

關於collect2: ld returned 1 exit status的錯誤訊息

大家好:
我有個問題想請教。
就是,我在使用一個叫"Glomosim" 的模擬器,是架在debian機器上。
我在dsr.pc檔案中寫入
void RoutingDsrInitStats(GlomoNode *node)
pthread_t thread1;
struct arg *arg1;

arg1 = (struct arg*)malloc(sizeof(struct arg));
arg1->node = node->nodeAddr;
arg1->destAddr = ANY_DEST ;

pthread_create( &thread1, NULL, RoutingDsrInitiateRREQ, (void*) arg1);

另外,在dsr.h檔案中寫入。
struct arg{
  NODE_ADDR node;
  NODE_ADDR destAddr;
};

當我編譯它時
/home/public/glomosim/main >make clean
/home/public/glomosim/main >make
它出現一些錯誤訊息
../network/dsr.o: In function `RoutingDsrInitStats':
../network/dsr.pc:1296: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
Failed linking '../bin/glomosim'

我試著鍵入
/home/public/glomosim/main >make -pthread

但它仍然無法運作。
可以請教各位先進是否能指教我是否有任何不對的地方呢?
謝謝大家,非常感謝。
回复 支持 反对

使用道具 举报

发表于 2008-5-20 20:18:15 | 显示全部楼层
改 Makefile, 找个合适的位置加上一行 LDFLAGS+=-lpthread
回复 支持 反对

使用道具 举报

发表于 2008-5-22 16:30:28 | 显示全部楼层

修改了MAKEFILE後,依然出現錯誤

remote fish您好:首先感謝您的回答。 而我在makefile裡,找了適當位置,加入您的建議,如PARLIB = -lm
LDFLAGS+=-lpthread。但它依然出現錯誤訊息
../network/dsr.o: In function `RoutingDsrInitStats':
../network/dsr.pc:1297: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
。不知是否有什麼地方沒有留心到呢?!還請先進指教。謝謝。
回复 支持 反对

使用道具 举报

发表于 2008-5-22 16:41:35 | 显示全部楼层
不妨试试把 -lpthread 加入到 PARLIB 中. 另外, 帖错误的时候请再多帖几行, 至少要把最后一个 gcc 命令及其输出完整地帖上来
回复 支持 反对

使用道具 举报

发表于 2008-5-22 17:05:26 | 显示全部楼层

修改了MAKEFILE後,依然出現錯誤

remote fish您好:不知道您指的方式,是否在MAKEFILE中,加入PARLIB = -lm -lpthread

其加入後,在輸入make後compiler的結果為gcc ../mac/tsma_code_gen.c -o ../bin/tsma_code_gen
gcc ../mac/tsma_param_gen.c -o ../bin/tsma_param_gen
pcc -g -O3 -I/usr/include/ -I../include/ -I../transport -I../transport/tcp -I../application -I../mac -I../main -I../network -I../radio -clock longlong -lm -lpthread -c ../radio/radiorange.pc
pcc -g -O3 -I/usr/include/ -I../include/ -I../transport -I../transport/tcp -I../application -I../mac -I../main -I../network -I../radio -clock longlong ../main/glomo.o ../main/mobility.o ../main/mobility_waypoint.o ../main/mobility_trace.o ../main/message.o ../main/splaytree.o ../main/heap.o ../main/queue.o ../main/nodes.o ../main/fileio.o ../main/lookahead.o ../radio/radio.o ../radio/radio_accnoise.o ../radio/radio_nonoise.o ../radio/propagation.o ../radio/pathloss_free_space.o ../radio/pathloss_two_ray.o ../radio/pathloss_matrix.o ../mac/csma.o ../mac/maca.o ../mac/802_11.o ../mac/tsma.o ../mac/user_mac.o ../mac/mac.o ../network/network.o ../network/nwcommon.o ../network/nwip.o ../network/user_nwip.o ../network/fifoqueue.o ../network/nwlar1.o ../network/odmrp.o ../network/aodv.o ../network/dsr.o ../network/zrp.o ../transport/transport.o ../transport/in_pcb.o ../transport/udp.o ../transport/tcp/tcp.o ../transport/tcp/tcp_subr.o ../transport/tcp/tcp_output.o ../transport/tcp/tcp_usrreq.o ../transport/tcp/tcp_timer.o ../transport/tcp/tcp_input.o ../application/fisheye.o ../application/wrp.o ../application/static_routing.o ../application/bellmanford.o ../application/user_application.o ../application/application.o ../application/app_util.o ../application/telnet_server.o ../application/telnet_client.o ../application/ftp_client.o ../application/ftp_server.o ../application/http_client.o ../application/http_server.o ../application/gen_ftp_client.o ../application/gen_ftp_server.o ../application/cbr_client.o ../application/cbr_server.o ../mac/wiredlink.o  ../tcplib/telnet.o ../tcplib/ftp.o ../tcplib/nntp.o ../tcplib/smtp.o ../tcplib/phone.o ../tcplib/tcplib.o ../tcplib/brkdn_dist.o ../tcplib/distributions.o ../java_gui/java_gui.o ../application/http_distribution.o ../radio/radiorange.o -o ../bin/radio_range
../network/dsr.o: In function `RoutingDsrInitStats':
../network/dsr.pc:1297: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
Failed linking '../bin/radio_range'
回复 支持 反对

使用道具 举报

发表于 2008-5-22 17:24:46 | 显示全部楼层
楼主应该想办法找找最后的这个大型的连接在 Makefile 中对应的语句, 在其中加入 -lpthread 吧
回复 支持 反对

使用道具 举报

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

本版积分规则

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