{"id":1883,"date":"2015-05-28T16:34:29","date_gmt":"2015-05-28T14:34:29","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=1883"},"modified":"2017-10-07T17:26:50","modified_gmt":"2017-10-07T15:26:50","slug":"compiling-mysql-5-6-24","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-mysql-5-6-24\/","title":{"rendered":"Compiling mysql 5.6.24"},"content":{"rendered":"<pre class=\"brush:bash shell\">\r\n#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here.\r\n#Before starting declare the environment variables specified at the link above.\r\n\r\nNEW_BUILD_NAME=mysql\r\n#NEW_BUILD_VER=5.6.24.large\r\nNEW_BUILD_VER=5.6.24.small+innodb\r\nNEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER\r\nls -l \/tmp\/$NEW_BUILD_NAME-*\r\nls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-*\r\nNEW_BUILD_NR=0\r\n\r\ncd $HOME\/compile\r\nrm -r $HOME\/compile\/$NEW_BUILD_NAME_AND_VER\r\ntar -xzvf mysql-5.6.24.tar.gz\r\ncd $HOME\/compile\/$NEW_BUILD_NAME_AND_VER\r\n~\/x.sh ffpg\r\n\r\n#all params with help text\r\n#cmake . -LAH > cmake.help.txt\r\n\r\n#Clear\/reset previously run configure & generate:\r\nmake clean\r\nrm CMakeCache.txt\r\n\r\n#large = embedded + archive + federated + blackhole + innodb\r\n#cmake . -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=\/ffp -DFEATURE_SET=large -DMYSQL_DATADIR=\/ffp\/opt\/srv\/mysql\/data -DSYSCONFDIR=\/ffp\/etc -DTMPDIR=\/ffp\/opt\/srv\/mysql\/tmp -DWITH_DEBUG=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DHAVE_LLVM_LIBCPP=1 -DCMAKE_CXX_FLAGS_RELEASE=\"$BUILD_FLAGS\" -DCMAKE_C_FLAGS_RELEASE=\"$BUILD_FLAGS\" -DHAVE_GCC_ATOMIC_BUILTINS=\"\" -LAH\r\n\r\n#small = embedded\r\n#below we have small + innodb\r\ncmake . -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=\/ffp -DFEATURE_SET=small -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=\/ffp\/opt\/srv\/mysql\/data -DSYSCONFDIR=\/ffp\/etc -DTMPDIR=\/ffp\/opt\/srv\/mysql\/tmp -DWITH_DEBUG=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DHAVE_LLVM_LIBCPP=1 -DCMAKE_CXX_FLAGS_RELEASE=\"$BUILD_FLAGS\" -DCMAKE_C_FLAGS_RELEASE=\"$BUILD_FLAGS\" -DHAVE_GCC_ATOMIC_BUILTINS=\"\" -LAH\r\n\r\n#ERROR (FEATURE_SET=large)\r\n\t\/ffp\/home\/root\/compile\/mysql-5.6.24\/sql\/sql_table.cc:2020:7: error: 'old_part_info' was not declared in this scope\r\n\t   if (old_part_info)\r\n\t\t   ^\r\n\tmake[2]: *** [sql\/CMakeFiles\/sql.dir\/sql_table.cc.o] Error 1\r\n#SOLUTION\r\n\t#Modify \/ffp\/home\/root\/compile\/mysql-5.6.24\/sql\/sql_table.cc to this:\r\n\tend:\r\n\t#ifdef WITH_PARTITION_STORAGE_ENGINE\r\n\t  if (old_part_info)\r\n\t  {\r\n\t\tlpt->table->file->set_part_info(old_part_info, false);\r\n\t  }\r\n\t#endif\r\n\tDBUG_RETURN(error);\r\n\r\nnohup \/ffp\/bin\/make -C . &\r\nrenice -11 `pidof cc1plus` -p `pidof make` -p `pidof as` -p `pidof ld` -p `pidof configure` -p `pidof cc1` -p `pidof ccmake`\r\ntail -f nohup.out\r\n\r\nrm -v \/tmp\/$NEW_BUILD_NAME-*.txz\r\nrm -r $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmake install DESTDIR=$HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\ncd $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmakepkg $NEW_BUILD_NAME $NEW_BUILD_VER $NEW_BUILD_NR\r\ncp -v \/tmp\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz ~\/ffp_0.7_armv5\/packages\/\r\nfunpkg -q $NEW_BUILD_NAME\r\nfunpkg -i ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz\r\n\r\n# see also CREATE SYSTEM DB (first step and mandatory before using mysql)\r\n# search my blog for: CREATE SYSTEM DB\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here. #Before starting declare the environment variables specified at the link above. NEW_BUILD_NAME=mysql #NEW_BUILD_VER=5.6.24.large NEW_BUILD_VER=5.6.24.small+innodb NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l \/tmp\/$NEW_BUILD_NAME-* ls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-* NEW_BUILD_NR=0 cd $HOME\/compile rm -r $HOME\/compile\/$NEW_BUILD_NAME_AND_VER [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-mysql-5-6-24\/#more-1883\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling mysql 5.6.24<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,12,11,163],"tags":[121],"class_list":["post-1883","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-database","category-linux","category-nsa310","tag-mysql"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=1883"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1883\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}