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

Figure out a way to make cartogram and it's tests compile separately #187

Open
adisidev opened this issue Jul 31, 2024 · 0 comments
Open

Comments

@adisidev
Copy link
Collaborator

Currently, I was getting the following compile error upon trying to compile using the CMakeLists.txt on 03b29e7

AILED: CMakeFiles/test_string_to_decimal_converter.dir/tests/test_string_to_decimal_converter.cpp.o 
/opt/homebrew/opt/llvm@17/bin/clang++ -DBOOST_ALL_NO_LIB -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -I/Users/adi/Desktop/github/cartogram-cpp/include -I/Users/adi/Desktop/github/cartogram-cpp/PkgConfig::fftw -isystem /opt/homebrew/anaconda3/include -isystem /opt/homebrew/Cellar/fftw/3.3.10_1/include -I/opt/flex/flex-2.6.4/include -I/opt/bison/bison-3.7.91/share/include -O3 -DNDEBUG -std=gnu++20 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -isystem /opt/homebrew/anaconda3/include -ffp-contract=off -Wall -Wextra -pedantic -Wno-deprecated-declarations -MD -MT CMakeFiles/test_string_to_decimal_converter.dir/tests/test_string_to_decimal_converter.cpp.o -MF CMakeFiles/test_string_to_decimal_converter.dir/tests/test_string_to_decimal_converter.cpp.o.d -o CMakeFiles/test_string_to_decimal_converter.dir/tests/test_string_to_decimal_converter.cpp.o -c /Users/adi/Desktop/github/cartogram-cpp/tests/test_string_to_decimal_converter.cpp
In file included from /Users/adi/Desktop/github/cartogram-cpp/tests/test_string_to_decimal_converter.cpp:3:
In file included from /opt/homebrew/anaconda3/include/boost/test/unit_test.hpp:18:
In file included from /opt/homebrew/anaconda3/include/boost/test/test_tools.hpp:54:
In file included from /opt/homebrew/anaconda3/include/boost/test/tools/fpc_op.hpp:19:
In file included from /opt/homebrew/anaconda3/include/boost/test/tools/fpc_tolerance.hpp:19:
In file included from /opt/homebrew/anaconda3/include/boost/test/tree/decorator.hpp:22:
In file included from /opt/homebrew/anaconda3/include/boost/test/tree/fixture.hpp:21:
In file included from /opt/homebrew/anaconda3/include/boost/function/function0.hpp:11:
In file included from /opt/homebrew/anaconda3/include/boost/function/detail/maybe_include.hpp:15:
In file included from /opt/homebrew/anaconda3/include/boost/function/function_template.hpp:13:
In file included from /opt/homebrew/anaconda3/include/boost/function/detail/prologue.hpp:17:
In file included from /opt/homebrew/anaconda3/include/boost/function/function_base.hpp:21:
In file included from /opt/homebrew/anaconda3/include/boost/type_index.hpp:29:
In file included from /opt/homebrew/anaconda3/include/boost/type_index/stl_type_index.hpp:47:
/opt/homebrew/anaconda3/include/boost/container_hash/hash.hpp:131:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
  131 |         struct hash_base : std::unary_function<T, std::size_t> {};
      |                            ~~~~~^
/opt/homebrew/opt/llvm@17/bin/../include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
   46 | using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
      | ^
1 error generated.

I fixed this with conda install boost and conda update boost. This I feel is weird inherently, where is python coming from?

To avoid such issues, @nihalzp suggested we could create a flag in the CMakeLists.txt that would run/compile the tests conditionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant