|
What actual hardware are you running on?
Do you have an AOSC image that can work in qemu?
|
|
same here for mariadb-10.1.19:
Linux 4.8.0-1-powerpc
gcc version 6.2.0 20161109 (Debian 6.2.0-13)
*In file included from /home/mariadb-10.1.19/include/lf.h:19:0,
from /home/mariadb-10.1.19/mysys/lf_alloc-pin.c:104:
/home/mariadb-10.1.19/include/my_atomic.h:121:2: error: #error atomic ops for this platform are not implemented
#error atomic ops for this platform are not implemented
^~~~~
/home/mariadb-10.1.19/include/my_atomic.h: In function ‘my_atomic_cas32’:
/home/mariadb-10.1.19/include/my_atomic.h:209:3: warning: implicit declaration of function ‘make_atomic_cas_body’ [-Wimplicit-function-declaration]
make_atomic_cas_body(S); \
^
/home/mariadb-10.1.19/include/my_atomic.h:248:1: note: in expansion of macro ‘make_atomic_cas’
make_atomic_cas(32)
^~~~~~~~~~~~~~~
/home/mariadb-10.1.19/include/my_atomic.h: In function ‘my_atomic_casptr’:
/home/mariadb-10.1.19/include/my_atomic.h:250:17: error: ‘ptr’ undeclared (first use in this function)
make_atomic_cas(ptr)
^
/home/mariadb-10.1.19/include/my_atomic.h:209:24: note: in definition of macro ‘make_atomic_cas’
make_atomic_cas_body(S); \
^
/home/mariadb-10.1.19/include/my_atomic.h:250:17: note: each undeclared identifier is reported only once for each function it appears in
make_atomic_cas(ptr)
^
/home/mariadb-10.1.19/include/my_atomic.h:209:24: note: in definition of macro ‘make_atomic_cas’
make_atomic_cas_body(S); \
^
mysys/CMakeFiles/mysys.dir/build.make:2198: recipe for target 'mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o' failed
make[2]: *** [mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o] Error 1
CMakeFiles/Makefile2:7447: recipe for target 'mysys/CMakeFiles/mysys.dir/all' failed
make[1]: *** [mysys/CMakeFiles/mysys.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2*
|
|
schojo good idea using the Debian as a powerpc base. How did you get a gcc-6 version for it? Most likely this isn't actually compiler version related however if you want it fixed/tested on gcc-6 making it easy to to install a version would help. Using a cross compiler is an option (https://packages.debian.org/stretch/gcc-powerpc-linux-gnu) however if there is a native way that would be easier.
MingcongBai Attaching the CMake log file would assist also to ensure any fix is likely to be ASOC OS compatible.
|
|
This will be fixed in a 10.1 sprint, but I am working on a related task so it might get pushed earlier. Thanks for the report and details.
|
|
@Daniel Black - i use Debian stretch/sid and i was able to install it right from the repo 
|
|
cvicentiu, please be aware of refactoring done in 10.2:
https://github.com/MariaDB/server/commit/71e11bce34339a69576321d6c40838fa65208dc7
https://github.com/MariaDB/server/commits/bb-10.2-mdev11212
|
|
@svoj@mariadb.org i don't understand - what does that mean? anything we can test? 
|
|
schojo, I just want fix for this bug to go together with MDEV-11212 well. You may try bb-10.2-mdev11212 branch, in theory this bug can be fixed there.
|
|
@Sergey
i tried the following:
git clone -b bb-10.2-mdev11212 https://github.com/MariaDB/server.git
cmake . -DBUILD_CONFIG=mysql_release
make
[...]
[ 15%] Building C object unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o
In file included from /home/server/unittest/mysys/my_atomic-t.c:16:0:
/home/server/unittest/mysys/thr_template.c: In function ‘main’:
/home/server/unittest/mysys/thr_template.c:70:53: error: ‘MY_ATOMIC_MODE’ undeclared (first use in this function)
diag("N CPUs: %d, atomic ops: %s", my_getncpus(), MY_ATOMIC_MODE);
^~~~~~~~~~~~~~
/home/server/unittest/mysys/thr_template.c:70:53: note: each undeclared identifier is reported only once for each function it appears in
/home/server/unittest/mysys/my_atomic-t.c: In function ‘test_atomic_add’:
/home/server/unittest/mysys/my_atomic-t.c:29:5: warning: implicit declaration of function ‘my_atomic_add32’ [-Wimplicit-function-declaration]
my_atomic_add32(&bad, x);
^~~~~~~~~~~~~~~
/home/server/unittest/mysys/my_atomic-t.c: In function ‘test_atomic_add64’:
/home/server/unittest/mysys/my_atomic-t.c:47:5: warning: implicit declaration of function ‘my_atomic_add64’ [-Wimplicit-function-declaration]
my_atomic_add64(&a64, x);
^~~~~~~~~~~~~~~
/home/server/unittest/mysys/my_atomic-t.c: In function ‘test_atomic_fas’:
/home/server/unittest/mysys/my_atomic-t.c:79:8: warning: implicit declaration of function ‘my_atomic_fas32’ [-Wimplicit-function-declaration]
x= my_atomic_fas32(&c32, x);
^~~~~~~~~~~~~~~
/home/server/unittest/mysys/my_atomic-t.c: In function ‘test_atomic_cas’:
/home/server/unittest/mysys/my_atomic-t.c:103:8: warning: implicit declaration of function ‘my_atomic_load32’ [-Wimplicit-function-declaration]
y= my_atomic_load32(&bad);
^~~~~~~~~~~~~~~~
/home/server/unittest/mysys/my_atomic-t.c:106:11: warning: implicit declaration of function ‘my_atomic_cas32’ [-Wimplicit-function-declaration]
ok= my_atomic_cas32(&bad, &y, (uint32)y+x);
^~~~~~~~~~~~~~~
unittest/mysys/CMakeFiles/my_atomic-t.dir/build.make:62: recipe for target 'unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o' failed
make[2]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/my_atomic-t.c.o] Error 1
CMakeFiles/Makefile2:1147: recipe for target 'unittest/mysys/CMakeFiles/my_atomic-t.dir/all' failed
make[1]: *** [unittest/mysys/CMakeFiles/my_atomic-t.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
|
|
schojo, could you share cmake output, specifically I'm interested in lines like these:
-- Performing Test HAVE_GCC_ATOMIC_BUILTINS
|
-- Performing Test HAVE_GCC_ATOMIC_BUILTINS - Success
|
-- Performing Test HAVE_GCC_C11_ATOMICS
|
-- Performing Test HAVE_GCC_C11_ATOMICS - Failed
|
I guess the problem might be in test for gcc builtins in configure.cmake.
|
|
@Sergey
this is for the same branch from git as above, bb-10.2-mdev11212
root@hostname:/home# cat CMakeOutput.log | grep ATOMIC
– Performing Test HAVE_GCC_ATOMIC_BUILTINS
– Performing Test HAVE_GCC_ATOMIC_BUILTINS - Failed
– Performing Test HAVE_GCC_C11_ATOMICS
– Performing Test HAVE_GCC_C11_ATOMICS - Success
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS - Success
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE - Success
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64
– Performing Test HAVE_IB_GCC_ATOMIC_BUILTINS_64 - Failed
– Performing Test HAVE_IB_GCC_ATOMIC_THREAD_FENCE
– Performing Test HAVE_IB_GCC_ATOMIC_THREAD_FENCE - Success
– Performing Test HAVE_IB_GCC_ATOMIC_TEST_AND_SET
– Performing Test HAVE_IB_GCC_ATOMIC_TEST_AND_SET - Success
– Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC
– Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success
|
|
Yeah, that's what I was expecting: test for HAVE_GCC_ATOMIC_BUILTINS failed. Could you also share your CMakeFiles/CMakeError.log or at least lines around HAVE_GCC_ATOMIC_BUILTINS?
|
|
root@hostname:/home/server# cat CMakeFiles/CMakeError.log | grep HAVE_GCC_ATOMIC_BUILTINS
Performing C++ SOURCE FILE Test HAVE_GCC_ATOMIC_BUILTINS failed with the following output:
/usr/bin/c++ -DPACKAGE=test -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_STDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D_STDC_LIMIT_MACROS -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS -o CMakeFiles/cmTC_29116.dir/src.cxx.o -c /home/server/CMakeFiles/CMakeTmp/src.cxx
/usr/bin/c++ -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS CMakeFiles/cmTC_29116.dir/src.cxx.o -o cmTC_29116 -rdynamic -lm -lcrypt -ldl -lpthread
|
|
I'm afraid grep won't work here, I need multiple lines, like:
Performing C++ SOURCE FILE Test HAVE_GCC_ATOMIC_BUILTINS succeded with the following output:
|
Change Dir: /home/svoj/devel/maria/debug/CMakeFiles/CMakeTmp
|
|
Run Build Command:"/usr/bin/make" "cmTryCompileExec51411793/fast"
|
/usr/bin/make -f CMakeFiles/cmTryCompileExec51411793.dir/build.make CMakeFiles/cmTryCompileExec51411793.dir/build
|
make[1]: Entering directory '/home/svoj/devel/maria/debug/CMakeFiles/CMakeTmp'
|
/usr/bin/cmake -E cmake_progress_report /home/svoj/devel/maria/debug/CMakeFiles/CMakeTmp/CMakeFiles 1
|
Building CXX object CMakeFiles/cmTryCompileExec51411793.dir/src.cxx.o
|
/usr/bin/c++ -DPACKAGE=test -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS -o CMakeFiles/cmTryCompileExec51411793.dir/src.cxx.o -c /home/svoj/devel/maria/debug/CMakeFiles/CMakeTmp/src.cxx
|
Linking CXX executable cmTryCompileExec51411793
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec51411793.dir/link.txt --verbose=1
|
/usr/bin/c++ -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS CMakeFiles/cmTryCompileExec51411793.dir/src.cxx.o -o cmTryCompileExec51411793 -rdynamic -lm -lcrypt -ldl -lpthread
|
make[1]: Leaving directory '/home/svoj/devel/maria/debug/CMakeFiles/CMakeTmp'
|
|
Source file was:
|
|
int main()
|
{
|
int foo= -10; int bar= 10;
|
long long int foo64= -10; long long int bar64= 10;
|
if (!__sync_fetch_and_add(&foo, bar) || foo)
|
return -1;
|
bar= __sync_lock_test_and_set(&foo, bar);
|
if (bar || foo != 10)
|
return -1;
|
bar= __sync_val_compare_and_swap(&bar, foo, 15);
|
if (bar)
|
return -1;
|
if (!__sync_fetch_and_add(&foo64, bar64) || foo64)
|
return -1;
|
bar64= __sync_lock_test_and_set(&foo64, bar64);
|
if (bar64 || foo64 != 10)
|
return -1;
|
bar64= __sync_val_compare_and_swap(&bar64, foo, 15);
|
if (bar64)
|
return -1;
|
return 0;
|
}
|
|
|
Performing C++ SOURCE FILE Test HAVE_GCC_ATOMIC_BUILTINS failed with the following output:
|
Change Dir: /home/server/CMakeFiles/CMakeTmp
|
|
Run Build Command:"/usr/bin/make" "cmTC_29116/fast"
|
/usr/bin/make -f CMakeFiles/cmTC_29116.dir/build.make CMakeFiles/cmTC_29116.dir/build
|
make[1]: Entering directory '/home/server/CMakeFiles/CMakeTmp'
|
Building CXX object CMakeFiles/cmTC_29116.dir/src.cxx.o
|
/usr/bin/c++ -DPACKAGE=test -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS -o CMakeFiles/cmTC_29116.dir/src.cxx.o -c /home/server/CMakeFiles/CMakeTmp/src.cxx
|
Linking CXX executable cmTC_29116
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_29116.dir/link.txt --verbose=1
|
/usr/bin/c++ -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DHAVE_GCC_ATOMIC_BUILTINS CMakeFiles/cmTC_29116.dir/src.cxx.o -o cmTC_29116 -rdynamic -lm -lcrypt -ldl -lpthread
|
CMakeFiles/cmTC_29116.dir/src.cxx.o: In function `main':
|
src.cxx:(.text+0x16c): undefined reference to `__sync_fetch_and_add_8'
|
src.cxx:(.text+0x1e4): undefined reference to `__sync_lock_test_and_set_8'
|
src.cxx:(.text+0x258): undefined reference to `__sync_val_compare_and_swap_8'
|
collect2: error: ld returned 1 exit status
|
CMakeFiles/cmTC_29116.dir/build.make:97: recipe for target 'cmTC_29116' failed
|
make[1]: *** [cmTC_29116] Error 1
|
make[1]: Leaving directory '/home/server/CMakeFiles/CMakeTmp'
|
Makefile:126: recipe for target 'cmTC_29116/fast' failed
|
make: *** [cmTC_29116/fast] Error 2
|
|
Source file was:
|
|
int main()
|
{
|
int foo= -10; int bar= 10;
|
long long int foo64= -10; long long int bar64= 10;
|
if (!__sync_fetch_and_add(&foo, bar) || foo)
|
return -1;
|
bar= __sync_lock_test_and_set(&foo, bar);
|
if (bar || foo != 10)
|
return -1;
|
bar= __sync_val_compare_and_swap(&bar, foo, 15);
|
if (bar)
|
return -1;
|
if (!__sync_fetch_and_add(&foo64, bar64) || foo64)
|
return -1;
|
bar64= __sync_lock_test_and_set(&foo64, bar64);
|
if (bar64 || foo64 != 10)
|
return -1;
|
bar64= __sync_val_compare_and_swap(&bar64, foo, 15);
|
if (bar64)
|
return -1;
|
return 0;
|
}
|
|
|
This looks odd, this test never references 8bit atomic operations.
Anyway I just pushed a fix that makes availability of sync builtins optional. Please pull and try again.
|
|
Looks good so far, i'm at 30% now...
|
|
make made it to 100% now, lot's of warnings but nothing too special i think.
i'll see if it runs now.
|
|
schojo is it running ok?
|
|
I don't have the system anymore but it did, yes.
|
|
Thanks for your feedback. duplicate of MDEV-11296
|
|
danblack, how is it a duplicate of MDEV-11296 which is "InnoDB stalls under OLTP RW on P8"?
And if you meant MDEV-11282, it cannot be a duplicate of it either, it's vice versa.
|
|
it fails to build with the same errors on arm and mips too (10.2.8)
|
|
I'll look into this on arm soon. It is easier for me to get a hold of an arm machine.
|
|
is easy to test it, don't need to actually own the hardware
I'm cross compiling it on LEDE (OpenWrt fork) SDK, Version 5.5 is the latest version that can be built (tested on hardware: arm mips mipsel x86), the atomic problem is happening with most of target different of x86, I can put on github the Makefile for version 10+ and can provide bash commands for fast test.
10+ can't be cross compiled on x86 for musl or glibc either but the failure is in
storage/innobase/dict/dict0stats.cc:2565:24: error: no match for 'operator=' (operand types are 'std::pair<const char* const, dict_index_t*>' and 'dict_index_t*')
|
indexes[index->name] = index;
|
^
|
In file included from /home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/memory:24:0,
|
from /home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/char_traits:22,
|
from /home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/iosfwd:21,
|
from /home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/ostream:25,
|
from /home/build/mariadb/build_dir/target-x86_64_musl/mariadb-10.2.8/storage/innobase/include/ut0ut.h:31,
|
from /home/build/mariadb/build_dir/target-x86_64_musl/mariadb-10.2.8/storage/innobase/include/univ.i:637,
|
from /home/build/mariadb/build_dir/target-x86_64_musl/mariadb-10.2.8/storage/innobase/dict/dict0stats.cc:27:
|
/home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/utility:49:51: note: candidate: std::pair<const char* const, dict_index_t*>& std::pair<const char* const, dict_index_t*>::operator=(const std::pair<const char* const, dict_index_t*>&)
|
template <class T1, class T2> struct _UCXXEXPORT pair {
|
^
|
/home/build/mariadb/staging_dir/target-x86_64_musl/usr/include/uClibc++/utility:49:51: note: no known conversion for argument 1 from 'dict_index_t*' to 'const std::pair<const char* const, dict_index_t*>&'
|
|
|