Open kusa-dowsing opened 3 months ago
Thanks for the report. We already fixed this in the internal version by removing constexpr from a bunch of functions. I'll do a new code push in the next few weeks.
Thanks for the report. We already fixed this in the internal version by removing constexpr from a bunch of functions. I'll do a new code push in the next few weeks.
A New Error was occurred.
after i removed the constexpr, i built the lib successfully. But when i used the s2 lib, i got A new Error, like:
/home/tsh/workspace/auto_pro/modules/cmake_modules/../../third_party/x86_64/include/s2/base/log_severity.h:27:16: error: ‘constexpr const bool google::DEBUG_MODE’ redeclared as different kind of entity
27 | constexpr bool DEBUG_MODE = true;
| ^~~~~~
In file included from /usr/include/glog/logging.h:512,
from /home/tsh/workspace/auto_pro/opt/include/openads/modules/ads_common/common/ulog.h:30,
from /home/tsh/workspace/auto_pro/opt/include/openads/modules/ads_common/common/environment.h:25,
from /home/tsh/workspace/auto_pro/modules/applications/ped_trick/src/geo_trajectory.h:6,
from /home/tsh/workspace/auto_pro/modules/applications/ped_trick/src/geo_trajectory.cc:1:
/usr/include/glog/log_severity.h:88:8: note: previous declaration ‘google::
it looks like the s2geometry need the specified version of glog, but i don't know which version would be used for s2, can you show me the right one?
In file included from /usr/include/glog/logging.h:512,
from /home/tsh/workspace/auto_pro/opt/include/openads/modules/ads_common/common/ulog.h:30,
We don't use glog
anymore. Can you switch to abseil-cpp
logging?
S2 should not be defining google::DEBUG_MODE
, though. I guess we should call it S2_DEBUG_MODE
.
In file included from /usr/include/glog/logging.h:512, from /home/tsh/workspace/auto_pro/opt/include/openads/modules/ads_common/common/ulog.h:30,
We don't use
glog
anymore. Can you switch toabseil-cpp
logging?S2 should not be defining
google::DEBUG_MODE
, though. I guess we should call itS2_DEBUG_MODE
.
may be you wanna be compatible with glog?
The comment is now wrong and this definition is making us incompatible with glog.
version: master
os: wsl2 ubuntu20.04
cmake option: cmake -DCMAKE_CXX_STANDARD=17 -DWITH_GFLAGS=ON -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=${INSTALL_DIR}/lib ..
error: call to non-‘constexpr’ function /s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’ /s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’ s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’
Hey, I ran into the same issue, and it turned out that the G++ is incompatible with s2geometry. After switching to the Clang compiler, I was able to successfully build and install s2geometry. I had to specify the compiler in the cmake command:
cmake -DWITH_GFLAGS=ON -DWITH_GTEST=ON \
-DGOOGLETEST_ROOT=/home/user/myvenv/Source/googletest \
-DOPENSSL_INCLUDE_DIR=/usr/lib/ssl \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_COMPILER=clang++ ..
Could you try with #367 ?
version: master
os: wsl2 ubuntu20.04
cmake option: cmake -DCMAKE_CXX_STANDARD=17 -DWITH_GFLAGS=ON -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_INSTALL_LIBDIR=${INSTALL_DIR}/lib ..
error: call to non-‘constexpr’ function /s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’ /s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’ s2geometry/src/s2/s1chord_angle.h:311:43: error: call to non-‘constexpr’ function ‘T util::math::internal_vector::BasicVector<VecTemplate, T, N>::Norm2() const [with VecTemplate = Vector3; T = double; long unsigned int N = 3]’