ddavis2speedray / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SVN Gtest: OpenBSD-4.5-current and GCC-4.2 build failure #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. export CC=egcc
2. export CXX=eg++
3. ./configure && gmake

 eg++ -DHAVE_CONFIG_H -I. -I. -I./build-aux -I. -I./include -g -O2 -MT
src/gtest
.lo -MD -MP -MF src/.deps/gtest.Tpo -c src/gtest.cc  -fPIC -DPIC -o
src/.libs/gt
est.o
In file included from ./include/gtest/gtest.h:58,
                 from src/gtest.cc:34:
./include/gtest/internal/gtest-internal.h:274: error:
'testing::internal::Format
ForComparisonFailureMessage' declared as an 'inline' variable
./include/gtest/internal/gtest-internal.h:274: error:
'testing::internal::String
 testing::internal::FormatForComparisonFailureMessage' redeclared as
different k
ind of symbol
./include/gtest/internal/gtest-internal.h:271: error: previous declaration
of 't
esting::internal::String
testing::internal::FormatForComparisonFailureMessage(co
nst char*, const std::string&)'
./include/gtest/internal/gtest-internal.h:274: error: 'std::wstring' has
not bee
n declared
./include/gtest/internal/gtest-internal.h:274: error: 'str' was not
declared in 
this scope
./include/gtest/internal/gtest-internal.h:274: error: expected
primary-expressio
n before 'const'
./include/gtest/internal/gtest-internal.h:274: error: expected
unqualified-id be
fore '::' token
./include/gtest/internal/gtest-internal.h:274: error: expected ',' or '...'
befo
re '::' token
./include/gtest/internal/gtest-internal.h: In function
'testing::internal::Strin
g testing::internal::FormatForComparisonFailureMessage()':
./include/gtest/internal/gtest-internal.h:274: error: 'str' was not
declared in 
this scope
In file included from ./include/gtest/gtest.h:61,
                 from src/gtest.cc:34:
./include/gtest/gtest-message.h: At global scope:
./include/gtest/gtest-message.h:172: error: expected unqualified-id before
'&' t
oken
./include/gtest/gtest-message.h:172: error: expected ',' or '...' before
'&' tok
en
./include/gtest/gtest-message.h:172: error: 'testing::Message&
testing::Message:
:operator<<()' must take exactly one argument
In file included from src/gtest.cc:34:
./include/gtest/gtest.h:622: error: expected unqualified-id before '&' token
./include/gtest/gtest.h:622: error: expected ',' or '...' before '&' token
./include/gtest/gtest.h: In function 'testing::internal::String
testing::interna
l::FormatForFailureMessage()':
./include/gtest/gtest.h:623: error: 'wstr' was not declared in this scope
./include/gtest/gtest.h: At global scope:
./include/gtest/gtest.h:881: error: expected unqualified-id before '&' token
./include/gtest/gtest.h:881: error: expected ',' or '...' before '&' token
./include/gtest/gtest.h:884: error: expected unqualified-id before '&' token
./include/gtest/gtest.h:884: error: expected ',' or '...' before '&' token
src/gtest.cc:900: error: expected unqualified-id before '&' token
src/gtest.cc:900: error: expected ',' or '...' before '&' token
src/gtest.cc:900: error: 'testing::Message& testing::Message::operator<<()'
must
 take exactly one argument
src/gtest.cc:1308: error: expected unqualified-id before '&' token
src/gtest.cc:1308: error: expected ',' or '...' before '&' token
src/gtest.cc: In function 'testing::AssertionResult
testing::IsSubstring(const c
har*, const char*)':
src/gtest.cc:1309: error: 'needle' was not declared in this scope
src/gtest.cc:1309: error: 'haystack' was not declared in this scope
src/gtest.cc: At global scope:
src/gtest.cc:1314: error: expected unqualified-id before '&' token
src/gtest.cc:1314: error: expected ',' or '...' before '&' token
src/gtest.cc: In function 'testing::AssertionResult
testing::IsNotSubstring(cons
t char*, const char*)':
src/gtest.cc:1315: error: 'needle' was not declared in this scope
src/gtest.cc:1315: error: 'haystack' was not declared in this scope
gmake: *** [src/gtest.lo] Error 1

Using svn version (as of today) of gtest with GCC gcc-4.2.4 on
OpenBSD-4.5-current.

I found this when trying to build LLVM (http://www.llvm.org), which uses
gtest. It seems the error is upstream, hence reporting here. When fixed the
LLVM guys will either update to a new version of gtest or patch the bug in
their tree.

Thanks

Original issue reported on code.google.com by vex...@gmail.com on 23 May 2009 at 12:47

GoogleCodeExporter commented 9 years ago
Thanks for the report.  We do not have the resources to port gtest to open BSD 
at
this time.  Instead, we hope open BSD users can contribute patches to make 
gtest work
there.

Original comment by zhanyong...@gmail.com on 2 Jun 2009 at 7:45

GoogleCodeExporter commented 9 years ago
Closing due to the lack of resources.  If someone submit a patch, we'll be glad 
to 
review it.

Original comment by zhanyong...@gmail.com on 5 Jun 2009 at 6:24