Bug #69401 Build error: Can't create output directory for sql/share/bulgarian
Submitted: 5 Jun 2013 7:20 Modified: 5 Jun 2013 13:56
Reporter: Andrey Ponomarenko Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.12 OS:Linux
Assigned to:

[5 Jun 2013 7:20] Andrey Ponomarenko
Description:
Build error:

[ 91%] Generating ../include/mysqld_error.h, ../sql/share/english/errmsg.sys                                                                                                                  
Can't create output directory for /home/ut/repository/mysql/mysql-5.6.12/build/sql/share/bulgarian                                                                                            
Failed to create sys files
make[2]: *** [include/mysqld_error.h] Error 1
make[1]: *** [extra/CMakeFiles/GenError.dir/all] Error 2
make: *** [all] Error 2

How to repeat:
Download and extract sources of MySQL 5.6.12 and then

$> mkdir build
$> cd build
$> cmake ../  -DWITH_UNIT_TESTS=OFF -DWITHOUT_SERVER=ON -DCMAKE_CXX_FLAGS="-w -fpermissive" -DCMAKE_C_FLAGS="-w -fpermissive" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/home/user/mysql/5.6.12
$> make

Suggested fix:
create sql/share/bulgarian directory before building
[5 Jun 2013 11:46] Umesh Shastry
Hello Andrey,

Thank you for the report.
I'm able to hit the reported error but curious to know any specific reason you are including ../ with cmake? Workaround is to remove ../ and cmake from the basedir where you extracted source.

=========

Downlaod  mysql-5.6.12.tar.gz from http://dev.mysql.com/downloads/mysql/

[ushastry@cluster-repo mysql-5.6.12]$ uname -an
Linux cluster-repo 2.6.32-100.28.5.el6.x86_64 #1 SMP Wed Feb 2 18:40:23 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

// Extract to /data/ushastry/setups/mysql-5.6.12

cd /data/ushastry/setups/
tar -zxvf mysql-5.6.12.tar.gz
cd /data/ushastry/setups/mysql-5.6.12

mkdir build
cd build

 cmake ../ -DWITH_UNIT_TESTS=OFF -DWITHOUT_SERVER=ON -DCMAKE_CXX_FLAGS="-w -fpermissive" -DCMAKE_C_FLAGS="-w -fpermissive" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/data/ushastry/setups/mysql-5.6.12
 make
 
 [ 88%] Generating ../include/mysqld_error.h, ../sql/share/english/errmsg.sys
 Can't create output directory for /data/ushastry/setups/mysql-5.6.12/build/sql/share/bulgarian
 Failed to create sys files
 make[2]: *** [include/mysqld_error.h] Error 1
 make[1]: *** [extra/CMakeFiles/GenError.dir/all] Error 2
 make: *** [all] Error 2

// Workaround - remove ../ from cmake, then cmake from /data/ushastry/setups/mysql-5.6.12 instead of /data/ushastry/setups/mysql-5.6.12/build

[ushastry@cluster-repo mysql-5.6.12]$ pwd
/data/ushastry/setups/mysql-5.6.12

cmake -DWITH_UNIT_TESTS=OFF -DWITHOUT_SERVER=ON -DCMAKE_CXX_FLAGS="-w -fpermissive" -DCMAKE_C_FLAGS="-w -fpermissive" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/data/ushastry/setups/mysql-5.6.12

make

..
..

