Duplicate symbol "std::__timepunct<char>::_M_put_helper(char*, unsigned, char const*, tm const*) const"

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Oct 5 10:43:00 GMT 2001


I got the following build error with yesterdays main on hppa1.1-hp-hpux:

/xxx/gnu/gcc-3.1/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.1/objdir/gcc/ -nostdinc++  -L/xxx/gnu/gcc-3.1/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src -L/xxx/gnu/gcc-3.1/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src/.libs -B/usr/local/hppa1.1-hp-hpux10.20/bin/ -B/usr/local/hppa1.1-hp-hpux10.20/lib/ -isystem /usr/local/hppa1.1-hp-hpux10.20/include -shared -nostdlib -fPIC -Wl,+h -Wl,libstdc++.sl.4 -Wl,+b -Wl,/usr/local/lib -o .libs/libstdc++.sl.4.0   .libs/basic_file.o .libs/bitset.o .libs/c++locale.o .libs/cmath.o .libs/codecvt.o .libs/complex_io.o .libs/functexcept.o .libs/globals.o .libs/ios.o .libs/limits.o .libs/locale.o .libs/locale-inst.o .libs/localename.o .libs/collate.o .libs/messages.o .libs/moneypunct.o .libs/numpunct.o .libs/time.o .libs/misc-inst.o .libs/stdexcept.o .libs/stl-inst.o .libs/string-inst.o .libs/strstream.o .libs/valarray-inst.o .libs/wstring-inst.o .libs/libstdc++.lax/libmath.a/signbit.o .libs/libstdc++.lax/libmath.a/signbitf.o .libs/libstdc++.lax/libmath.a/st!
ubs.o .libs/libstdc++.lax/libmath.a/nan.o  .libs/libstdc++.lax/libsupc++convenience.a/del_op.o .libs/libstdc++.lax/libsupc++convenience.a/del_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/del_opv.o .libs/libstdc++.lax/libsupc++convenience.a/del_opvnt.o .libs/libstdc++.lax/libsupc++convenience.a/eh_alloc.o .libs/libstdc++.lax/libsupc++convenience.a/eh_aux_runtime.o .libs/libstdc++.lax/libsupc++convenience.a/eh_catch.o .libs/libstdc++.lax/libsupc++convenience.a/eh_exception.o .libs/libstdc++.lax/libsupc++convenience.a/eh_globals.o .libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o .libs/libstdc++.lax/libsupc++convenience.a/eh_terminate.o .libs/libstdc++.lax/libsupc++convenience.a/eh_throw.o .libs/libstdc++.lax/libsupc++convenience.a/new_handler.o .libs/libstdc++.lax/libsupc++convenience.a/new_op.o .libs/libstdc++.lax/libsupc++convenience.a/new_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/new_opv.o .libs/libstdc++.lax/libsupc++convenience.a/new_opvnt.o .libs/l!
ibstdc++.lax/libsupc++convenience.a/pure.o .libs/libstdc++.la!
x/libsupc++convenience.a/tinfo.o .libs/libstdc++.lax/libsupc++convenience.a/tinfo2.o .libs/libstdc++.lax/libsupc++convenience.a/vec.o   -L/xxx/gnu/gcc-3.1/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src -L/xxx/gnu/gcc-3.1/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/xxx/gnu/gcc-3.1/objdir/gcc -L/usr/local/hppa1.1-hp-hpux10.20/bin -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.1 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.1/../../.. -lm -lc  
/usr/ccs/bin/ld: Duplicate symbol "std::__timepunct<char>::_M_put_helper(char*, unsigned, char const*, tm const*) const" in files .libs/locale-inst.o and .libs/time.o
/usr/ccs/bin/ld: Duplicate symbols are not allowed in shared libraries

I would guess that this was introduced in this patch:

2001-10-02  Benjamin Kosnik  <bkoz@redhat.com>

        * config/locale/time_members_gnu.h: Remove.
	* config/locale/time_members_generic.h: Remove.
	* config/locale/time_members_gnu.cc (__timepunct::_M_put_helper): Add.
	* config/locale/time_members_generic.cc: Same.
	* include/bits/locale_facets.h: Add data members.
	(__timepunct::_M_put_helper): Change signature.
	(__timepunct::_M_date_formats): Same.
	(__timepunct::_M_time_formats): Same.
	(__timepunct::_M_ampm): Add.
	(__timepunct::_M_date_time_formats): Add.
	(time_get::_M_extract_via_format): Add.
	(time_get::_M_extract_time): Change to...
	(time_get::_M_extract_num): ... this, modify signature.
	* include/bits/locale_facets.tcc (time_get::do_get_year): Fix.
	(time_get::do_get_time): Fix.
	(time_get::do_get_date): Fix.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Libstdc++ mailing list