Skip to content

OpenSfM build unconditionally strips out debug symbols, and makes it hard to put them in #1119

@dkogan

Description

@dkogan

Hello. When debugging #1118 I REALLY wanted debug symbols so that I could walk around the C code and put some watchpoints in. Since we have make wrapped in cmake wrapped in setuptools, the process is very unclear. I manually added -ggdb3 to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS in opensfm/src/CMakeLists.txt and '-DCMAKE_BUILD_TYPE=Debug', to the cmake_command in setup.py. This kinda sorta made it work, but the python .so files still ended up stripped. I then noticed that there were 3 copies of the .so files sitting in various directories, and one of those copies was unstripped. Replacing the stripped files with the unstripped ones almost made it work. However the unstripped pyrobust.cpython....so copy had a reference to the undefined symbol _ZN10Similarity15MINIMAL_SAMPLESE, while the stripped one did not; I have no idea why. Replacing the .so files except this one finally made it work, and I could then figure out #1118.

Can we please make this less of an adventure?

Thanks.

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