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

non-standard path gcc compile googltest failed in centos7 #817

Closed
wsatbluesky opened this issue Sep 25, 2023 · 1 comment
Closed

non-standard path gcc compile googltest failed in centos7 #817

wsatbluesky opened this issue Sep 25, 2023 · 1 comment
Assignees
Labels
needs confirmation Review to label and confirm

Comments

@wsatbluesky
Copy link

We have a gcc 10.4.0 in non-standard path,and add it in shell environment. When execute “scipion3 installp -p scipion-em-xmipp -j 12 | tee install.log" , but the googletest always use the system's default gcc,then failed.

# All requested packages already installed.

 'fftw' installed in conda environ 'scipion3'.

Configuring OpenCV
Configuring CUDA
 nvcc found in /opt/ohpc/pub/apps/cuda11.6/bin/nvcc
 CUDA-11.6.124 found.
 gcc 10.4.0 found for CUDA: /opt/ohpc/pub/apps/gcc/10.4.0/bin/gcc
Configuring MPI
 'mpicc' detected.
 'mpicxx' detected.
Configuring JAVA
 JAVA_HOME (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64) guessed from javac or installed in conda.
 JAVA_BINDIR detected at: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/bin
 JAVAC detected at: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/bin/javac
 JAR detected at: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/bin/jar
 JNI_CPPPATH detected at: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/include
 JNI_CPPPATH detected at: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/include/linux
 
 
Configuration completed and written on xmipp.conf

MPI_RUN variable found in the environment with this value: /opt/ohpc/pub/apps/openmpi/4.0.2_cuda10.1/bin/mpirun.
CUDA variable found in the environment with this value: True.
OPENCV variable found in the environment with this value: False.

Checking configuration -----------------------------------
Checking compiler configuration
 Detected /opt/ohpc/pub/apps/gcc/10.4.0/bin/g++ in version 10.4.0.
Checking hdf5 configuration
 Done                                                                       

Checking MPI configuration
--------------------------------------------------------------------------
mpirun has detected an attempt to run as root.

Running as root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.

We strongly suggest that you run mpirun as a non-root user.

You can override this protection by adding the --allow-run-as-root option
to the cmd line or by setting two environment variables in the following way:
the variable OMPI_ALLOW_RUN_AS_ROOT=1 to indicate the desire to override this
protection, and OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 to confirm the choice and
add one more layer of certainty that you want to do so.
We reiterate our advice against doing so - please proceed at your own risk.
--------------------------------------------------------------------------
    > This sentence should be printed 2 times if mpi runs fine.llow-run-as-roo...
    > This sentence should be printed 2 times if mpi runs fine.
 Done                                                                       

Checking cmake configuration
Checking Java configuration
 Done                                                                                                                                                       
Checking CUDA configuration
 Done                                                                       
MPI_RUN variable found in the environment with this value: /opt/ohpc/pub/apps/openmpi/4.0.2_cuda10.1/bin/mpirun.
CUDA variable found in the environment with this value: True.
OPENCV variable found in the environment with this value: False.
 

Building Dependencies ------------------------------------
Building cuFFTAdvisor...
 Done       
