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

Bug 926265

Summary: kde-frameworks/syntax-highlighting-5.115.0: undefined reference to `__atomic_fetch_add_8`
Product: Gentoo Linux Reporter: smlr
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: UNCONFIRMED ---    
Severity: normal CC: smlr, vidra.jonas
Priority: Normal    
Version: unspecified   
Hardware: PPC   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 721344    
Attachments: Log of last build
emerge --info
Log with -latomic

Description smlr 2024-03-06 14:06:42 UTC
Cannot compile kde-frameworks/syntax-highlighting-5.115.0.

Received an error:
/usr/lib/gcc/powerpc-unknown-linux-gnu/11/../../../../powerpc-unknown-linux-gnu/bin/ld: src/lib/CMakeFiles/KF5SyntaxHighlighting.dir/definition.cpp.o: in function `KSyntaxHighlighting::DefinitionData::load(KSyntaxHighlighting::DefinitionData::OnlyKeywords) [clone .part.0]':
definition.cpp:(.text+0xb6ac): undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Reproducible: Always

Steps to Reproduce:
1. sudo emerge -av syntax-highlighting
Actual Results:  
It won't compile

Expected Results:  
Compiled and installed package
Comment 1 smlr 2024-03-06 14:07:22 UTC
Created attachment 886808 [details]
Log of last build
Comment 2 smlr 2024-03-06 14:07:40 UTC
Created attachment 886809 [details]
emerge --info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 14:23:26 UTC
Needs -latomic.
Comment 4 smlr 2024-03-06 14:42:56 UTC
Same thing with -latomic
The new log is attached
Comment 5 smlr 2024-03-06 14:43:39 UTC
Created attachment 886810 [details]
Log with -latomic
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 15:03:47 UTC
I think CMake is putting it in the wrong place for you. Needs to be done via a patch.
Comment 7 smlr 2024-03-06 20:05:13 UTC
(In reply to Sam James from comment #6)
> I think CMake is putting it in the wrong place for you. Needs to be done via
> a patch.

You was right!
I found a temporary workaround.

/etc/portage/env/latomic.conf
LDFLAGS='-latomic ${LDFLAGS}'

/etc/portage/package.env/plasma
kde-frameworks/syntax-highlighting latomic.conf

Now sudo emerge -av syntax-highlighting works perfectly.