And that awkward number if directly consumed is just "-1"

$ cat test-sysconf.cpp
#include <iostream>
#include <unistd.h>

int main() {
    std::cout << "_SC_LEVEL1_DCACHE_LINESIZE = " << 
sysconf(_SC_LEVEL1_DCACHE_LINESIZE) << "\n";
    return 0;
}

$ rm test-sysconf; g++ -Wall -o test-sysconf test-sysconf.cpp && ./test-
sysconf


riscv64 @ Hirsute
_SC_LEVEL1_DCACHE_LINESIZE = -1

riscv64 @ Focal
_SC_LEVEL1_DCACHE_LINESIZE = 0


So it changed the "I can't get this" result from 0 to -1 and that is what broke 
us.

This does not talk about the proper fail RC :-/ 
https://www.gnu.org/software/libc/manual/html_node/Constants-for-Sysconf.html

Man page mentions it:
RETURN VALUE
       The return value of sysconf() is one of the following:

       *  On error, -1 is returned and errno is set to indicate the
cause of the error (for example, EINVAL, indicating that name is
invalid).

       *  If name corresponds to an option, a positive value is returned
if the option is supported, and -1 is returned if the option is not
supported.


So I guess we need to teach mysql to handle that well.

** Changed in: mysql-8.0 (Ubuntu)
       Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915275

Title:
  mysql-8.0 regressed on riscv64 due to new glibc

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1915275/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to