Search code examples
linuxboostbuildcentosbjam

Build debug version of Boost on CentOS 7


I'm trying to build a debug version of Boost on CentOS 7 with the following command:

./b2 runtime-link=shared runtime-debugging=on variant=debug link=shared install

However, I don't see the g nor d ABI flag in the names of the generated library files. Have I done something wrong? Everything works just fine when building on Windows.


Solution

  • I think that should work.

    If building like you do and inspecting one of the resulting libs with objdump

    objdump --syms libboost_wave.so | grep debug
    

    I get

    ...
    0000000000000000 l    d  .debug_aranges 0000000000000000              .debug_aranges
    0000000000000000 l    d  .debug_info    0000000000000000              .debug_info
    0000000000000000 l    d  .debug_abbrev  0000000000000000              .debug_abbrev
    0000000000000000 l    d  .debug_line    0000000000000000              .debug_line
    0000000000000000 l    d  .debug_str     0000000000000000              .debug_str
    0000000000000000 l    d  .debug_ranges  0000000000000000              .debug_ranges
    ...
    

    If building without "runtime-debugging=on variant=debug" the corresponding result do not result in any matches for "grep debug".