[MDEV-11625] Compilation from source without -DBUILD_CONFIG=mysql_release and with -DRPM=centos6 fails to create libmysqld.a Created: 2016-12-21  Updated: 2016-12-22  Resolved: 2016-12-22

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

Type: Bug Priority: Major
Reporter: Gilad Rozban Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Centos6



 Description   

Could not build with: -DBUILD_CONFIG=mysql_release
This results with JEMALLOC error.

When trying to compile with -DRPM=centos6, libmysqld.a is not created during %build:

RPMs created with these cmake flags are missing libmysqld.a' which is required for mysql clients.

From the spec file:

...
%build
...
# Build debug mysqld and libmysqld.a
mkdir debug
(
  cd debug
  # Attempt to remove any optimisation flags from the debug build
  CFLAGS=`echo " ${CFLAGS} " | \
            sed -e 's/ -O[0-9]* / /' \
                -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
                -e 's/ -unroll2 / /' \
                -e 's/ -ip / /' \
                -e 's/^ //' \
                -e 's/ $//'`
  CXXFLAGS=`echo " ${CXXFLAGS} " | \
              sed -e 's/ -O[0-9]* / /' \
                  -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
                  -e 's/ -unroll2 / /' \
                  -e 's/ -ip / /' \
                  -e 's/^ //' \
                  -e 's/ $//'`
  # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
  # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
  /opt/cmake_2.8.12.2/bin/cmake ../%{src_dir} -DRPM=centos6 \
           -DINSTALL_LAYOUT=RPM \
           -DCMAKE_BUILD_TYPE=Debug \
           -DENABLE_DTRACE=OFF \
           -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
           -DFEATURE_SET="%{feature_set}" \
           -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
           -DMYSQL_SERVER_SUFFIX="%{server_suffix}"
  echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG
  make ${MAKE_JFLAG} VERBOSE=1
)

BUG: libmysqld.a is not created



 Comments   
Comment by Sergei Golubchik [ 2016-12-22 ]

Correct. If you build with -DBUILD_CONFIG=mysql_release, this config requires jemalloc to be installed. You can overwrite it with -DWITH_JEMALLOC=no. If you don't specify a config, embedded server is disabled by default. You can enable it with -DWITH_EMBEDDED_SERBER=ON.

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