Compilation problem googletest-1.8.0 on AIX and SunOS

39 views
Skip to first unread message

정필규

unread,
Oct 11, 2019, 6:41:50 AM10/11/19
to googletes...@googlegroups.com

Hey,

 

I'm Pilkyu in Korea.

 

These days, I am making environment for automatic build automation.

During that doing, I met a problem in googletest compilation.

Could you help me in this compilation problem?

Here are problems.


FIRST - Solaris


$ uname -a

SunOS V490 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V490

 

$ which cmake

/usr/local/bin/cmake-v3.5.0/

 

$ cd googletest-1.8.0/

 

$ mkdir build

 

$ cd build/

 

$ cmake ..

 

-- The C compiler identification is SunPro 5.8.0

 

-- The CXX compiler identification is SunPro 5.8.0

 

-- Check for working C compiler: /opt/SUNWspro/bin/cc

 

-- Check for working C compiler: /opt/SUNWspro/bin/cc -- works

 

-- Detecting C compiler ABI info

 

-- Detecting C compiler ABI info - done

 

-- Check for working CXX compiler: /opt/SUNWspro/bin/CC

 

-- Check for working CXX compiler: /opt/SUNWspro/bin/CC -- works

 

-- Detecting CXX compiler ABI info

 

-- Detecting CXX compiler ABI info - done

 

-- Detecting CXX compile features

 

-- Detecting CXX compile features - done

 

-- Found PythonInterp: /usr/bin/python (found version "2.4.4") 

 

-- Looking for pthread.h

 

-- Looking for pthread.h - found

 

-- Looking for pthread_create

 

-- Looking for pthread_create - found

 

-- Found Threads: TRUE  

 

-- Configuring done

 

-- Generating done

 

-- Build files have been written to: ~/googletest-1.8.0/build

 

$ make all

 

Scanning dependencies of target gmock

 

[  9%] Building CXX object googlemock/CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o

 

"~/googletest-1.8.0/googletest/include/gtest/internal/gtest-internal.h", line 565: Error: Could not find a match for std::map<std::string,testing::internal::CodeLocation>::insert(std::pair<const char*, testing::internal::CodeLocation>) needed in testing::internal::TypedTestCasePState::AddTestName(const char*, int, const char*, const char*).

 

"~/googletest-1.8.0/googletest/include/gtest/gtest.h", line 275: Error: complex expression not allowed in dependent template argument expression.

 

"~/googletest-1.8.0/googletest/include/gtest/gtest.h", line 1458: Error: complex expression not allowed in dependent template argument expression.

 

3 Error(s) detected.

 

*** Error code 3

 

The following command caused the error:

 

cd ~/googletest-1.8.0/build/googlemock && /opt/SUNWspro/bin/CC    -I~/googletest-1.8.0/googlemock/include -I~/googletest-1.8.0/googlemock -I~/googletest-1.8.0/googletest/include -I~/googletest-1.8.0/googletest -DGTEST_HAS_PTHREAD=1 -features=except -o CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o -c ~/googletest-1.8.0/googletest/src/gtest-all.cc

 

make: Fatal error: Command failed for target `googlemock/CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o'

 

Current working directory ~/googletest-1.8.0/build

 

*** Error code 1

 

The following command caused the error:

 

make -f googlemock/CMakeFiles/gmock.dir/build.make googlemock/CMakeFiles/gmock.dir/build

 

make: Fatal error: Command failed for target `googlemock/CMakeFiles/gmock.dir/all'

 

Current working directory ~/googletest-1.8.0/build

 

*** Error code 1

 

The following command caused the error:

 

make -f CMakeFiles/Makefile2 all

 

