[MDEV-9136] Can't compile MariaDB 10.0.22 Created: 2015-11-16  Updated: 2015-11-21  Resolved: 2015-11-21

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.0.22, 10.0, 10.1
Fix Version/s: 10.0.23, 10.1.9

Type: Bug Priority: Major
Reporter: Robert Milasan Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: regression
Environment:

Distributor ID: Debian
Description: Debian GNU/Linux 7.9 (wheezy)
Release: 7.9
gcc version 4.7.2 (Debian 4.7.2-5)


Attachments: File build_log.tar.bz2    

 Description   

Trying to build MariaDB 10.0.22 on my machine from sources and fails to build:

[ 33%] Building CXX object storage/sequence/CMakeFiles/sequence.dir/sequence.cc.o
In file included from /root/git/buildpkg/build/mariadb-10.0.22/storage/maria/ha_maria.cc:43:0:
/root/git/buildpkg/build/mariadb-10.0.22/sql/sql_class.h:355:22: error: ‘Create_field’ was not declared in this scope
/root/git/buildpkg/build/mariadb-10.0.22/sql/sql_class.h:355:34: error: template argument 1 is invalid
Linking CXX executable myisampack
[ 33%] Built target myisampack
Linking CXX shared module ha_sequence.so
Scanning dependencies of target test_sql_discovery
[ 33%] make[2]: *** [storage/maria/CMakeFiles/aria_embedded.dir/ha_maria.cc.o] Error 1
make[1]: *** [storage/maria/CMakeFiles/aria_embedded.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Building CXX object storage/test_sql_discovery/CMakeFiles/test_sql_discovery.dir/test_sql_discovery.cc.o

Not sure whats the issue, haven't seen this before. Also at some point I see this:

[  0%] Building C object libservices/CMakeFiles/mysqlservices.dir/thd_error_context_servicer.ps
troff: fatal error: can't find macro file m
[ 16%] Built target ps
Scanning dependencies of target t
[ 16%] Generating user.t
troff: fatal error: can't find macro file m
[ 17%] Built target t
.c.o
[ 16%] Generating user.ps
troff: fatal error: can't find macro file m
[ 16%] Built target ps
Scanning dependencies of target t
[ 16%] Generating user.t
troff: fatal error: can't find macro file m

Can this be why it fails to build? Don't think so, but, I really dont know. Please let me know, how could I fix this.



 Comments   
Comment by Elena Stepanova [ 2015-11-18 ]

I don't think these troff errors matter, we always have those and it still builds:
http://buildbot.askmonty.org/buildbot/builders/kvm-deb-wheezy-amd64/builds/4731/steps/compile/logs/stdio

You can compare our build log with yours to see what went differently; I see that we use gcc 4.7.1, but I don't think it should be so important.

Please try a totally clean build, with no remains of previous ones whatsoever. If it still fails, please attach the complete cmake/build log and paste your command line.

Comment by Robert Milasan [ 2015-11-18 ]

Sorry, but I was thinking is obvious, I always do a clean build. Tried even MariaDB 10.1.8 and fails too. Do you need the complete cmake logs?

Comment by Elena Stepanova [ 2015-11-18 ]

Yes, please attach the complete log (and the command line). As you can see from the link above, it works all right on our Wheezy, so there must be something different comparing to yours.

Comment by Robert Milasan [ 2015-11-18 ]

build_log.tar.bz2

The command used to build mariadb:

$ mkdir build
$ cd build
 
$ export CFLAGS="-O2 -fPIC -pipe -fomit-frame-pointer -mtune=native -m64 -fno-strict-aliasing -DBIG_JOINS=1 -fno-delete-null-pointer-checks"
$ export CXXFLAGS="-O2 -fPIC -pipe -fomit-frame-pointer -mtune=native -m64 -fno-strict-aliasing -DBIG_JOINS=1 -fno-delete-null-pointer-checks -felide-constructors -fno-rtti"
$ export location="/opt/mysql"
$ export dbdir="/srv/databases/mysql"
$ export tmpsrv="/var/lib/mysql"
 
$ cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=$location \
  -DINSTALL_SYSCONFDIR=$location/conf \
  -DDEFAULT_CHARSET=utf8 \
  -DDEFAULT_COLLATION=utf8_general_ci \
  -DWITH_EXTRA_CHARSETS=complex \
  -DWITH_EMBEDDED_SERVER=1 \
  -DWITH_INNOBASE_STORAGE_ENGINE=1 \
  -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
  -DWITH_TOKUDB_STORAGE_ENGINE=1 \
  -DWITH_PARTITION_STORAGE_ENGINE=1 \
  -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
  -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
  -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \
  -DWITH_UNIT_TESTS=OFF \
  -DENABLED_PROFILING=OFF \
  -DENABLE_DEBUG_SYNC=OFF \
  -DWITH_ZLIB=system \
  -DWITH_SSL=system \
  -DWITH_JEMALLOC=system \
  -DWITH_READLINE=0 \
  -DWITH_LIBWRAP=OFF \
  -DINSTALL_SBINDIR=libexec \
  -DINSTALL_PLUGINDIR=lib/mysql/plugin \
  -DMYSQL_DATADIR=${dbdir} \
  -DMYSQL_UNIX_ADDR=${tmpsrv}/mysql.sock .."
 
$ make -j4

So, the logs are attach and you can see the build cmd used by me.

NOTE: This works without problems when building 10.0.21.

Comment by Elena Stepanova [ 2015-11-20 ]

Thanks for the data.

The culprit is -DENABLED_PROFILING=OFF.

The problem was introduced in 10.0.22 by the following revision:

commit fb8713385f514da0b77d1212f2035a6d5678561e
Author: Sergei Golubchik <serg@mariadb.org>
Date:   Fri Oct 23 11:31:18 2015 +0200
 
    remove unneded #include's that had a dubious explanation

Comment by Sergei Golubchik [ 2015-11-21 ]

Fixed: https://github.com/MariaDB/server/commit/bf186312e19bfe1e1cc5f83fc8280c84b7a17b21

Generated at Thu Feb 08 07:32:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.