acts-project / vecmem

Vectorised data model base and helper classes.
https://acts-project.github.io/vecmem/
Mozilla Public License 2.0
19 stars 13 forks source link

External Updates, main branch (2024.08.09.) #292

Closed krasznaa closed 3 months ago

krasznaa commented 3 months ago

This all was primarily meant to fix some warnings that showed up while building GoogleTest with oneAPI 2024.2. Unfortunately it's exactly that issue that it doesn't fix...

I did the following:

Unfortunately that last step didn't have the desired effect. :frowning: I still see:

[  0%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
cd /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-build/googletest && /home/krasznaa/software/intel/oneapi-2024.2.1/compiler/2024.2/bin/compiler/clang++ -DGTEST_CREATE_SHARED_LIBRARY=1 -Dgtest_EXPORTS -I/home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/include -I/home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest -O2 -g -DNDEBUG -std=c++17 -fPIC -Wall -Wshadow -Wconversion -Wundef -Wno-implicit-float-size-conversion -ffp-model=precise -DGTEST_HAS_PTHREAD=1 -fexceptions -W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Winline -Wredundant-decls -MD -MT _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -MF CMakeFiles/gtest.dir/src/gtest-all.cc.o.d -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/src/gtest-all.cc
In file included from /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/src/gtest-all.cc:38:
In file included from /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/include/gtest/gtest.h:55:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:66:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: warning: 'get_temporary_buffer<testing::TestInfo *>' is deprecated [-Wdeprecated-declarations]
  263 |                 std::get_temporary_buffer<value_type>(_M_original_len));
      |                      ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:4996:15: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, testing::TestInfo *>::_Temporary_buffer' requested here
 4996 |       _TmpBuf __buf(__first, (__last - __first + 1) / 2);
      |               ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:5070:23: note: in instantiation of function template specialization 'std::__stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, __gnu_cxx::__ops::_Iter_comp_iter<(lambda at /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/src/gtest.cc:3009:20)>>' requested here
 5070 |       _GLIBCXX_STD_A::__stable_sort(__first, __last,
      |                       ^
/home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/src/gtest.cc:3008:8: note: in instantiation of function template specialization 'std::stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **, std::vector<testing::TestInfo *>>, (lambda at /home/krasznaa/ATLAS/projects/vecmem/build/_deps/googletest-src/googletest/src/gtest.cc:3009:20)>' requested here
 3008 |   std::stable_sort(test_info_list_.begin(), test_info_list_.end(),
      |        ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:99:5: note: 'get_temporary_buffer<testing::TestInfo *>' has been explicitly marked deprecated here
   99 |     _GLIBCXX17_DEPRECATED
      |     ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'
  119 | # define _GLIBCXX17_DEPRECATED [[__deprecated__]]
      |                                  ^
1 warning generated.
[100%] Linking CXX shared library ../../../lib/libgtest.so

This comes from a pretty innocent-looking piece of code in GoogleTest. (https://github.com/google/googletest/blob/v1.15.2/googletest/src/gtest.cc#L3008-L3015) So by now I'm back to suspecting soemthing going wrong in oneAPI... :thinking:

krasznaa commented 3 months ago

As pointed out by @ivorobts, the warning in the GoogleTest build is a known LLVM + libstdc++12 issue. (https://github.com/llvm/llvm-project/issues/76515)

Luckily in our build it's only a warning, so I guess we'll live with it...