Building googletest...
 ['-- The C compiler identification is GNU 4.8.5', '-- The CXX compiler identification is GNU 4.8.5', '-- Detecting C compiler ABI info', '-- Detecting C compiler 
ABI info - done', '-- Check for working C compiler: /usr/bin/cc - skipped', '-- Detecting C compile features', '-- Detecting C compile features - done', '-- Detecting CXX compiler ABI info', '-- Detecting CXX compiler ABI info - done', '-- Check for working CXX compiler: /usr/bin/c++ - skipped', '-- Detecting CXX compile features', '-- Detecting CXX compile features - done', '-- Found Python: /opt/ohpc/pub/apps/miniconda3/envs/scipion3/bin/python3.8 (found version "3.8.17") found components: Interpreter', '-- Performing Test CMAKE_HAVE_LIBC_PTHREAD', '-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed', '-- Looking for pthread_create in pthreads', '-- Looking for pthread_create in pthreads - not found', '-- Looking for pthread_create in pthread', '-- Looking for pthread_create in pthread - found', '-- Found Threads: TRUE', '-- Configuring done (1.9s)', '-- Generating done (0.0s)', '-- Build files have been written to: /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/build', '[ 50%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-message.h:57:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-assertion-result.h:46,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:64,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported.', ' #error C++ versions less than C++14 are not supported.', '  ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-printers.h:115:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:48,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:47,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-death-test.h:43,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:65,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:636:58: error: wrong number of template arguments (0, should be 1)', '   typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;', '                                                          ^', 'In file included from /usr/include/c++/4.8.2/string:48:0,', '                 from /usr/include/c++/4.8.2/bits/locale_classes.h:40,', '                 from /usr/include/c++/4.8.2/bits/ios_base.h:41,', '                 from /usr/include/c++/4.8.2/iomanip:40,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:54,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/usr/include/c++/4.8.2/bits/stl_function.h:231:12: error: provided for ‘template<class _Tp> struct std::less’', '     struct less : public binary_function<_Tp, _Tp, bool>', '            ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-printers.h:115:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:48,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:47,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-death-test.h:43,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:65,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:636:59: error: template argument 3 is invalid', '   typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;', '                                                           ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h: In member function ‘bool testing::internal::TypedTestSuitePState::AddTestName(const char*, int, const char*, const char*)’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:613:23: error: request for member ‘insert’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap {aka int}’', '     registered_tests_.insert(', '                       ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h: In member function ‘bool testing::internal::TypedTestSuitePState::TestExists(const string&) const’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:619:30: error: request for member ‘count’ in ‘((const testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘const RegisteredTestsMap {aka const int}’', '     return registered_tests_.count(test_name) > 0;', '                              ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h: In member function ‘const testing::internal::CodeLocation& testing::internal::TypedTestSuitePState::GetCodeLocation(const string&) const’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:623:40: error: expected initializer before ‘it’', '     RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);', '                                        ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-message.h:57:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-assertion-result.h:46,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:64,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:624:18: error: ‘it’ was not declared in this scope', '     GTEST_CHECK_(it != registered_tests_.end());', '                  ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-port.h:1027:35: note: in definition of macro ‘GTEST_CHECK_’', '   if (::testing::internal::IsTrue(condition)) \\', '                                   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:624:42: error: request for member ‘end’ in ‘((const testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘const RegisteredTestsMap {aka const int}’', '     GTEST_CHECK_(it != registered_tests_.end());', '                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-port.h:1027:35: note: in definition of macro ‘GTEST_CHECK_’', '   if (::testing::internal::IsTrue(condition)) \\', '                                   ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-printers.h:115:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:48,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:47,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-death-test.h:43,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:65,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-internal.h:625:12: error: ‘it’ was not declared in this scope', '     return it->second;', '            ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-death-test.h:43,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:65,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In static member function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined()’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:434:12: error: ‘is_trivially_copy_constructible’ is not a member of ‘std’', '            std::is_trivially_copy_constructible<M>::value &&', '            ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:434:50: error: expected primary-expression before ‘>’ token', '            std::is_trivially_copy_constructible<M>::value &&', '                                                  ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:434:51: error: ‘::value’ has not been declared', '            std::is_trivially_copy_constructible<M>::value &&', '                                                   ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:48:0:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc: In member function ‘const char* testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(const char*, const char*, int, const char*)’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:61:46: error: expected initializer before ‘RegisteredTestIter’', '   typedef RegisteredTestsMap::const_iterator RegisteredTestIter;', '                                              ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:77:27: error: request for member ‘count’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap {aka int}’', '     if (registered_tests_.count(name) != 0) {', '                           ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:85:8: error: ‘RegisteredTestIter’ was not declared in this scope', '   for (RegisteredTestIter it = registered_tests_.begin();', '        ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:85:27: error: expected ‘;’ before ‘it’', '   for (RegisteredTestIter it = registered_tests_.begin();', '                           ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:86:8: error: ‘it’ was not declared in this scope', '        it != registered_tests_.end(); ++it) {', '        ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-typed-test.cc:86:32: error: request for member ‘end’ in ‘((testing::internal::TypedTestSuitePState*)this)->testing::internal::TypedTestSuitePState::registered_tests_’, which is of non-class type ‘testing::internal::TypedTestSuitePState::RegisteredTestsMap {aka int}’', '        it != registered_tests_.end(); ++it) {', '                                ^', 'In file included from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:0,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-death-test.h:43,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest.h:65,', '                 from /opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-all.cc:38:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = const std::basic_string<char>&]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58:   required from ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<const std::basic_string<char>&>*&; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = const std::basic_string<char>&; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:536:55:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:436:3: error: body of constexpr function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = const std::basic_string<char>&]’ not a return-statement', '   }', '   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<const std::basic_string<char>&>*&; T = const std::basic_string<char>&]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = const std::basic_string<char>&; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:536:55:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58: error: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = const std::basic_string<char>&]’ called in a constant expression', '   template <typename M, bool = MatcherBase::IsInlined<M>()>', '                                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:432:25: note: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = const std::basic_string<char>&]’ is not usable as a constexpr function because:', '   static constexpr bool IsInlined() {', '                         ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:483:35: note: in template argument for type ‘bool’', '     using Policy = ValuePolicy<MM>;', '                                   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58:   required from ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<const std::basic_string<char>&>*&; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = const std::basic_string<char>&; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:558:48:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:436:3: error: body of constexpr function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = std::basic_string<char>]’ not a return-statement', '   }', '   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<const std::basic_string<char>&>*&; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = const std::basic_string<char>&; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:558:48:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58: error: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = std::basic_string<char>]’ called in a constant expression', '   template <typename M, bool = MatcherBase::IsInlined<M>()>', '                                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:432:25: note: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<const std::basic_string<char>&>*; T = std::basic_string<char>]’ is not usable as a constexpr function because:', '   static constexpr bool IsInlined() {', '                         ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:483:35: note: in template argument for type ‘bool’', '     using Policy = ValuePolicy<MM>;', '                                   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<std::basic_string<char> >*; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58:   required from ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<std::basic_string<char> >*&; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = std::basic_string<char>; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:560:48:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:436:3: error: body of constexpr function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<std::basic_string<char> >*; T = std::basic_string<char>]’ not a return-statement', '   }', '   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = const testing::MatcherInterface<std::basic_string<char> >*&; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:312:14:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::MatcherInterface<U>*) [with U = std::basic_string<char>; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:560:48:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58: error: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<std::basic_string<char> >*; T = std::basic_string<char>]’ called in a constant expression', '   template <typename M, bool = MatcherBase::IsInlined<M>()>', '                                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:432:25: note: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = const testing::MatcherInterface<std::basic_string<char> >*; T = std::basic_string<char>]’ is not usable as a constexpr function because:', '   static constexpr bool IsInlined() {', '                         ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:483:35: note: in template argument for type ‘bool’', '     using Policy = ValuePolicy<MM>;', '                                   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58:   required from ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:318:28:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-2-2> = void; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:541:69:   required from ‘testing::Matcher<const std::basic_string<char>&>::Matcher(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-1-2> = void]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-matchers.cc:46:68:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:436:3: error: body of constexpr function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’ not a return-statement', '   }', '   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:318:28:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-2-2> = void; T = const std::basic_string<char>&]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:541:69:   required from ‘testing::Matcher<const std::basic_string<char>&>::Matcher(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-1-2> = void]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-matchers.cc:46:68:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58: error: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’ called in a constant expression', '   template <typename M, bool = MatcherBase::IsInlined<M>()>', '                                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:432:25: note: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = const std::basic_string<char>&]’ is not usable as a constexpr function because:', '   static constexpr bool IsInlined() {', '                         ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:483:35: note: in template argument for type ‘bool’', '     using Policy = ValuePolicy<MM>;', '                                   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58:   required from ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:318:28:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-2-2> = void; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:565:62:   required from ‘testing::Matcher<std::basic_string<char> >::Matcher(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-1-2> = void]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-matchers.cc:56:61:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:436:3: error: body of constexpr function ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’ not a return-statement', '   }', '   ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h: In instantiation of ‘void testing::internal::MatcherBase<T>::Init(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’:', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:318:28:   required from ‘testing::internal::MatcherBase<T>::MatcherBase(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-2-2> = void; T = std::basic_string<char>]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:565:62:   required from ‘testing::Matcher<std::basic_string<char> >::Matcher(M&&) [with M = testing::internal::EqMatcher<std::basic_string<char> >; <template-parameter-1-2> = void]’', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/src/gtest-matchers.cc:56:61:   required from here', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:438:58: error: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’ called in a constant expression', '   template <typename M, bool = MatcherBase::IsInlined<M>()>', '                                                          ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:432:25: note: ‘static constexpr bool testing::internal::MatcherBase<T>::IsInlined() [with M = testing::internal::EqMatcher<std::basic_string<char> >; T = std::basic_string<char>]’ is not usable as a constexpr function because:', '   static constexpr bool IsInlined() {', '                         ^', '/opt/ohpc/pub/apps/scipion/software/em/xmippSrc-v3.23.07.0/src/googletest/googletest/include/gtest/gtest-matchers.h:483:35: note: in template argument for type ‘bool’', '     using Policy = ValuePolicy<MM>;', '                                   ^', 'make[3]: *** [googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1', 'make[2]: *** [googletest/CMakeFiles/gtest.dir/all] Error 2', 'make[1]: *** [googletest/CMakeFiles/gtest.dir/rule] Error 2', 'make: *** [gtest] Error 2']
---------------------------------------------------------------
 Unable to install Xmipp.

 Cannot build googletest dependence. 
 Review the repository has been downloaded correctly. Run /xmipp cleanAll 
to remove all repositories (local changes will be removed) and compile Xmipp from scrachReview the cmake version of your system and review compileLOG.txt file
 for more details about the error  
 For more information about the error check compileLOG.txt file if exist.
 You can visit our guide of installation https://github.com/I2PC/xmipp,
 visit the wiki page with some details https://github.com/I2PC/xmipp/wiki 
 and you can contact us xmipp@cnb.csic.es or Discord/Scipion/xmipp
To report the details of the error please share the reportInstallation.tar.gz file
---------------------------------------------------------------
Build not found...
  cmake version 3.26.4
  nvcc version:     release 11.6
ERROR: File or folder '/opt/ohpc/pub/apps/scipion/software/em/xmipp/bin/xmipp_reconstruct_significant' not found after running 'cd . && ./xmipp config noAsk && ./x
mipp check_config && ./xmipp compileAndInstall N=1 && ln -srfn build /opt/ohpc/pub/apps/scipion/software/em/xmipp && cd - && touch installation_finished && rm bindings_linked 2> /dev/null'.

Anybody know how to make googletest use non-standard path gcc?

@albertmena albertmena added the needs confirmation Review to label and confirm label Sep 25, 2023
@MartinSalinas98
Copy link
Collaborator

Hey @wsatbluesky! Sorry for the late response. In the future, for quicker answers, we are usually way quicker answering in Scipion's Discord Server, there is a channel for Xmipp there.

Regarding your issue:
What xmipp is doing to build googletest:

  • Goes to your xmipp's directory, and inside to src/googletest, creates a build directory, and moves inside it.
  • Then runs: cmake .. and, if that command succeeds, runs make gtest gtest_main.
    So, Xmipp is properly detecting your odd gcc/g++ installation path, but it's cmake the one switching to the default installation.

What you can do to test this:

  • Go to your xmipp's directory, in production versions, this is located inside your scipion folder, in software/em. To further develop this, go to your scipion directory, and from there, if your are on the latest production version (v3.23.07.0 as of today), cd to software/em/xmippSrc-v3.23.07.0 (if your are on a different version, it's xmippSrc-whateverVersion, just changing the version variable).
  • Once there, move to src/googletest.
  • Run ls. If build directory exists (it probably should) cd build, else mkdir build && cd build.
  • Then, run cmake ... This command should generate a Makefile inside build folder, try to open it and check the references it might have to gcc.
  • Finally run make gtest gtest_main, if your gcc location is fine, this should work, but I'm guessing cmake will find your default gcc, therefore, creating the problem you described.
  • If the error occurs, run echo $CC && echo $CXX, which contain the paths to the gcc/g++ cmake will use. If they are not the desired ones, you might be able to fix your installation by simply overriding those values with export inside your .bashrc (export CC=/path/to/your/gcc && export CXX=/path/to/your/g++)

Let me know if this worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs confirmation Review to label and confirm
Projects
None yet
Development

No branches or pull requests

3 participants