Linking CXX static library libclientlib.a
[ 93%] Built target clientlib
Scanning dependencies of target libmysql
[ 93%] Building CXX object libmysql/CMakeFiles/libmysql.dir/libmysql_exports_file.cc.o
Linking CXX shared library libmysqlclient.so
[ 93%] Built target libmysql
[ 94%] Generating mysqlclient_depends.c
Scanning dependencies of target mysqlclient
[ 94%] Building C object libmysql/CMakeFiles/mysqlclient.dir/mysqlclient_depends.c.o
Linking C static library libmysqlclient.a
/usr/bin/ar: creating /root/setup/mysql-5.6.12/libmysql/libmysqlclient.a
[ 94%] Built target mysqlclient
Scanning dependencies of target symlink_libmysqlclient_r.a
[ 94%] Generating libmysqlclient_r.a
[ 94%] Built target symlink_libmysqlclient_r.a
Scanning dependencies of target symlink_libmysqlclient_r.so
[ 94%] Generating libmysqlclient_r.so
[ 94%] Built target symlink_libmysqlclient_r.so
Scanning dependencies of target symlink_libmysqlclient_r.so.18
[ 94%] Generating libmysqlclient_r.so.18
[ 95%] Built target symlink_libmysqlclient_r.so.18
Scanning dependencies of target symlink_libmysqlclient_r.so.18.0.0
[ 95%] Generating libmysqlclient_r.so.18.0.0
[ 95%] Built target symlink_libmysqlclient_r.so.18.0.0
Scanning dependencies of target innochecksum
[ 95%] Building CXX object extra/CMakeFiles/innochecksum.dir/innochecksum.cc.o
[ 96%] Building CXX object extra/CMakeFiles/innochecksum.dir/__/storage/innobase/buf/buf0checksum.cc.o
[ 96%] Building CXX object extra/CMakeFiles/innochecksum.dir/__/storage/innobase/ut/ut0crc32.cc.o
[ 96%] Building CXX object extra/CMakeFiles/innochecksum.dir/__/storage/innobase/ut/ut0ut.cc.o
Linking CXX executable innochecksum
[ 96%] Built target innochecksum
Scanning dependencies of target my_print_defaults
[ 97%] Building C object extra/CMakeFiles/my_print_defaults.dir/my_print_defaults.c.o
Linking CXX executable my_print_defaults
[ 97%] Built target my_print_defaults
Scanning dependencies of target mysql_waitpid
[ 97%] Building C object extra/CMakeFiles/mysql_waitpid.dir/mysql_waitpid.c.o
Linking CXX executable mysql_waitpid
[ 97%] Built target mysql_waitpid
Scanning dependencies of target perror
[ 97%] Building C object extra/CMakeFiles/perror.dir/perror.c.o
Linking CXX executable perror
[ 97%] Built target perror
Scanning dependencies of target replace
[ 98%] Building C object extra/CMakeFiles/replace.dir/replace.c.o
Linking C executable replace
[ 98%] Built target replace
Scanning dependencies of target resolve_stack_dump
[ 98%] Building C object extra/CMakeFiles/resolve_stack_dump.dir/resolve_stack_dump.c.o
Linking CXX executable resolve_stack_dump
[ 98%] Built target resolve_stack_dump
Scanning dependencies of target resolveip
[100%] Building C object extra/CMakeFiles/resolveip.dir/resolveip.c.o
Linking CXX executable resolveip
[100%] Built target resolveip
[root@cluster1 mysql-5.6.12]# uname -an
Linux cluster1 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@cluster1 mysql-5.6.12]# make install
[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  0%] Built target abi_check
[  4%] Built target zlib
[  8%] Built target yassl
[ 16%] Built target taocrypt
[ 30%] Built target edit
[ 46%] Built target strings
[ 80%] Built target mysys
[ 80%] Built target dbug
[ 82%] Built target vio
[ 84%] Built target regex
[ 85%] Built target queues
[ 85%] Built target thr_lock
[ 88%] Built target mysys_ssl
[ 88%] Built target comp_err
[ 89%] Built target GenError
[ 93%] Built target clientlib
[ 93%] Built target libmysql
[ 94%] Built target mysqlclient
[ 94%] Built target symlink_libmysqlclient_r.a
[ 94%] Built target symlink_libmysqlclient_r.so
[ 95%] Built target symlink_libmysqlclient_r.so.18
[ 95%] Built target symlink_libmysqlclient_r.so.18.0.0
[ 96%] Built target innochecksum
[ 97%] Built target my_print_defaults
[ 97%] Built target mysql_waitpid
[ 97%] Built target perror
[ 98%] Built target replace
[ 98%] Built target resolve_stack_dump
[100%] Built target resolveip
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /root/setup/mysql-5.6.12/docs/mysql.info
-- Installing: /root/setup/mysql-5.6.12/docs/INFO_SRC
-- Installing: /root/setup/mysql-5.6.12/docs/INFO_BIN
-- Installing: /root/setup/mysql-5.6.12/./INSTALL-BINARY
-- Installing: /root/setup/mysql-5.6.12/docs
-- Up-to-date: /root/setup/mysql-5.6.12/docs/INFO_SRC
-- Up-to-date: /root/setup/mysql-5.6.12/docs/INFO_BIN
-- Installing: /root/setup/mysql-5.6.12/docs/ChangeLog
-- Installing: /root/setup/mysql-5.6.12/include/plugin.h
-- Installing: /root/setup/mysql-5.6.12/include/plugin_audit.h
-- Installing: /root/setup/mysql-5.6.12/include/plugin_ftparser.h
-- Installing: /root/setup/mysql-5.6.12/include/plugin_validate_password.h
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient.a
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient_r.a
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient.so.18.0.0
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient.so.18
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient.so
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient_r.so
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient_r.so.18
-- Installing: /root/setup/mysql-5.6.12/lib/libmysqlclient_r.so.18.0.0
-- Installing: /root/setup/mysql-5.6.12/bin/my_print_defaults
-- Installing: /root/setup/mysql-5.6.12/bin/perror
-- Installing: /root/setup/mysql-5.6.12/bin/resolveip
-- Installing: /root/setup/mysql-5.6.12/bin/replace
-- Installing: /root/setup/mysql-5.6.12/bin/innochecksum
-- Installing: /root/setup/mysql-5.6.12/bin/resolve_stack_dump
-- Installing: /root/setup/mysql-5.6.12/bin/mysql_waitpid
-- Installing: /root/setup/mysql-5.6.12/support-files/solaris/postinstall-solaris

[root@cluster1 mysql-5.6.12]# uname -an
Linux cluster1 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[5 Jun 2013 12:11] Andrey Ponomarenko
Hi,

Thank you.

I'm building source code from the new subdirectory (build/) in order to save the source tree unchanged. This is recommended (or even required) way in many software libraries.

Example: http://qt-project.org/quarterly/view/using_cmake_to_build_qt_projects
[5 Jun 2013 13:56] Jon Olav Hauglid
Closing this as duplicate of Bug#66000