赞
踩
执行如下命令下载解压MySQL8的源码文件压缩包到本地文件:
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-boost-8.0.13.tar.gz
tar -zxvf mysql-boost-8.0.13.tar.gz
[ -d ~/programs ] && mkdir programs
mv mysql-8.0.13 ~/programs/
cd ~/programs/mysql-8.0.13/
sudo apt-get install cmake bison libaio-dev openssl libssl-dev ncurses-dev -y
mkdir debug
cd debug
然后执行cmake命令:
cmake .. -DBUILD_CONFIG=mysql_release \
-DINSTALL_LAYOUT=STANDALONE \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_DTRACE=DFF \
-DWITH_EMBEDDED_SERVER=OFF \
-DWITH_INNODB_MEMCACHED=ON \
-DWITH_SSL=bundled \
-DWITH_ZLIB=system \
-DWITH_PAM=ON \
-DCMAKE_INSTALL_PREFIX=/var/mysql/ \
-DINSTALL_PLUGINDIR="/var/mysql/lib/plugin" \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EDITLINE=bundled \
-DFEATURE_SET=community \
-DCOMPILATION_COMMENT="MySQL Server (GPL)" \
-DWITH_DEBUG=OFF \
-DWITH_BOOST=../boost
运行成功的话,最后会显示:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zifeiy/programs/mysql-8.0.13/debug
然后在debug目录运行:
make -j 24
进行编译。
编译好了之后,使用如下命令进行安装:
make install
上面是理论上没有问题的,但是我在进行到make -j 24这一步的时候就出现了问题了。
首先,虽然我的笔记本还不错,但是我同时开24个线程去跑在49%的时候,电脑卡死了~~
然后我就直接运行了make但是报错了:
[ 71%] Built target slave
[ 71%] Linking CXX executable ../../../runtime_output_directory/pfs_connect_attr-t
../../../storage/innobase/handler/ha_innodb.cc:18101: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:18099: 错误: 对‘btr_search_enable()’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:3376: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:3338: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4521: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4522: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:4551: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innodb.cc:6227: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../archive_output_directory/libinnobase.a(ha_innodb.cc.o):ha_innodb.cc:mysql_sysvar_adaptive_hash_index_parts: 错误: 对‘btr_ahi_parts’未定义的引用
../../../archive_output_directory/libinnobase.a(ha_innodb.cc.o):ha_innodb.cc:mysql_sysvar_adaptive_hash_index: 错误: 对‘btr_search_enabled’未定义的引用
../../../storage/innobase/handler/ha_innopart.cc:197: 错误: 对‘btr_drop_ahi_for_table(dict_table_t*)’未定义的引用
../../../storage/innobase/handler/handler0alter.cc:6801: 错误: 对‘btr_drop_ahi_for_index(dict_index_t*)’未定义的引用
../../../storage/innobase/ibuf/ibuf0ibuf.cc:533: 错误: 对‘btr_search_info_create(mem_block_info_t*)’未定义的引用
../../../storage/innobase/page/page0page.cc:650: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/page/page0page.cc:793: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/page/page0zip.cc:2587: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/row/row0sel.cc:1585: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/row/row0sel.cc:1585: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/row/row0sel.cc:1549: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/row/row0sel.cc:1549: 错误: 对‘btr_ahi_parts’未定义的引用
../../../storage/innobase/include/btr0sea.ic:188: 错误: 对‘btr_search_latches’未定义的引用
../../../storage/innobase/srv/srv0srv.cc:1316: 错误: 对‘btr_search_sys’未定义的引用
../../../storage/innobase/srv/srv0start.cc:3091: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/srv/srv0start.cc:3105: 错误: 对‘btr_search_sys_free()’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:778: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:1458: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:1216: 错误: 对‘btr_search_drop_page_hash_index(buf_block_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:2954: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/btr/btr0btr.cc:2572: 错误: 对‘btr_search_move_or_delete_hash_entries(buf_block_t*, buf_block_t*, dict_index_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3077: 错误: 对‘btr_search_update_hash_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3458: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:3713: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:4024: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:4617: 错误: 对‘btr_search_update_hash_on_delete(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:2903: 错误: 对‘btr_search_update_hash_node_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:2905: 错误: 对‘btr_search_update_hash_on_insert(btr_cur_t*)’未定义的引用
../../../storage/innobase/btr/btr0cur.cc:787: 错误: 对‘btr_search_guess_on_hash(dict_index_t*, btr_search_t*, dtuple_t const*, unsigned long, unsigned long, btr_cur_t*, unsigned long, mtr_t*)’未定义的引用
../../../storage/innobase/include/btr0sea.ic:85: 错误: 对‘btr_search_info_update_slow(btr_search_t*, btr_cur_t*)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1331: 错误: 对‘btr_search_sys_create(unsigned long)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1854: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:2239: 错误: 对‘btr_search_enable()’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:1854: 错误: 对‘btr_search_disable(bool)’未定义的引用
../../../storage/innobase/buf/buf0buf.cc:2217: 错误: 对‘btr_search_sys_resize(unsigned long)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:236: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:236: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/buf/buf0lru.cc:783: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:2558: 错误: 对‘btr_search_info_get_ref_count(btr_search_t const*, dict_index_t const*)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:1301: 错误: 对‘btr_search_info_get_ref_count(btr_search_t const*, dict_index_t const*)’未定义的引用
../../../storage/innobase/dict/dict0dict.cc:2432: 错误: 对‘btr_search_info_create(mem_block_info_t*)’未定义的引用
../../../storage/innobase/fsp/fsp0fsp.cc:3432: 错误: 对‘btr_search_drop_page_hash_when_freed(page_id_t const&, page_size_t const&)’未定义的引用
collect2: error: ld returned 1 exit status
storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/build.make:215: recipe for target 'runtime_output_directory/pfs_connect_attr-t' failed
make[2]: *** [runtime_output_directory/pfs_connect_attr-t] Error 1
CMakeFiles/Makefile2:3396: recipe for target 'storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all' failed
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
暂时没有解决,先搁置一下,以后有机会再解决。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。