plasma-umass / coz

Coz: Causal Profiling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libcoz.so has trouble finding a C++ mangled symbol

Rohit-Athavale opened this issue · comments

Small summary is I'm compiling ffmpeg(executable composed of various media/codec libraries) with coz.
I'm on Ubuntu 18.04.5 LTS with gcc version 9.3.0

I installed coz by make install after cloning the master branch from here.

./ffmpeg: symbol lookup error: /usr/local/bin/../lib/libcoz.so: undefined symbol: _ZNK3elf3elf11get_sectionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

  1. $ ./ffmpeg --help works fine (it shows the help options)
  2. $ coz run --- ./ffmpeg --help
[coz_experiments/coz/libcoz/libcoz.cpp:100] bootstrapping coz
[coz_experiments/coz/libcoz/libcoz.cpp:128] Including MAIN, which is /coz_experiments/sources/2021_05_14_11_44_48/ffmpeg/ffmpeg

./ffmpeg: symbol lookup error: /usr/local/bin/../lib/libcoz.so: undefined symbol: _ZNK3elf3elf11get_sectionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

I've created a C-wrapper for some custom C++ libraries (say libfoo.so) . At run time those libraries are loaded, and they may contain other C++ references. However, ffmpeg is a pure C based executable.

Could someone tell me how to proceed.

ffmpeg (the executable is stripped of symbols, however ffmpeg_g contains symbols)

$ nm ffmpeg_g | grep __cxx1112basic_stringIcSt11char
               U _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@@GLIBCXX_3.4.21