Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error after I follow the guide to build from source code in CentOS 8 #128

Open
gaowayne opened this issue Mar 27, 2023 · 0 comments
Open

Comments

@gaowayne
Copy link

this is guide I followed from github here

# 进入 polardbx-engine 代码路径
cd polardbx-engine

# 安装boost1.70 (注:把boost放到仓库里避免下载)
wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz
mkdir extra/boost
cp boost_1_70_0.tar.gz extra/boost/

# 编译安装
# 详细参数请参考 https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html
cmake .                               	\
    -DFORCE_INSOURCE_BUILD=ON           \
    -DCMAKE_BUILD_TYPE="Debug"          \
    -DSYSCONFDIR="/u01/mysql"           \
    -DCMAKE_INSTALL_PREFIX="/u01/mysql" \
    -DMYSQL_DATADIR="/u01/mysql/data"   \
    -DWITH_BOOST="./extra/boost/boost_1_70_0.tar.gz"
make -j8
make install

then I got below error during build

[ 34%] Building CXX object storage/temptable/CMakeFiles/temptable.dir/src/plugin.cc.o
[ 34%] Building CXX object storage/temptable/CMakeFiles/temptable.dir/src/result.cc.o
[ 34%] Building CXX object storage/temptable/CMakeFiles/temptable.dir/src/row.cc.o
[ 34%] Building CXX object storage/temptable/CMakeFiles/temptable.dir/src/table.cc.o
[ 34%] Building CXX object storage/temptable/CMakeFiles/temptable.dir/src/test.cc.o
[ 34%] Linking CXX static library libtemptable.a
[ 34%] Built target temptable
[ 34%] Building CXX object storage/xengine/CMakeFiles/xengine_se.dir/handler/ha_xengine.cc.o
In file included from /root/wayne/polardbx/polardbx-engine/storage/xengine/core/compact/range_iterator.h:33,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/core/storage/multi_version_extent_meta_layer.h:25,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/core/db/snapshot_impl.h:13,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/core/storage/storage_manager.h:23,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/handler/./ha_xengine.h:50,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/handler/ha_xengine.cc:26:
/root/wayne/polardbx/polardbx-engine/storage/xengine/core/table/block.h: In constructor ‘xengine::table::BlockReadAmpBitmap::BlockReadAmpBitmap(size_t, size_t)’:
/root/wayne/polardbx/polardbx-engine/storage/xengine/core/table/block.h:74:53: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct std::atomic<unsigned int>’ with no trivial copy-assignment; use value-initialization instead [-Wclass-memaccess]
     memset(bitmap_, 0, bitmap_size * kBytesPersEntry);
                                                     ^
In file included from /root/wayne/polardbx/polardbx-engine/sql/sql_class.h:63,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/handler/ha_xengine.cc:25:
/usr/include/c++/8/atomic:684:12: note: ‘struct std::atomic<unsigned int>’ declared here
     struct atomic<unsigned int> : __atomic_base<unsigned int>
            ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/unordered_map:46,
                 from /root/wayne/polardbx/polardbx-engine/include/map_helpers.h:30,
                 from /root/wayne/polardbx/polardbx-engine/sql/sql_class.h:70,
                 from /root/wayne/polardbx/polardbx-engine/storage/xengine/handler/ha_xengine.cc:25:
/usr/include/c++/8/bits/hashtable.h: In instantiation of ‘class std::_Hashtable<long int, std::pair<const long int, xengine::storage::AsyncRandomAccessExtent*>, xengine::memory::stl_adapt_allocator<std::pair<long int, xengine::storage::AsyncRandomAccessExtent*>, 14>, std::__detail::_Select1st, std::equal_to<long int>, std::hash<long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >’:
/usr/include/c++/8/bits/unordered_map.h:105:18:   required from ‘class std::unordered_map<long int, xengine::storage::AsyncRandomAccessExtent*, std::hash<long int>, std::equal_to<long int>, xengine::memory::stl_adapt_allocator<std::pair<long int, xengine::storage::AsyncRandomAccessExtent*>, 14> >’
/root/wayne/polardbx/polardbx-engine/storage/xengine/core/compact/compaction.h:585:21:   required from here
/usr/include/c++/8/bits/hashtable.h:192:21: error: static assertion failed: unordered container must have the same value_type as its allocator
       static_assert(is_same<typename _Alloc::value_type, _Value>{},
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [storage/xengine/CMakeFiles/xengine_se.dir/build.make:76: storage/xengine/CMakeFiles/xengine_se.dir/handler/ha_xengine.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4925: storage/xengine/CMakeFiles/xengine_se.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
[root@localhost polardbx-engine]# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant