Skip to content

GTSAM 4.2.0 compiles successfully and builds fine in the catkin project, but it errors at runtime. #2202

@zhangqi-sudo

Description

@zhangqi-sudo

if (NOT MSVC)
option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" OFF)

cmake
-DCMAKE_INSTALL_PREFIX=/usr/local
-DBUILD_SHARED_LIBS=ON
-DGTSAM_USE_SYSTEM_EIGEN=ON
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF
-DCMAKE_BUILD_TYPE=Release
..

I’m using GTSAM version 4.2.0 in my fast‑livo2 project, but I’m encountering the same error. I’ve confirmed that I’m using the system Eigen and have disabled -march=native in my CMake configuration, yet the error still occurs:

==26415== Invalid free() / delete / delete[] / realloc()
==26415== at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==26415== by 0x68698D0: _GLOBAL__sub_I_lago.cpp (in /usr/local/lib/libgtsam.so.4.2.0)
==26415== by 0x4011B99: call_init.part.0 (dl-init.c:72)
==26415== by 0x4011CA0: call_init (dl-init.c:30)
==26415== by 0x4011CA0: _dl_init (dl-init.c:119)
==26415== by 0x4001139: ??? (in /usr/lib/x86_64-linux-gnu/ld-2.31.so)
==26415== by 0x2: ???
==26415== by 0x1FFEFFFCE2: ???
==26415== by 0x1FFEFFFD24: ???
==26415== by 0x1FFEFFFD39: ???
==26415== Address 0x1905cda0 is 16 bytes inside a block of size 56 alloc'd
==26415== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==26415== by 0x12EDB8: Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::DenseBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&) (in /home/zhangqi/slam/catkin_ws/devel/lib/fast_livo/fastlivo_mapping)
==26415== by 0x68698B2: _GLOBAL__sub_I_lago.cpp (in /usr/local/lib/libgtsam.so.4.2.0)
==26415== by 0x4011B99: call_init.part.0 (dl-init.c:72)
==26415== by 0x4011CA0: call_init (dl-init.c:30)
==26415== by 0x4011CA0: _dl_init (dl-init.c:119)
==26415== by 0x4001139: ??? (in /usr/lib/x86_64-linux-gnu/ld-2.31.so)
==26415== by 0x2: ???
==26415== by 0x1FFEFFFCE2: ???
==26415== by 0x1FFEFFFD24: ???
==26415== by 0x1FFEFFFD39: ???
==26415==
==26415==
==26415== Exit program on first error (--exit-on-first-error=yes)

I would greatly appreciate any guidance from the experts—thank you so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions