Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 827883

Summary: dev-cpp/tbb-2021.4.0: '__TBB_machine_fetchadd4' was not declared in this scope
Product: Gentoo Linux Reporter: Alex Fan <alex.fan.q>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: herrtimson, riscv
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: riscv   
OS: Linux   
URL: https://github.com/oneapi-src/oneTBB/issues/186
See Also: https://github.com/oneapi-src/oneTBB/pull/550
https://github.com/gentoo/gentoo/pull/23878
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 820851    
Attachments: build log
emerge --info

Description Alex Fan archtester 2021-11-30 09:01:27 UTC
Happens in riscv, but other arches may also have this issue.

/var/tmp/portage/dev-cpp/tbb-2021.4.0/work/oneTBB-2021.4.0/src/tbb/tools_api/ittnotify_config.h:348:12: error: ‘__TBB_machine_fetchadd4’ was not declared in this scope
  348 |     return __TBB_machine_fetchadd4(ptr, 1) + 1L;
      |            ^~~~~~~~~~~~~~~~~~~~~~~


Reproducible: Always
Comment 1 Alex Fan archtester 2021-11-30 09:01:51 UTC
Created attachment 757061 [details]
build log
Comment 2 Alex Fan archtester 2021-11-30 09:02:10 UTC
Created attachment 757062 [details]
emerge --info
Comment 3 tt_1 2022-01-17 18:00:54 UTC
was this fixed for you with tbb-2021.5.0?
Comment 4 Alex Fan archtester 2022-01-19 04:00:24 UTC
(In reply to tt_1 from comment #3)
> was this fixed for you with tbb-2021.5.0?

No, the fix linked in upstream PR was merged on October, so 2021.5 hasn't include it. 

It is a very tiny patch though. If possible, could you include it in the portage tree? Both 2021.4 and 2021.5 works fine with it on riscv. 2020.3 doesn't seem to need it.
Comment 5 Alex Fan archtester 2022-01-19 04:16:11 UTC
(In reply to Alex Fan from comment #4)
> (In reply to tt_1 from comment #3)
> the fix linked in upstream PR was merged on October, so 2021.5 hasn't
> include it. 

Scratch this. Looking the commit history again, 2021.5 doesn't seem to mean the release freeze date. 2021.5 has some commits past May 2021. 

But I double-checked the pr is not included in 2021.5 and this bug is still there without the patch.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-19 09:50:40 UTC
Would you mind doing a PR?
Comment 7 Larry the Git Cow gentoo-dev 2022-01-20 12:36:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=675d894c36bfd854d8f7624912d34e9dd6ca7177

commit 675d894c36bfd854d8f7624912d34e9dd6ca7177
Author:     Alex Fan <alex.fan.q@gmail.com>
AuthorDate: 2022-01-20 05:02:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-20 12:30:58 +0000

    dev-cpp/tbb: fix undefined __TBB_machine_fetchadd4
    
    Closes: https://bugs.gentoo.org/827883
    Signed-off-by: Alex Fan <alex.fan.q@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23878
    Signed-off-by: Sam James <sam@gentoo.org>

 ...bb-2021.4.0-missing-TBB_machine_fetchadd4.patch | 23 ++++++++++++++++++++++
 dev-cpp/tbb/tbb-2021.4.0.ebuild                    |  2 ++
 dev-cpp/tbb/tbb-2021.5.0.ebuild                    |  2 ++
 3 files changed, 27 insertions(+)