if g++ -DHAVE_CONFIG_H -I. -I.././gold -I. -I.././gold -I.././gold/../include -I.././gold/../elfcpp -DLOCALEDIR="\"/usr/share/locale\"" -DBINDIR="\"/usr/bin\"" -DTOOLBINDIR="\"/usr/x86_64-unknown-linux-gnu/bin\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=k8 -pipe -MT dynobj.o -MD -MP -MF ".deps/dynobj.Tpo" -c -o dynobj.o dynobj.cc; \ then mv -f ".deps/dynobj.Tpo" ".deps/dynobj.Po"; else rm -f ".deps/dynobj.Tpo"; exit 1; fi In file included from dynobj.cc:30: script.h: In member function ‘bool gold::Version_script_info::symbol_is_local(const char*) const’: script.h:152: error: invalid use of incomplete type ‘const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0/include/g++-v4/bits/stringfwd.h:56: error: declaration of ‘const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ script.h:153: error: invalid use of incomplete type ‘const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0/include/g++-v4/bits/stringfwd.h:56: error: declaration of ‘const struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ script.h: At global scope: script.h:247: error: field ‘name_’ has incomplete type script.h: In constructor ‘gold::Symbol_assignment::Symbol_assignment(const char*, size_t, gold::Expression*, bool, bool)’: script.h:206: error: class ‘gold::Symbol_assignment’ does not have any field named ‘name_’ script.h: At global scope: script.h:282: error: field ‘message_’ has incomplete type script.h: In constructor ‘gold::Script_assertion::Script_assertion(gold::Expression*, const char*, size_t)’: script.h:267: error: class ‘gold::Script_assertion’ does not have any field named ‘message_’ script.h: At global scope: script.h:376: error: field ‘entry_’ has incomplete type make[4]: *** [dynobj.o] Error 1 make[4]: Leaving directory `/home/markus/binutils/src/gold' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/markus/binutils/src/gold' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/markus/binutils/src/gold' make[1]: *** [all-gold] Error 2 make[1]: Leaving directory `/home/markus/binutils/src' make: *** [all] Error 2
This should be fixed in the current development sources. Thanks for reporting it. http://sourceware.org/ml/binutils/2008-03/msg00240.html