[MDEV-7407] Mariadb 10.0.15 won't pass cmake, but 10.1.2 does. Created: 2015-01-03  Updated: 2015-01-06  Due: 2015-02-04  Resolved: 2015-01-06

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.0.15
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Pól Ua Laoínecháin Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Fedora 20, cmake 2.8.12.2, gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)



 Description   

CMake Error at cmake/jemalloc.cmake:34 (MESSAGE):
jemalloc_pic is not found
Call Stack (most recent call first):

CMakeLists.txt:380 (CHECK_JEMALLOC)
– Configuring incomplete, errors occurred!
See also "/mysql/mdb10.0.15/build/CMakeFiles/CMakeOutput.log".
See also "/mysql/mdb10.0.15/build/CMakeFiles/CMakeError.log".
[pol@localhost build]$ cd ..

This does not occur with 10.1.2.



 Comments   
Comment by Elena Stepanova [ 2015-01-04 ]

We bulid MariaDB server on Fedora 20, it works all right, see the log (it's the revision which became 10.0.15): http://buildbot.askmonty.org/buildbot/builders/kvm-rpm-fedora20-amd64/builds/628/steps/compile/logs/stdio

We use cmake 2.8.12.1 and gcc 4.8.2, but it's hardly the reason of the difference.

Do you actually have jemalloc installed on the machine?
If you do, how exactly do you build the server? Are you using a source package or bzr tree? In the latter case, are you building from scratch (remove CMakeCache.txt etc.), or incrementally?

Comment by Sergei Golubchik [ 2015-01-06 ]

Since MariaDB-10.0.15 (as far as I remember. Might be 10.0.14) we no longer bundle jemalloc into MariaDB source tree — it is always build with system jemalloc.

But in 10.0 we wanted to avoid introducing new dependency in the RPM packages. That's why if you are trying to build 10.0 with -DBUILD_CONFIG=mysql_release it will look for static library libjemalloc_pic.a. In 10.1 I've changed that and 10.1 will use dynamic library libjemalloc.so by default.

Your options are:

  • either install jemalloc-devel-static package (that provides libjemalloc_pic.a).
  • or build with cmake -DBUILD_CONFIG=mysql_release -DWITH_JEMALLOC=yes
Comment by Pól Ua Laoínecháin [ 2015-01-06 ]

Thanks Elena and Sergei (спасибо),

I found that what worked for me was to download jemalloc3.6.0 and install
it manually.

Then I ran cmake -DBUILD_CONFIG=mysql_release and everthing worked
like a charm. If I leave out "-DBUILD_CONFIG=mysql_release", it fails.

Maybe a problem with the repository from which I downloaded
jemalloc? I didn't do anything other than the vanilla
"yum install jemalloc".

Maybe one to watch out for? Just as a matter of interest, why do we have
to add the "-DBUILD_CONFIG=mysql_release" when it isn't required
for a standard MySQL server build?

Thanks again and regards,

Pól Ua Laoínecháin

Comment by Sergei Golubchik [ 2015-01-06 ]

"-DBUILD_CONFIG=mysql_release" is not required. It's just a preset that configures the build by setting various cmake variables and options. We use it when compiling release binaries, so if you want your binary be configured exactly the same as our release binaries, the easiest way to achieve it is to use "-DBUILD_CONFIG=mysql_release". It's exactly the same in MySQL. You can use "-DBUILD_CONFIG=mysql_release" with MySQL or MariaDB and you can use simple "cmake ." with MySQL or MariaDB.

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