votca/tools

tests fail to build: fatal error: 'ext/alloc_traits.h' file not found

Closed this issue · 17 comments

AILED: tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o 
/usr/bin/c++ -DBOOST_TEST_DYN_LINK -DTOOLS_TEST_DATA_FOLDER=\"/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/DataFiles\" -I/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/include -Itools/include -Itools/include/votca/tools -isystem /usr/local/include -isystem /usr/local/include/eigen3 -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wno-sign-conversion -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -std=c++14 -MD -MT tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o -MF tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o.d -o tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o -c /usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc
/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc:36:10: fatal error: 'ext/alloc_traits.h' file not found
#include <ext/alloc_traits.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.

Revision: 2021-rc.1-228-g1754257
FreeBSD 12.2
clang-10

That is a gcc header.

@JoshuaSBrown can you have a look at this?

What the fruitcake.

This looks like an old library is being used. That header should be available in the newer standards.


AILED: tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o 

/usr/bin/c++ -DBOOST_TEST_DYN_LINK -DTOOLS_TEST_DATA_FOLDER=\"/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/DataFiles\" -I/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/include -Itools/include -Itools/include/votca/tools -isystem /usr/local/include -isystem /usr/local/include/eigen3 -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wno-sign-conversion -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -std=c++14 -MD -MT tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o -MF tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o.d -o tools/src/tests/CMakeFiles/unit_test_graphalgorithm.dir/test_graphalgorithm.cc.o -c /usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc

/usr/ports/science/votca/work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc:36:10: fatal error: 'ext/alloc_traits.h' file not found

#include <ext/alloc_traits.h>

         ^~~~~~~~~~~~~~~~~~~~

1 error generated.

Revision: 2021-rc.1-228-g1754257

FreeBSD 12.2

clang-10

Can you check what libstdc++ library you are using. Eg look at this link to get the version

https://stackoverflow.com/questions/10354636/how-do-you-find-what-version-of-libstdc-library-is-installed-on-your-linux-mac

$ strings /usr/lib/libc++.so.1 | grep LIBCXX
GLIBCXX_3.4

I think ext/alloc_traits.h is part of gcc and FreeBSD is using clang.

@JoshuaSBrown what function are we using that header for?

It's used in 2 places:

work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc:#include <ext/alloc_traits.h>
work/tools-71c2d3a8f7ee9b1eb3be24c41ad599ffbbd3ec8a/src/tests/test_graphalgorithm.cc:#include <ext/alloc_traits.h>

It's used in 2 places:

work/votca-2021-rc.1-228-g1754257/tools/src/tests/test_graphalgorithm.cc:#include <ext/alloc_traits.h>
work/tools-71c2d3a8f7ee9b1eb3be24c41ad599ffbbd3ec8a/src/tests/test_graphalgorithm.cc:#include <ext/alloc_traits.h>

Can you compile with gcc and c++?

c++ is clang. gcc is a no-go, it can only be used if the project has bugs that can only be built with gcc.

Ok You can disable the tests in tools for now, see if that works?

As in you can build each repository separately.

cd tools
cmake -S. -B build -DENABLE_TESTING=Off
cmake --build build
cmake --build build --install

That graph file is part of development and will not affect any of the binaries or features of VOTCA.

c++ is clang. gcc is a no-go, it can only be used if the project has bugs that can only be built with gcc.

Your right I meant g++

When I was implementing the graph functionality I didn't realize I was making use of GNU specefic extensions. I will see if I can create a patch.

It does not look like that header file is being used anyway, you can simply delete that specific header file in the meantime.

@junghans aren't we compiling with clang in the CI, why wouldn't this show up?

@junghans aren't we compiling with clang in the CI, why wouldn't this show up?

Well we build with clang, but there is no container without gcc (and its headers) installed.