[Maria-discuss] Building 10.2 from source issues
Hi, I am trying to build 10.2 from sources while disabling some plugins (building with all plugins works without issues). e.g. $ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function ‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^ In file included from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:27:0: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: error: ‘my_read’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: note: suggested alternative: ‘my_sha1’ tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ my_sha1 /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: error: ‘MY_FILE_ERROR’ was not declared in this scope if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: note: suggested alternative: ‘DB_IO_ERROR’ if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ DB_IO_ERROR make[2]: *** [extra/mariabackup/CMakeFiles/mariabackup.dir/build.make:111: extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:4270: extra/mariabackup/CMakeFiles/mariabackup.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 98%] Built target mysqld [ 98%] Built target explain_filename-t make: *** [Makefile:163: all] Error 2 $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp Thread model: posix gcc version 7.2.0 (GCC) Please advise. Thanks
Hi, Guillaume! On Oct 31, Guillaume Lefranc wrote:
Hi,
I am trying to build 10.2 from sources while disabling some plugins (building with all plugins works without issues).
e.g.
$ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make
This exact line worked just fine for me. With gcc-7.1.0 (the newest I have).
This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function ‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^ In file included from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:27:0: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: error: ‘my_read’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: note: suggested alternative: ‘my_sha1’ tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ my_sha1 /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: error: ‘MY_FILE_ERROR’ was not declared in this scope if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: note: suggested alternative: ‘DB_IO_ERROR’ if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ DB_IO_ERROR make[2]: *** [extra/mariabackup/CMakeFiles/mariabackup.dir/build.make:111: extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:4270: extra/mariabackup/CMakeFiles/mariabackup.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 98%] Built target mysqld [ 98%] Built target explain_filename-t make: *** [Makefile:163: all] Error 2
$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp Thread model: posix gcc version 7.2.0 (GCC)
Please advise. Thanks
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi Sergei, I have no doubts about that, however, do you have any comments on the error above? It only happens when using those cmake options. The same is encountered when compiling on Mac OS X. I can't tell why it would fail on MY_WME which is literally everywhere. Thanks Le mar. 31 oct. 2017 à 14:55, Sergei Golubchik <serg@mariadb.org> a écrit :
Hi, Guillaume!
On Oct 31, Guillaume Lefranc wrote:
Hi,
I am trying to build 10.2 from sources while disabling some plugins (building with all plugins works without issues).
e.g.
$ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make
This exact line worked just fine for me. With gcc-7.1.0 (the newest I have).
This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function ‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^ In file included from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:27:0: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: error: ‘my_read’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: note: suggested alternative: ‘my_sha1’ tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ my_sha1 /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: error: ‘MY_FILE_ERROR’ was not declared in this scope if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: note: suggested alternative: ‘DB_IO_ERROR’ if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ DB_IO_ERROR make[2]: *** [extra/mariabackup/CMakeFiles/mariabackup.dir/build.make:111: extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:4270: extra/mariabackup/CMakeFiles/mariabackup.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 98%] Built target mysqld [ 98%] Built target explain_filename-t make: *** [Makefile:163: all] Error 2
$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp Thread model: posix gcc version 7.2.0 (GCC)
Please advise. Thanks
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi, Guillaume! On Oct 31, Guillaume Lefranc wrote:
Hi Sergei,
I have no doubts about that, however, do you have any comments on the error above? It only happens when using those cmake options. The same is encountered when compiling on Mac OS X.
I can't tell why it would fail on MY_WME which is literally everywhere.
I have not the slightest idea how it could be possible. I can only tell you how to find it out. This command: make GenError && cd extra/mariabackup && make changed_page_bitmap.i repeat with this cmake config below (that fails to build) and with some other config (that succeeds). Look at the generated file CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.i Grep it for MY_WME, see what's included, diff it from two builds, see why one of them defines MY_WME and the other doesn't. And, when you solve it, please, do tell what it was :)
$ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make
This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function ‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^ In file included from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:27:0: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: error: ‘my_read’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: note: suggested alternative: ‘my_sha1’ tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ my_sha1 /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: error: ‘MY_FILE_ERROR’ was not declared in this scope if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: note: suggested alternative: ‘DB_IO_ERROR’ if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ DB_IO_ERROR make[2]: *** [extra/mariabackup/CMakeFiles/mariabackup.dir/build.make:111: extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:4270: extra/mariabackup/CMakeFiles/mariabackup.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 98%] Built target mysqld [ 98%] Built target explain_filename-t make: *** [Makefile:163: all] Error 2
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi Sergei! There was no difference at all between the two generated files. The plot thickens.... -GL Le mer. 1 nov. 2017 à 00:30, Sergei Golubchik <serg@mariadb.org> a écrit :
Hi, Guillaume!
On Oct 31, Guillaume Lefranc wrote:
Hi Sergei,
I have no doubts about that, however, do you have any comments on the error above? It only happens when using those cmake options. The same is encountered when compiling on Mac OS X.
I can't tell why it would fail on MY_WME which is literally everywhere.
I have not the slightest idea how it could be possible. I can only tell you how to find it out.
This command:
make GenError && cd extra/mariabackup && make changed_page_bitmap.i
repeat with this cmake config below (that fails to build) and with some other config (that succeeds). Look at the generated file
CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.i
Grep it for MY_WME, see what's included, diff it from two builds, see why one of them defines MY_WME and the other doesn't.
And, when you solve it, please, do tell what it was :)
$ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make
This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function ‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^ In file included from
/home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:27:0:
/home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: error: ‘my_read’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:12: note: suggested alternative: ‘my_sha1’ tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^~~~~~~ my_sha1 /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: error: ‘MY_FILE_ERROR’ was not declared in this scope if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ /home/tanj/mariadb-10.2/extra/mariabackup/common.h:163:32: note: suggested alternative: ‘DB_IO_ERROR’ if (tbytes == 0 || tbytes == MY_FILE_ERROR) { ^~~~~~~~~~~~~ DB_IO_ERROR make[2]: *** [extra/mariabackup/CMakeFiles/mariabackup.dir/build.make:111:
extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o]
Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:4270: extra/mariabackup/CMakeFiles/mariabackup.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 98%] Built target mysqld [ 98%] Built target explain_filename-t make: *** [Makefile:163: all] Error 2
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi, Guillaume! On Nov 02, Guillaume Lefranc wrote:
Hi Sergei!
There was no difference at all between the two generated files. The plot thickens....
That's imposible. If preprocessed files are identical, they either compile both or fail both. May be you had the modified source tree for some reason and now you reverted that change (intentionally or not) and compilation should work. Or may be it won't work and you generated these files incorrectly and there is a difference, in fact. I don't know. But if preprocessed files are identical, you cannot possibly have one to compile and other to fail. Regards, Sergei Chief Architect MariaDB and security@mariadb.org
-GL
Le mer. 1 nov. 2017 à 00:30, Sergei Golubchik <serg@mariadb.org> a écrit :
Hi, Guillaume!
On Oct 31, Guillaume Lefranc wrote:
Hi Sergei,
I have no doubts about that, however, do you have any comments on the error above? It only happens when using those cmake options. The same is encountered when compiling on Mac OS X.
I can't tell why it would fail on MY_WME which is literally everywhere.
I have not the slightest idea how it could be possible. I can only tell you how to find it out.
This command:
make GenError && cd extra/mariabackup && make changed_page_bitmap.i
repeat with this cmake config below (that fails to build) and with some other config (that succeeds). Look at the generated file
CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.i
Grep it for MY_WME, see what's included, diff it from two builds, see why one of them defines MY_WME and the other doesn't.
And, when you solve it, please, do tell what it was :)
$ cmake . -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_SPHINX=NO -DPLUGIN_ROCKSDB=NO $ make
This fails with the following errors: [ 98%] Building CXX object extra/mariabackup/CMakeFiles/mariabackup.dir/changed_page_bitmap.cc.o In file included from /home/tanj/mariadb-10.2/storage/innobase/include/univ.i:83:0, from /home/tanj/mariadb-10.2/storage/innobase/include/ut0rbt.h:29, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.h:28, from /home/tanj/mariadb-10.2/extra/mariabackup/changed_page_bitmap.cc:25: /home/tanj/mariadb-10.2/extra/mariabackup/common.h: In function‘size_t xb_read_full(File, uchar*, size_t)’: /home/tanj/mariadb-10.2/extra/mariabackup/common.h:162:45: error: ‘MY_WME’ was not declared in this scope tbytes = my_read(fd, buf, len - tlen, MYF(MY_WME)); ^ /home/tanj/mariadb-10.2/include/my_global.h:1025:24: note: in definition of macro ‘MYF’ #define MYF(v) (myf) (v) ^
participants (2)
-
Guillaume Lefranc
-
Sergei Golubchik