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

Fix GCC 13 warnings #1978

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Fix GCC 13 warnings #1978

wants to merge 2 commits into from

Conversation

Gold856
Copy link
Contributor

@Gold856 Gold856 commented Jan 14, 2025

Fixes #1967. Adds Ubuntu 24.04 with GCC 13 to the CI matrix so we can catch this on GitHub's CI.

@Gold856
Copy link
Contributor Author

Gold856 commented Jan 14, 2025

Error for BearingRange.h:

In file included from /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/util/ConfigureVectorization.h:346,
                 from /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/Core:22,
                 from /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/Dense:1,
                 from /home/gold856/gtsam/gtsam/base/OptionalJacobian.h:24,
                 from /home/gold856/gtsam/gtsam/base/Matrix.h:27,
                 from /home/gold856/gtsam/gtsam/base/VerticalBlockMatrix.h:20,
                 from /home/gold856/gtsam/gtsam/nonlinear/internal/JacobianMap.h:23,
                 from /home/gold856/gtsam/gtsam/nonlinear/Expression.h:22,
                 from /home/gold856/gtsam/gtsam/nonlinear/ExpressionFactor.h:25,
                 from /home/gold856/gtsam/gtsam/sam/BearingRangeFactor.h:22,
                 from /home/gold856/gtsam/gtsam/slam/dataset.cpp:21:
In function ‘__m128d _mm_loadu_pd(const double*)’,
    inlined from ‘Packet Eigen::internal::ploadu(const typename unpacket_traits<T>::type*) [with Packet = __vector(2) double]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/arch/SSE/PacketMath.h:746:22,
    inlined from ‘Packet Eigen::internal::ploadt(const typename unpacket_traits<T>::type*) [with Packet = __vector(2) double; int Alignment = 0]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/GenericPacketMath.h:969:26,
    inlined from ‘PacketType Eigen::internal::evaluator<Eigen::PlainObjectBase<Derived> >::packet(Eigen::Index, Eigen::Index) const [with int LoadMode = 0; PacketType = __vector(2) double; Derived = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/CoreEvaluators.h:238:42,
    inlined from ‘void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignPacket(Eigen::Index, Eigen::Index) [with int StoreMode = 16; int LoadMode = 0; PacketType = __vector(2) double; DstEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false> >; SrcEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Matrix<double, 1, 1, 0, 1, 1> >; Functor = Eigen::internal::assign_op<double, double>; int Version = 0]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:675:116,
    inlined from ‘void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignPacketByOuterInner(Eigen::Index, Eigen::Index) [with int StoreMode = 16; int LoadMode = 0; PacketType = __vector(2) double; DstEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false> >; SrcEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Matrix<double, 1, 1, 0, 1, 1> >; Functor = Eigen::internal::assign_op<double, double>; int Version = 0]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:689:48,
    inlined from ‘static void Eigen::internal::dense_assignment_loop<Kernel, 4, 0>::run(Kernel&) [with Kernel = Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false> >, Eigen::internal::evaluator<Eigen::Matrix<double, 1, 1, 0, 1, 1> >, Eigen::internal::assign_op<double, double>, 0>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:572:86,
    inlined from ‘void Eigen::internal::call_dense_assignment_loop(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>; SrcXprType = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Functor = assign_op<double, double>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:785:37,
    inlined from ‘static void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Weak>::run(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>; SrcXprType = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Functor = Eigen::internal::assign_op<double, double>; Weak = void]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:954:31,
    inlined from ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>; Src = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Func = assign_op<double, double>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:890:49,
    inlined from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename enable_if<(! evaluator_assume_aliasing<Src>::value), void*>::type) [with Dst = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>; Src = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Func = assign_op<double, double>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:858:27,
    inlined from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>; Src = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/AssignEvaluator.h:836:18,
    inlined from ‘Derived& Eigen::MatrixBase<Derived>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Derived = Eigen::Block<Eigen::Matrix<double, 2, 1>, -1, -1, false>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/Assign.h:66:28,
    inlined from ‘Eigen::CommaInitializer<MatrixType>::CommaInitializer(XprType&, const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<double, 1, 1, 0, 1, 1>; XprType = Eigen::Matrix<double, 2, 1>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/CommaInitializer.h:48:51,
    inlined from ‘Eigen::CommaInitializer<Derived> Eigen::DenseBase<Derived>::operator<<(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Derived = Eigen::Matrix<double, 2, 1>]’ at /home/gold856/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/CommaInitializer.h:159:72,
    inlined from ‘gtsam::BearingRange<A1, A2, B, R>::TangentVector gtsam::BearingRange<A1, A2, B, R>::localCoordinates(const gtsam::BearingRange<A1, A2, B, R>&) const [with A1 = gtsam::Pose2; A2 = Eigen::Matrix<double, 2, 1>; B = gtsam::Rot2; R = double]’ at /home/gold856/gtsam/gtsam/geometry/BearingRange.h:142:12:
/usr/lib/gcc/x86_64-linux-gnu/13/include/emmintrin.h:134:24: error: array subscript ‘__m128d_u[0]’ is partly outside array bounds of ‘gtsam::internal::LieGroupTraits<gtsam::Rot2>::TangentVector [1]’ {aka ‘Eigen::Matrix<double, 1, 1, 0, 1, 1> [1]’} [-Werror=array-bounds=]
  134 |   return *(__m128d_u *)__P;
      |                        ^~~
In file included from /home/gold856/gtsam/gtsam/sam/BearingRangeFactor.h:23:
/home/gold856/gtsam/gtsam/geometry/BearingRange.h: In member function ‘gtsam::BearingRange<A1, A2, B, R>::TangentVector gtsam::BearingRange<A1, A2, B, R>::localCoordinates(const gtsam::BearingRange<A1, A2, B, R>&) const [with A1 = gtsam::Pose2; A2 = Eigen::Matrix<double, 2, 1>; B = gtsam::Rot2; R = double]’:
/home/gold856/gtsam/gtsam/geometry/BearingRange.h:139:39: note: object ‘v1’ of size 8
  139 |     typename traits<B>::TangentVector v1 = traits<B>::Local(bearing_, other.bearing_);

@Gold856
Copy link
Contributor Author

Gold856 commented Jan 14, 2025

Blocked by #1738

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

Successfully merging this pull request may close these issues.

ROS build farm are broken for develop branch
1 participant