Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 809830 - dev-libs/rocksdb: undefined reference to `__atomic_compare_exchange_1'
Summary: dev-libs/rocksdb: undefined reference to `__atomic_compare_exchange_1'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL: https://github.com/facebook/rocksdb/p...
Whiteboard:
Keywords:
Depends on:
Blocks: libatomic-linking
  Show dependency tree
 
Reported: 2021-08-23 16:28 UTC by Marek Szuba
Modified: 2021-09-02 10:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (rocksdb-6.14.6-r1-build.log,779.13 KB, text/plain)
2021-08-23 16:29 UTC, Marek Szuba
Details
emerge --info (einfo.txt,5.62 KB, text/plain)
2021-08-23 16:29 UTC, Marek Szuba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2021-08-23 16:28:55 UTC
This is not the latest dev-libs/rocksdb version we have got in the tree, however it is still important because it's the newest version currently supported by sys-cluster/ceph. Moreover, the latest available version available in the tree at the moment, 6.17.3, explicitly declares RISC-V as unsupported.
Comment 1 Marek Szuba archtester gentoo-dev 2021-08-23 16:29:23 UTC
Created attachment 735439 [details]
build.log
Comment 2 Marek Szuba archtester gentoo-dev 2021-08-23 16:29:40 UTC
Created attachment 735442 [details]
emerge --info
Comment 3 Marek Szuba archtester gentoo-dev 2021-08-23 16:57:26 UTC
6.15.5 fails to build the same way.
Comment 4 Marek Szuba archtester gentoo-dev 2021-09-02 02:15:34 UTC
For the record, although a simple "append-libs -latomic" in the ebuild hasn't worked for me, adding

string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -latomic")

to CMakeLists.txt does make rocksdb-6.14.6-r1 build and install fine on rv64.

For a proper solution, the check implemented in WebKit build scripts looks like it ought to work.
Comment 5 Alex Fan archtester 2021-09-02 03:10:46 UTC
It seems this issue has been resolved in new upstream versions after 6.20* with similar CMakeList.txt changes.
Comment 6 Larry the Git Cow gentoo-dev 2021-09-02 10:51:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a5672672cbda260a4fb713a266f50f4724f23df

commit 9a5672672cbda260a4fb713a266f50f4724f23df
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-09-02 10:46:37 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-09-02 10:50:55 +0000

    dev-libs/rocksdb: apply upstream libatomic check
    
    Will have already been included in 6.20.2+.
    
    Closes: https://bugs.gentoo.org/809830
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 .../rocksdb/files/rocksdb-6.14.6-libatomic.patch   | 118 +++++++++++++++++----
 dev-libs/rocksdb/rocksdb-6.15.5.ebuild             |   4 +
 dev-libs/rocksdb/rocksdb-6.17.3.ebuild             |   4 +
 3 files changed, 105 insertions(+), 21 deletions(-)