Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to build with StlPort. <tr1/tuple> problem #34

Closed
GoogleCodeExporter opened this issue May 13, 2015 · 5 comments
Closed

Need to build with StlPort. <tr1/tuple> problem #34

GoogleCodeExporter opened this issue May 13, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. I builded googletest. 

./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='-
Isome_path/stlport_5.1.5/gcc4/stlport -DGTEST_HAS_TR1_TUPLE=0 -
DGTEST_HAS_CLONE=0 -D_STLP_THREADS' LDFLAGS=-Lsome_path/stlport_5.1.5/gcc4/
lib LIBS=-lstlport

make 
make install
OK

2. The googlemock has not got flags GTEST_HAS_TR1_TUPLE. 
 I tried to build gmock:

./configure LD_LIBRARY_PATH=:some_path/stlport_5.1.5/gcc4/lib:some_path/
stlport_5.1.5/gcc4/lib --prefix=some_path/gmock-1.0.0/ --with-
test=some_path/gtest CPPFLAGS='-Isome_path/stlport_5.1.5/gcc4/st
lport -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_HAS_CLONE=0 -D_STLP_THREADS ' 
LDFLAGS=-Lsome_path/stlport_5.1.5/gcc4/lib LIBS=-lstlport

make 

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/gmock/internal/gmock-port.h:54,
                 from ./include/gmock/internal/gmock-generated-internal-
utils.h:42,
                 from ./include/gmock/internal/gmock-internal-utils.h:45,
                 from ./include/gmock/gmock-actions.h:42,
                 from ./include/gmock/gmock.h:58,
                 from src/gmock.cc:32:
/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::ope
rator!=(const _Tp&, const _Tp&)'
/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&)' previo
usly 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::op
erator>(const _Tp&, const _Tp&)'
/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&)' previou
sly 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::op
erator<=(const _Tp&, const _Tp&)'
/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&)' previo
usly 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::op
erator>=(const _Tp&, const _Tp&)'
/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&)' previo
usly 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/gmock/internal/gmock-port.h:54,
                 from ./include/gmock/internal/gmock-generated-internal-
utils.h:42,
                 from ./include/gmock/internal/gmock-internal-utils.h:45,
                 from ./include/gmock/gmock-actions.h:42,
                 from ./include/gmock/gmock.h:58,
                 from src/gmock.cc:32:
/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>'
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_pair.h:45: error: 
previous definition of 'struct stlp_std::pair<_T1, _T2>'
/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::ope
rator==(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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, _T2>
&, const stlp_std::pair<_T1, _T2>&)' 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::op
erator<(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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>&)' 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::op
erator!=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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, _T2>
&, const stlp_std::pair<_T1, _T2>&)' 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::op
erator>(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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>&)' 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::op
erator<=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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, _T2>
&, const stlp_std::pair<_T1, _T2>&)' 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::op
erator>=(const stlp_std::pair<_T1, _T2>&, const stlp_std::pair<_T1, _T2>&)'
/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, _T2>
&, const stlp_std::pair<_T1, _T2>&)' 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<_T
1, _T2> stlp_std::make_pair(_T1, _T2)'
/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)'
 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/gmock/internal/gmock-port.h:54,
                 from ./include/gmock/internal/gmock-generated-internal-
utils.h:42,
                 from ./include/gmock/internal/gmock-internal-utils.h:45,
                 from ./include/gmock/gmock-actions.h:42,
                 from ./include/gmock/gmock.h:58,
                 from src/gmock.cc:32:
/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, _Resul
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>'
/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, _Arg
2, _Result>'
/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, _Result>
'
/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>'
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:104: 
error: previous definition of 'struct stlp_std::plus<_Tp>'
/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>'
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:109: 
error: previous definition of 'struct stlp_std::minus<_Tp>'
/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>'
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:124: 
error: previous definition of 'struct stlp_std::multiplies<_Tp>'
/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>'
/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>'
/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>'
/home/ecsdev/Linux2.4/stlport_5.1.5/gcc4/stlport/stl/_function_base.h:66: 
error: previous definition of 'struct stlp_std::less<_Tp>'
In file included from ./include/gmock/gmock-spec-builders.h:71,
                 from ./include/gmock/gmock-generated-function-
