-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDEV-30554 RocksDB risc64 libatomic linking on rocksdb tools missing: was: Update build_rocksdb.cmake #2472
Conversation
Do not erase ${SYSTEM_LIBS} variable when setting it, this makes the latomic flag set for riscv64 lost
@ottok I'm uploading the change in Ubuntu, feel free to upload in Debian if you agree please :) |
…d on riscv64 architecture and all the archs needing latomic link
The existing storage/rocksdb/CMakeCache.txt defined ATOMIC_EXTRA_LIBS when atomics where required. This was determined by the toplevel configure.cmake test (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC). As build_rocksdb.cmake is included after ATOMIC_EXTRA_LIBS was set, we just need to use it. As such no riscv64 specific macro is needed in build_rocksdb.cmake. As highlighted by Gianfranco Costamagna (@LocutusOfBorg) in MariaDB#2472 overwriting SYSTEM_LIBS was problematic. This is corrected in case in future SYSTEM_LIBS is changed elsewhere. Closes MariaDB#2472.
The existing storage/rocksdb/CMakeCache.txt defined ATOMIC_EXTRA_LIBS when atomics where required. This was determined by the toplevel configure.cmake test (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC). As build_rocksdb.cmake is included after ATOMIC_EXTRA_LIBS was set, we just need to use it. As such no riscv64 specific macro is needed in build_rocksdb.cmake. As highlighted by Gianfranco Costamagna (@LocutusOfBorg) in MariaDB#2472 overwriting SYSTEM_LIBS was problematic. This is corrected in case in future SYSTEM_LIBS is changed elsewhere. Closes MariaDB#2472.
The existing storage/rocksdb/CMakeCache.txt defined ATOMIC_EXTRA_LIBS when atomics where required. This was determined by the toplevel configure.cmake test (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC). As build_rocksdb.cmake is included after ATOMIC_EXTRA_LIBS was set, we just need to use it. As such no riscv64 specific macro is needed in build_rocksdb.cmake. As highlighted by Gianfranco Costamagna (@LocutusOfBorg) in MariaDB#2472 overwriting SYSTEM_LIBS was problematic. This is corrected in case in future SYSTEM_LIBS is changed elsewhere. Closes MariaDB#2472.
@LocutusOfBorg thanks very much for highlighting the obvious flaw and digging up the University of Illinois check. It seems from the build above that the amd64 Centos 7 tries to include libatomic and it doesn't exist. As it turns out the top level configure.cmake already does a similar check. Do you mind checking #2477. |
What do you mean? Are you going to fork the version in Ubuntu? That tends to cause me more work and not really help. |
@ottok we can sync as soon as you upload again in Debian |
Thanks @LocutusOfBorg for your help. Could you please also review #2477 or any of the open MRs at https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests to help the build issues and Debian packaging improve faster? There is also a s390x test error visible on Debian builds at https://buildd.debian.org/status/package.php?p=mariadb which did not reproduce on Launchpad builds at https://launchpad.net/~mysql-ubuntu/+archive/ubuntu/mariadb-10.11/+builds?build_text=&build_state=all which I could use some help on. Merge Requests directly on the Debian (and Ubuntu) packaging welcome so I can do the next upload as soon as possible. |
Started 7 hours ago |
@ottok I did open a merge request with the PR to fix riscv64, as uploaded in Ubuntu, so we can sync again on next update. |
The existing storage/rocksdb/CMakeCache.txt defined ATOMIC_EXTRA_LIBS when atomics where required. This was determined by the toplevel configure.cmake test (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC). As build_rocksdb.cmake is included after ATOMIC_EXTRA_LIBS was set, we just need to use it. As such no riscv64 specific macro is needed in build_rocksdb.cmake. As highlighted by Gianfranco Costamagna (@LocutusOfBorg) in MariaDB#2472 overwriting SYSTEM_LIBS was problematic. This is corrected in case in future SYSTEM_LIBS is changed elsewhere. Closes MariaDB#2472.
The existing storage/rocksdb/CMakeCache.txt defined ATOMIC_EXTRA_LIBS when atomics where required. This was determined by the toplevel configure.cmake test (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC). As build_rocksdb.cmake is included after ATOMIC_EXTRA_LIBS was set, we just need to use it. As such no riscv64 specific macro is needed in build_rocksdb.cmake. As highlighted by Gianfranco Costamagna (@LocutusOfBorg) in #2472 overwriting SYSTEM_LIBS was problematic. This is corrected in case in future SYSTEM_LIBS is changed elsewhere. Closes #2472.
merged #2477 instead. Thanks for testing. |
Do not erase ${SYSTEM_LIBS} variable when setting it, this makes the latomic flag set for riscv64 lost
this is the current code
So, in case of not WIN32, the SYSTEM_LIBS with latomic value is just lost. We should keep it to fix riscv64 build failure
https://launchpadlibrarian.net/648316103/buildlog_ubuntu-lunar-riscv64.mariadb-10.6_1%3A10.6.11-2_BUILDING.txt.gz