Closed GoogleCodeExporter closed 9 years ago
The errors when using StlPort are in StlPort files. I'm not sure if it's a bug
in
StlPort or your configuration. Unfortunately I don't have the time to
investigate
this, as StlPort is not as widely used as the STL implementation provided by the
compiler. I'd suggest you to debug it and share your findings with us.
The errors about RE are caused by your GTEST_HAS_CLONE=0 definition. This
should be
1 or left unset on Linux, as Linux does have clone(). Why did you set it to 0?
Also, gcc 4 has tr1 tuple itself. Why did you set GTEST_HAS_TR1_TUPLE to 0?
And why
did you need boost?
Original comment by zhanyong...@gmail.com
on 19 Feb 2009 at 8:42
I will close this in 5 days if the reporter doesn't get back to us.
Original comment by zhanyong...@gmail.com
on 22 Feb 2009 at 5:54
If I don't set GTEST_HAS_TR1_TUPLE and GTEST_HAS_CLONE=0, I have got some
errors in
gtest.
./configure LD_LIBRARY_PATH=:/some_path/stlport_5.1.5/gcc4/lib:/some_path/
stlport_5.1.5/gcc4/lib --prefix=/some_path/gtest-1.2.1 CPPFLAGS='-I/some_path/
stlport_5.1.5/gcc4/stlport -D_STLP_THREADS'
LDFLAGS=-L/some_path/stlport_5.1.5/gcc4/
lib LIBS=-lstlport
make
depbase=`echo src/gtest.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I./build-aux -
I. -I./include -I/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport -D_STLP_T
HREADS -g -O2 -MT src/gtest.lo -MD -MP -MF $depbase.Tpo -c -o src/gtest.lo src/
gtest.cc &&\
mv -f $depbase.Tpo $depbase.Plo
mkdir src/.libs
g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./include -I/home/ecsdev/Linux2.4/
stlport_5.1.5/gcc4/stlport -D_STLP_THREADS -g -O2 -MT src/gtest.lo -MD -MP -MF
sr
c/.deps/gtest.Tpo -c src/gtest.cc -fPIC -DPIC -o src/.libs/gtest.o
In file included from
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/../utility:66,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/utility:37,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/tuple:39,
from ./include/gtest/internal/gtest-port.h:327,
from ./include/gtest/internal/gtest-internal.h:40,
from ./include/gtest/gtest.h:65,
from src/gtest.cc:34:
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_relops.h:92: error: redefinition of в??template<class _Tp> bool
stlp_std::rel_ops::o
perator!=(const _Tp&, const _Tp&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:129: error: в??
template<class _Tp> bool stlp_std::rel_ops::operator!=(const _Tp&, const
_Tp&)в?T pr
eviously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_relops.h:105: error: redefinition of в??template<class _Tp> bool
stlp_std::rel_ops::
operator>(const _Tp&, const _Tp&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:133: error: в??
template<class _Tp> bool stlp_std::rel_ops::operator>(const _Tp&, const
_Tp&)в?T pre
viously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_relops.h:118: error: redefinition of в??template<class _Tp> bool
stlp_std::rel_ops::
operator<=(const _Tp&, const _Tp&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:137: error: в??
template<class _Tp> bool stlp_std::rel_ops::operator<=(const _Tp&, const
_Tp&)в?T pr
eviously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_relops.h:131: error: redefinition of в??template<class _Tp> bool
stlp_std::rel_ops::
operator>=(const _Tp&, const _Tp&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:141: error: в??
template<class _Tp> bool stlp_std::rel_ops::operator>=(const _Tp&, const
_Tp&)в?T pr
eviously declared here
In file included from
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/../utility:67,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/utility:37,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/tuple:39,
from ./include/gtest/internal/gtest-port.h:327,
from ./include/gtest/internal/gtest-internal.h:40,
from ./include/gtest/gtest.h:65,
from src/gtest.cc:34:
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:68: error: redefinition of в??struct stlp_std::pair<_T1, _T2>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:45: error:
previous
definition of в??struct stlp_std::pair<_T1, _T2>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:96: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::o
perator==(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:73: error: в??
template<class _T1, class _T2> bool stlp_std::operator==(const
stlp_std::pair<_T1, _T
2>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:102: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::
operator<(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:77: error: в??
template<class _T1, class _T2> bool stlp_std::operator<(const
stlp_std::pair<_T1, _T2
>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:109: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::
operator!=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:84: error: в??
template<class _T1, class _T2> bool stlp_std::operator!=(const
stlp_std::pair<_T1, _T
2>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:115: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::
operator>(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:88: error: в??
template<class _T1, class _T2> bool stlp_std::operator>(const
stlp_std::pair<_T1, _T2
>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:121: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::
operator<=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:92: error: в??
template<class _T1, class _T2> bool stlp_std::operator<=(const
stlp_std::pair<_T1, _T
2>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:127: error: redefinition of в??template<class _T1, class _T2> bool
stlp_std::
operator>=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:96: error: в??
template<class _T1, class _T2> bool stlp_std::operator>=(const
stlp_std::pair<_T1, _T
2>&, const stlp_std::pair<_T1, _T2>&)в?T previously declared here
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_pair.h:144: error: redefinition of в??template<class _T1, class _T2>
stlp_std::pair<
_T1, _T2> stlp_std::make_pair(_T1, _T2)в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:120: error: в??
template<class _T1, class _T2> stlp_std::pair<_T1, _T2>
stlp_std::make_pair(_T1, _T2
)в?T previously declared here
In file included from
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/../functional:55,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/functional:39,
from /usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c+
+/4.2.2/tr1/tuple:159,
from ./include/gtest/internal/gtest-port.h:327,
from ./include/gtest/internal/gtest-internal.h:40,
from ./include/gtest/gtest.h:65,
from src/gtest.cc:34:
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:102: error: redefinition of в??struct
stlp_std::unary_function<_Arg,
_Res
ult>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:40:
error:
previous definition of в??struct stlp_std::unary_function<_Arg, _Result>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:114: error: redefinition of в??struct
stlp_std::binary_function<_Arg1, _A
rg2, _Result>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:46:
error:
previous definition of в??struct stlp_std::binary_function<_Arg1, _Arg2, _Resul
t>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:134: error: redefinition of в??struct stlp_std::plus<_Tp>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:104:
error:
previous definition of в??struct stlp_std::plus<_Tp>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:143: error: redefinition of в??struct stlp_std::minus<_Tp>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:109:
error:
previous definition of в??struct stlp_std::minus<_Tp>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:152: error: redefinition of в??struct
stlp_std::multiplies<_Tp>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:124:
error:
previous definition of в??struct stlp_std::multiplies<_Tp>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:196: error: redefinition of в??struct
stlp_std::equal_to<_Tp>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:53:
error:
previous definition of в??struct stlp_std::equal_to<_Tp>в?T
/usr/lib/gcc/i386-redhat-linux/4.2.2/../../../../include/c++/4.2.2/bits/
stl_function.h:223: error: redefinition of в??struct stlp_std::less<_Tp>в?T
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:66:
error:
previous definition of в??struct stlp_std::less<_Tp>в?T
make: *** [src/gtest.lo] Error 1
Original comment by AGBondar...@gmail.com
on 25 Feb 2009 at 8:08
It seems that you are mixing STL port and gcc's STL together. For example, the
compiler is complaining that something in gcc's STL (/usr/lib/gcc/i386-redhat-
linux/4.2.2/../../../../include/c++/4.2.2/bits/stl_function.h) was already
defined in
STL port
(/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h). I
don't think that's a supported scenario.
Also, the errors don't seem to be related to GTEST_HAS_CLONE. Why did you
decide to
define it to 0?
Original comment by zhanyong...@gmail.com
on 3 Mar 2009 at 6:54
Since we don't have STL port installed and have no experience with it, and this
seems
a problem in your build configuration, I'm closing the issue. Please use the
discussion group for follow-up questions and discussions. That way, many more
people
can see your problem and help you. Thanks.
Original comment by zhanyong...@gmail.com
on 3 Mar 2009 at 6:27
Original issue reported on code.google.com by
AGBondar...@gmail.com
on 18 Feb 2009 at 12:44