mockers.h:41,
                 from ./include/gmock/gmock.h:61,
                 from src/gmock.cc:32:
./include/gmock/gmock-matchers.h:850: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h:850: error: ISO C++ forbids declaration 
of 'RE' with no type
./include/gmock/gmock-matchers.h:878: error: ISO C++ forbids declaration 
of 'type name' with no type
./include/gmock/gmock-matchers.h:878: error: template argument 1 is invalid
./include/gmock/gmock-matchers.h: In constructor 
'testing::internal::MatchesRegexMatcher::MatchesRegexMatcher(int)':
./include/gmock/gmock-matchers.h:851: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h:851: error: 'full_match' was not declared 
in this scope
./include/gmock/gmock-matchers.h: In member function 'bool 
testing::internal::MatchesRegexMatcher::Matches(const 
testing::internal::string&) const':
./include/gmock/gmock-matchers.h:862: error: 'RE' has not been declared
./include/gmock/gmock-matchers.h:862: error: invalid type argument of 
'unary *'
./include/gmock/gmock-matchers.h:863: error: 'RE' has not been declared
./include/gmock/gmock-matchers.h:863: error: invalid type argument of 
'unary *'
./include/gmock/gmock-matchers.h: In member function 'void 
testing::internal::MatchesRegexMatcher::DescribeTo(stlp_std::ostream*) 
const':
./include/gmock/gmock-matchers.h:869: error: base operand of '->' is not a 
pointer
./include/gmock/gmock-matchers.h: In member function 'void 
testing::internal::MatchesRegexMatcher::DescribeNegationTo
(stlp_std::ostream*) const':
./include/gmock/gmock-matchers.h:875: error: base operand of '->' is not a 
pointer
./include/gmock/gmock-matchers.h: At global scope:
./include/gmock/gmock-matchers.h:1884: error: expected unqualified-id 
before '*' token
./include/gmock/gmock-matchers.h:1884: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex()':
./include/gmock/gmock-matchers.h:1885: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex(const testing::internal
::string&)':
./include/gmock/gmock-matchers.h:1889: error: expected type-specifier
./include/gmock/gmock-matchers.h:1889: error: expected `)'
./include/gmock/gmock-matchers.h:1889: error: no matching function for 
call to 'MatchesRegex(int*)'
./include/gmock/gmock-matchers.h:1884: note: candidates are: 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex()
./include/gmock/gmock-matchers.h:1888: note:                 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex(const tes
ting::internal::string&)
./include/gmock/gmock-matchers.h: At global scope:
./include/gmock/gmock-matchers.h:1895: error: expected unqualified-id 
before '*' token
./include/gmock/gmock-matchers.h:1895: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex()':
./include/gmock/gmock-matchers.h:1896: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex(const testing::interna
l::string&)':
./include/gmock/gmock-matchers.h:1900: error: expected type-specifier
./include/gmock/gmock-matchers.h:1900: error: expected `)'
./include/gmock/gmock-matchers.h:1900: error: no matching function for 
call to 'ContainsRegex(int*)'
./include/gmock/gmock-matchers.h:1895: note: candidates are: 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex()
./include/gmock/gmock-matchers.h:1899: note:                 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex(const te
sting::internal::string&)
make[1]: *** [src/gmock.lo] Error 1
make[1]: Leaving directory `/home/abondare/distrib/gmock-1.0.0'

3.  I tried to used boost/tr1
 ./configure LD_LIBRARY_PATH=:some_path/stlport_5.1.5/gcc4/lib:some_path/
stlport_5.1.5/gcc4/lib --prefix=some_path/gmock-1.0.0/ --with-
gtest=some_path/gtest CPPFLAGS='-Isome_path/boost_1_35_0/boost/tr1 -
Isome_path/boost_1_35_0 -Isome_path/stlport_5.1.5/gcc4/stlport -
DGTEST_HAS_TR1_TUPLE=0 -DGTEST_HAS_CLONE=0 -D_STLP_THREADS ' LDFLA
GS=-Lsome_path/stlport_5.1.5/gcc4/lib LIBS=-lstlport

make 
In file included from ./include/gmock/gmock-spec-builders.h:71,
                 from ./include/gmock/gmock-generated-function-
mockers.h:41,
                 from ./include/gmock/gmock.h:61,
                 from src/gmock.cc:32:
./include/gmock/gmock-matchers.h:850: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h:850: error: ISO C++ forbids declaration 
of 'RE' with no type
./include/gmock/gmock-matchers.h:878: error: ISO C++ forbids declaration 
of 'type name' with no type
./include/gmock/gmock-matchers.h:878: error: template argument 1 is invalid
./include/gmock/gmock-matchers.h: In constructor 
'testing::internal::MatchesRegexMatcher::MatchesRegexMatcher(int)':
./include/gmock/gmock-matchers.h:851: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h:851: error: 'full_match' was not declared 
in this scope
./include/gmock/gmock-matchers.h: In member function 'bool 
testing::internal::MatchesRegexMatcher::Matches(const 
testing::internal::string&) const':
./include/gmock/gmock-matchers.h:862: error: 'RE' has not been declared
./include/gmock/gmock-matchers.h:862: error: invalid type argument of 
'unary *'
./include/gmock/gmock-matchers.h:863: error: 'RE' has not been declared
./include/gmock/gmock-matchers.h:863: error: invalid type argument of 
'unary *'
./include/gmock/gmock-matchers.h: In member function 'void 
testing::internal::MatchesRegexMatcher::DescribeTo(stlp_std::ostream*) 
const':
./include/gmock/gmock-matchers.h:869: error: base operand of '->' is not a 
pointer
./include/gmock/gmock-matchers.h: In member function 'void 
testing::internal::MatchesRegexMatcher::DescribeNegationTo
(stlp_std::ostream*) const':
./include/gmock/gmock-matchers.h:875: error: base operand of '->' is not a 
pointer
./include/gmock/gmock-matchers.h: At global scope:
./include/gmock/gmock-matchers.h:1884: error: expected unqualified-id 
before '*' token
./include/gmock/gmock-matchers.h:1884: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex()':
./include/gmock/gmock-matchers.h:1885: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex(const testing::internal
::string&)':
./include/gmock/gmock-matchers.h:1889: error: expected type-specifier
./include/gmock/gmock-matchers.h:1889: error: expected `)'
./include/gmock/gmock-matchers.h:1889: error: no matching function for 
call to 'MatchesRegex(int*)'
./include/gmock/gmock-matchers.h:1884: note: candidates are: 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex()
./include/gmock/gmock-matchers.h:1888: note:                 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::MatchesRegex(const tes
ting::internal::string&)
./include/gmock/gmock-matchers.h: At global scope:
./include/gmock/gmock-matchers.h:1895: error: expected unqualified-id 
before '*' token
./include/gmock/gmock-matchers.h:1895: error: expected ',' or '...' before 
'*' token
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex()':
./include/gmock/gmock-matchers.h:1896: error: 'regex' was not declared in 
this scope
./include/gmock/gmock-matchers.h: In function 
'testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex(const testing::interna
l::string&)':
./include/gmock/gmock-matchers.h:1900: error: expected type-specifier
./include/gmock/gmock-matchers.h:1900: error: expected `)'
./include/gmock/gmock-matchers.h:1900: error: no matching function for 
call to 'ContainsRegex(int*)'
./include/gmock/gmock-matchers.h:1895: note: candidates are: 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex()
./include/gmock/gmock-matchers.h:1899: note:                 
testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> 
testing::ContainsRegex(const te
sting::internal::string&)
make[1]: *** [src/gmock.lo] Error 1
make[1]: Leaving directory `/home/abondare/distrib/gmock-1.0.0'


What version of the product are you using? On what operating system?
v. 1.0.0.
OS Linux
gcc 4.2.2.


Original issue reported on code.google.com by AGBondar...@gmail.com on 18 Feb 2009 at 12:44

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Accepted
  • Added labels: OpSys-Linux, Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant