libtbb-dev: Do we need -latomic to include tbb via pkg-config?

Asked by sohei koyama

when we install libtbb-dev, `/usr/lib/x86_64-linux-gnu/pkgconfig/tbb.pc` is installed.

```
$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/tbb.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: Threading Building Blocks
Description: Intel's parallelism library for C++
URL: http://www.threadingbuildingblocks.org/
Version:
Libs: -ltbb -latomic
Cflags:
```

`Libs: -ltbb -latomic` is Suspicious.

I understand that -latomic is needed when using std::atomic.

However, in version 2020.1-2, std::atomic is not used , and tbb/atomic.h is used instead.

(Note: in versioin 2021 or later, std::atomic is used)

So I think -latomic is not needed.

Thank you for reading my little question !

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu tbb Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Best Manfred Hampl (m-hampl) said :
#1

Ubuntu has copied that package from Debian without any ubuntu-specific modification. If there is something suspicious, then this should be reported to Debian. If Debian change the package, Ubuntu will follow.

Revision history for this message
sohei koyama (koyamaso) said :
#2

Thanks.

Revision history for this message
sohei koyama (koyamaso) said :
#3

Thanks Manfred Hampl, that solved my question.