- 论坛徽章:
- 0
|
大侠 求救啊。
我使用ubuntu 12.04 按照你说的方法,编译binutil 2.16.1时发生连接错误。
$ ./configure --prefix=/My_Operation/myuser/tmptools --host=TARGETS_LISTS --targets=TARGETS_LISTS --build=TARGETS_LISTS --enable-targets=all --enable-install-libbfd --disable-rpath
$ make LDFLAGS="-static"
我知道我的系统当中缺少不少模块但我想不通为什么会发生这种连接错误。
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o objdump objdump.o budemang.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
../opcodes/.libs/libopcodes.a(fr30-desc.o): In function `fr30_cgen_rebuild_tables':
/mywork/myuser/tools_src/binutils-2.16.1/opcodes/fr30-desc.c:1559: undefined reference to `cgen_bitset_contains'
../opcodes/.libs/libopcodes.a(fr30-desc.o): In function `fr30_cgen_cpu_open':
我查看了binutils最新的版本发现在cgen-bitset.c都有这个函数的定义,但是2.16.1中找不到该文件也找不到该文件的定义。
是不是在早期的版本中cgen_bitset_contains的定义在其他的模块中,如果在其他的模块应该是那一个啊??请大侠指教啊。
我的系统执行configure时的信息
work@ubuntu:/mywork/myuser/tools_src/binutils-2.16.1$ ./configure --prefix=/mywork/myuser/tmptool --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --build=i686-pc-linux-gnu --enable-targets=all --enable-install-libbfd --disable-rpath
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... no
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for flex... no
checking for flex... no
checking for lex... no
checking for makeinfo... no
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing opcodes/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
*** removing binutils/Makefile to force reconfigure
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... (cached) objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
creating Makefile
编译时的checking信息
Configuring in binutils
loading cache ./config.cache
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for strerror in -lcposix... (cached) no
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -static) works... yes
checking whether the C compiler (gcc -g -O2 -static) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for ld used by GCC... (cached) ld
checking if the linker (ld) is GNU ld... (cached) yes
checking for ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) nm
checking whether ln -s works... (cached) yes
checking how to recognise dependant libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
loading cache ./config.cache within ltconfig
checking whether -lc should be explicitly linked in... (cached) no
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... (cached) yes
checking if gcc static flag -static works... (cached) yes
finding the maximum length of command line arguments... (cached) 49153
checking if gcc supports -c -o file.o... (cached) yes
checking if gcc supports -fno-rtti -fno-exceptions ... no
checking whether the linker (ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking command to parse nm output... ok
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -static) works... yes
checking whether the C compiler (gcc -g -O2 -static) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for bison... (cached) /mywork/myuser/tools_src/binutils-2.16.1/missing bison -y
checking how to run the C preprocessor... (cached) gcc -E
checking for flex... (cached) /mywork/myuser/tools_src/binutils-2.16.1/missing flex
checking for flex... (cached) /mywork/myuser/tools_src/binutils-2.16.1/missing flex
checking for yywrap in -ll... (cached) no
checking lex output file root... (cached) lex.yy
checking whether yytext is a pointer... (cached) no
checking for ranlib... (cached) ranlib
checking for ANSI C header files... (cached) yes
checking for working const... (cached) yes
checking for inline... (cached) inline
checking for off_t... (cached) yes
checking for size_t... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking for argz.h... (cached) yes
checking for limits.h... (cached) yes
checking for locale.h... (cached) yes
checking for nl_types.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for values.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... (cached) yes
checking for munmap... (cached) yes
checking for putenv... (cached) yes
checking for setenv... (cached) yes
checking for setlocale... (cached) yes
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for __argz_count... (cached) yes
checking for __argz_stringify... (cached) yes
checking for __argz_next... (cached) yes
checking for LC_MESSAGES... (cached) yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... (cached) yes
checking for gettext in libc... (cached) yes
checking for msgfmt... (cached) no
checking for msgfmt... (cached) no
checking for gmsgfmt... (cached) no
checking for xgettext... (cached) :
checking for catalogs to be installed... fr tr ja es sv da zh_CN ru ro
checking whether to enable maintainer-specific portions of Makefiles... no
checking for executable suffix... (cached) no
checking for ranlib... (cached) ranlib
checking for a BSD compatible install... /usr/bin/install -c
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for sys/file.h... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for sbrk... (cached) yes
checking for utimes... (cached) yes
checking for setmode... (cached) no
checking for getc_unlocked... (cached) yes
checking for strcoll... (cached) yes
checking for fopen64... (cached) yes
checking for stat64... (cached) need -D_LARGEFILE64_SOURCE
checking for library containing frexp... (cached) none required
checking for time_t in time.h... (cached) yes
checking for time_t in sys/types.h... (cached) yes
checking for utime.h... (cached) yes
checking whether fprintf must be declared... (cached) no
checking whether strstr must be declared... (cached) no
checking whether sbrk must be declared... (cached) no
checking whether getenv must be declared... (cached) no
checking whether environ must be declared... (cached) yes
creating ./config.status
creating Makefile
creating doc/Makefile
creating po/Makefile.in
creating config.h
config.h is unchangedmake[1]: Entering directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils'
make all-recursive
make[2]: Entering directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils'
Making all in doc
make[3]: Entering directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils/doc'
if test -f cxxfilt.man; then \
man=cxxfilt.man; \
else \
man=../.././binutils/doc/cxxfilt.man; \
fi; \
sed -e 's/@PROGRAM@/c++filt/' \
-e 's/cxxfilt/c++filt/' < $man \
> c++filt.1
make[3]: Leaving directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils/doc'
Making all in po
make[3]: Entering directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils/po'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils/po'
make[3]: Entering directory `/mywork/myuser/tools_src/binutils-2.16.1/binutils'
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c size.c
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c bucomm.c
bucomm.c: In function ‘make_tempname’:
bucomm.c:425:14: warning: ignoring return value of ‘mktemp’, declared with attribute warn_unused_result [-Wunused-result]
bucomm.c:432:14: warning: ignoring return value of ‘mktemp’, declared with attribute warn_unused_result [-Wunused-result]
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c version.c
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c filemode.c
/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -static -o size size.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a ./../intl/libintl.a
mkdir .libs
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o size size.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c .././binutils/objdump.c
.././binutils/objdump.c: In function ‘disassemble_bytes’:
.././binutils/objdump.c:1259:15: warning: variable ‘done_dot’ set but not used [-Wunused-but-set-variable]
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c budemang.c
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c prdbg.c
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c rddbg.c
rddbg.c: In function ‘read_section_stabs_debugging_info’:
rddbg.c:159:12: warning: variable ‘other’ set but not used [-Wunused-but-set-variable]
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c debug.c
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c stabs.c
stabs.c: In function ‘parse_stab_string’:
stabs.c:690:16: warning: variable ‘lineno’ set but not used [-Wunused-but-set-variable]
stabs.c: In function ‘parse_stab_struct_type’:
stabs.c:2011:15: warning: variable ‘orig’ set but not used [-Wunused-but-set-variable]
stabs.c: In function ‘stab_demangle_type’:
stabs.c:4650:31: warning: variable ‘volatilep’ set but not used [-Wunused-but-set-variable]
stabs.c:4650:23: warning: variable ‘constp’ set but not used [-Wunused-but-set-variable]
stabs.c:4769:14: warning: variable ‘hold’ set but not used [-Wunused-but-set-variable]
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ieee.c
ieee.c: In function ‘ieee_start_compilation_unit’:
ieee.c:4818:16: warning: variable ‘nindx’ set but not used [-Wunused-but-set-variable]
ieee.c: In function ‘ieee_offset_type’:
ieee.c:5683:28: warning: variable ‘baseindx’ set but not used [-Wunused-but-set-variable]
ieee.c:5683:16: warning: variable ‘targetindx’ set but not used [-Wunused-but-set-variable]
gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../bfd -I.././binutils/../bfd -I.././binutils/../include -I.././binutils/../intl -I../intl -DLOCALEDIR="\"/mywork/myuser/tmptool/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c rdcoff.c
/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -static -o objdump objdump.o budemang.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o ../opcodes/libopcodes.la ../bfd/libbfd.la ../libiberty/libiberty.a ./../intl/libintl.a
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o objdump objdump.o budemang.o prdbg.o rddbg.o debug.o stabs.o ieee.o rdcoff.o bucomm.o version.o filemode.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
../opcodes/.libs/libopcodes.a(fr30-desc.o): In function `fr30_cgen_rebuild_tables':
/mywork/myuser/tools_src/binutils-2.16.1/opcodes/fr30-desc.c:1559: undefined reference to `cgen_bitset_contains'
回复 24# snow888
|
|