Some olders versions of g++ do not implicitely link with libstdc++
- Dominant language
- C++
- Stars
- 371
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/intel/libvpl/commit/80ea0a5ebd25743c1cfe973e803245ba67d53b20 removed implicit linking with `libstdc++`.
Some older g++ versions do not implicitly link with `libstdc++`, causing it to not be listed in `vpl.pc`, resulting in
having a bunch of undefined C++ symbols for a C program linking to `libvpl` using `pkg-config`.
The work-around is to pass `-DCXX_LIB="-lstdc++" ` to `cmake`.
I found this issue upgrading from 2.14.0 to 2.17.0, compiling it with g++ 7.5.0 on openSUSE Leap 15.4.
Contributor guide
Research direction
Start by inspecting the CMake configuration that generates vpl.pc and reproduce the issue with g++ 7.5.0, CMake, and pkg-config. Confirm that a C program linking libvpl through pkg-config receives the libstdc++ dependency and no longer reports undefined C++ symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100