make: Fatal error: Command failed for target `all'

 

$ .....................................

 

 

SECOND - AIX

 

$ uname -a

AIX localhost 1 6 00CD04814C00

 

$ cd googletest-1.8.0/

$ mkdir build

$ cd build/

$ cmake ..

-- The C compiler identification is XL 11.1.0

-- The CXX compiler identification is XL 11.1.0

-- Check for working C compiler: /usr/vacpp/bin/cc

-- Check for working C compiler: /usr/vacpp/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/vacpp/bin/xlC

-- Check for working CXX compiler: /usr/vacpp/bin/xlC -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Could NOT find PythonInterp (missing:  PYTHON_EXECUTABLE) 

-- Looking for pthread.h

-- Looking for pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - found

-- Found Threads: TRUE  

-- Configuring done

-- Generating done

-- Build files have been written to: ~/googletest-1.8.0/build

 

$ make all

Scanning dependencies of target gmock

[  9%] Building CXX object googlemock/CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 275.23: 1540-0274 (S) The name lookup for "PrintAsStringLiteralTo" did not find a declaration.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 275.23: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 262.13: 1540-0700 (I) The previous message was produced while processing "testing::internal::PrintCharsAsStringTo<wchar_t>(const wchar_t *, size_t, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 367.3: 1540-0700 (I) The previous message was produced while processing "testing::internal::PrintWideStringTo(const ::std::wstring &, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 275.23: 1540-0274 (S) The name lookup for "PrintAsStringLiteralTo" did not find a declaration.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 275.23: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 262.13: 1540-0700 (I) The previous message was produced while processing "testing::internal::PrintCharsAsStringTo<char>(const char *, size_t, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 355.3: 1540-0700 (I) The previous message was produced while processing "testing::internal::PrintStringTo(const ::std::string &, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 296.5: 1540-0274 (S) The name lookup for "PrintCharsAsStringTo" did not find a declaration.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 296.5: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 286.13: 1540-0700 (I) The previous message was produced while processing "testing::internal::UniversalPrintCharArray<wchar_t>(const wchar_t *, size_t, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 316.3: 1540-0700 (I) The previous message was produced while processing "testing::internal::UniversalPrintArray(const wchar_t *, size_t, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 296.5: 1540-0274 (S) The name lookup for "PrintCharsAsStringTo" did not find a declaration.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 296.5: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified.

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 286.13: 1540-0700 (I) The previous message was produced while processing "testing::internal::UniversalPrintCharArray<char>(const char *, size_t, ostream *)".

"~/googletest-1.8.0/googletest/src/gtest-printers.cc", line 310.3: 1540-0700 (I) The previous message was produced while processing "testing::internal::UniversalPrintArray(const char *, size_t, ostream *)".

make: 1254-004 The error code from the last command is 1.

 

 

Stop.

make: 1254-004 The error code from the last command is 2.

 

 

Stop.

make: 1254-004 The error code from the last command is 2.

 

 

Stop.

 

$ .....................................




Best Regards,

Pilkyu

Tor Didriksen

unread,
Oct 15, 2019, 3:15:00 AM10/15/19
to 정필규, Google C++ Testing Framework
On Fri, Oct 11, 2019 at 12:41 PM 정필규 <anot...@gmail.com> wrote:

Hey,

 

I'm Pilkyu in Korea.

 

These days, I am making environment for automatic build automation.

During that doing, I met a problem in googletest compilation.

Could you help me in this compilation problem?

Here are problems.


FIRST - Solaris


$ uname -a

SunOS V490 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V490

 

$ which cmake

/usr/local/bin/cmake-v3.5.0/

 

$ cd googletest-1.8.0/

 

$ mkdir build

 

$ cd build/

 

$ cmake ..

 

-- The C compiler identification is SunPro 5.8.0

 

-- The CXX compiler identification is SunPro 5.8.0


That's a really old compiler.
/opt/studio11/SUNWspro/bin/CC -V
CC: Sun C++ 5.8 Patch 121017-10 2007/02/21

MySQL has been using googletest for a long time. If you have a look at our source code for MySQL 5.6 you will find:

# Disable googletest for Solaris Studio < 12.4 since it doesn't compile.
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
  IF(${CC_MINOR_VERSION} LESS 13)
    MESSAGE(WARNING "Googletest requires Solaris Studio 12.4 or newer.")
    UNSET(GMOCK_FOUND)
    UNSET(GMOCK_FOUND CACHE)
    RETURN()
  ENDIF()
ENDIF()

So in our environment, we need at least:

/opt/solarisstudio12.4/bin/CC -V
CC: Sun C++ 5.13 SunOS_sparc Patch 151845-35 2018/12/17

-- didrik

--

---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/googletestframework/CAFWAEsLWbEJHkEi9hFhbJKHFJY3KCkMrYbyGOzB0SybahHjkZA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages