Closed drewblin closed 5 years ago
do you have boost development libraries installed?
i have all available boost packets installed:
# pkg info | grep boost
boost-all-1.69.0 The "meta-port" for boost libraries
boost-docs-1.69.0 Documentation for libraries from boost.org
boost-jam-1.69.0 Build tool from the boost.org
boost-libs-1.69.0_2 Free portable C++ libraries (without Boost.Python)
boost_build-2.0.m12_10 Extensible cross-platform build tool suite
# pkg search boost
boost-all-1.69.0 The "meta-port" for boost libraries
boost-docs-1.69.0 Documentation for libraries from boost.org
boost-jam-1.69.0 Build tool from the boost.org
boost-libs-1.69.0_2 Free portable C++ libraries (without Boost.Python)
boost_build-2.0.m12_10 Extensible cross-platform build tool suite
ibus-typing-booster-2.6.0 Faster typing by context sensitive completion
py27-boost-libs-1.69.0 Framework for interfacing Python and C++
py36-boost-libs-1.69.0 Framework for interfacing Python and C++
Hi!
As a fastwork: try to set -DUSE_GALERA=0
on configuring, it will be capable and build as usual. Replication of PQ indexes, however, will not be available (and for now it seems to work only on debian/redhat due to this galera library; windows, mac are definitely out of scope, and if the issue on freebsd exist, it too).
And further - if you can resolve the issue any way, replication will be available there. If not - sorry.
Thanks
Using -DUSE_GALERA=0
helped.
But can you explain in some words what is the promlem? I'm not c++ programmer, but i want try to solve the problem. Only some words so i can start analyze and search information
We now have third-party 'galera' library. This is located at https://github.com/manticoresoftware/galera and mandatory for replication functional. It highly depends from boost and libssl, but seems that was focused on concrete versions available on linux platform, and so, is not cross-available.
A note here: 3.0.2 doesn't compile right now on FreeBSD. If anyone else is using FreeBSD stick to 3.0.0 until it's gets fixed.
I've investigate this problem and got some datails. I hope you'll advise something. Here is log of cmake:
Performing C++ SOURCE FILE Test HAVE_STD_SHARED_PTR__res_ failed with the following output:
Change Dir: /home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_bc6ea/fast"
/usr/local/bin/gmake -f CMakeFiles/cmTC_bc6ea.dir/build.make CMakeFiles/cmTC_bc6ea.dir/build
gmake[1]: вход в каталог «/usr/home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp»
Building CXX object CMakeFiles/cmTC_bc6ea.dir/src.cxx.o
/usr/bin/c++ -DHAVE_STD_SHARED_PTR__res_ -std=gnu++11 -o CMakeFiles/cmTC_bc6ea.dir/src.cxx.o -c /home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp/src.cxx
/home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: 'boost/function.hpp' file not found
#include <boost/function.hpp>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_bc6ea.dir/build.make:66: CMakeFiles/cmTC_bc6ea.dir/src.cxx.o] Ошибка 1
gmake[1]: выход из каталога «/usr/home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp»
gmake: *** [Makefile:121: cmTC_bc6ea/fast] Ошибка 2
Source file was:
#include <boost/function.hpp>
#include <memory>
int main() { std::shared_ptr<int> x; auto y = boost::get_pointer(x); return 0; }
So i check is boost/function.hpp
really exists:
root@test:/home/drewblin/manticore/bundle/build # ll /usr/local/include/boost/function.hpp
-rw-r--r-- 1 root wheel 2524 16 мая 05:19 /usr/local/include/boost/function.hpp
Then i created src.cxx
with content as in log and run
/usr/bin/c++ -DHAVE_STD_SHARED_PTR__res_ -std=gnu++11 -o CMakeFiles/cmTC_bc6ea.dir/src.cxx.o -c /home/drewblin/manticore/bundle/build/CMakeFiles/CMakeTmp/src.cxx -I/usr/local/include
I added -I/usr/local/include
argument.
And build was success.
Then i tried to add line in galera CMakeLists.txt
include_directories ( "/usr/local/include" )
but this doesn't help.
I think this is some relatively simple way to fix this, but google can't help me.
could you install scons at your box then build Galera with its native script
cd build/galera-src
./scripts/build.sh
I just want to make sure what is broken at FreeBSD our CMake script or Galera build in general.
What i did:
# git clone https://github.com/manticoresoftware/galera.git
# cd galera/
# ./scripts/build.sh
And the result was:
root@test:/home/drewblin/manticore/bundle/galera # ./scripts/build.sh
/usr/home/drewblin/manticore/bundle/galera /home/drewblin/manticore/bundle/galera
/home/drewblin/manticore/bundle/galera
scons: Reading SConscript files ...
Host: freebsd amd64 64bit
Signature: version: 3.33, revision: 4152
OSError: [Errno 2] No such file or directory:
File "/usr/home/drewblin/manticore/bundle/galera/SConstruct", line 186:
cc_version = str(read_first_line(env['CC'].split() + ['--version']))
File "/usr/home/drewblin/manticore/bundle/galera/SConstruct", line 43:
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/local/lib/python2.7/subprocess.py", line 394:
errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1047:
raise child_exception
So i tried:
# scons
And the result was:
scons: Reading SConscript files ...
Host: freebsd amd64 64bit
Signature: version: 3.33, revision: XXXX
Using C compiler executable: gcc
C compiler version is: gcc (FreeBSD Ports Collection) 7.3.0
Using C++ compiler executable: g++
C++ compiler version is: g++ (FreeBSD Ports Collection) 7.3.0
Checking for C library pthread... yes
Checking for C library rt... yes
Checking for C library execinfo... yes
Checking for C header file sys/epoll.h... no
Checking for C header file byteswap.h... no
Checking for C header file endian.h... no
Checking for C header file sys/endian.h... yes
Checking for C header file execinfo.h... yes
Checking if compiling in C++11 mode ... no
Checking for std::tr1::array ... yes
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking for std::tr1::unordered_map ... yes
Checking for C++ library boost_program_options... yes
Checking for C++ header file asio.hpp... no
Falling back to bundled asio
Checking for C++ header file asio.hpp... yes
Checking for C++ header file asio/ssl.hpp... yes
Checking for C library ssl... yes
Checking for C library crypto... yes
Checking for SSL_CTX_set_ecdh_auto() ... yes
Checking whether to enable -Weffc++ ... yes
Global flags:
CFLAGS: -std=c99 -fno-strict-aliasing -pipe
CXXFLAGS: -Wold-style-cast -Weffc++ -pipe -Wno-long-long -Wno-deprecated -ansi
CCFLAGS: -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter
CPPFLAGS: -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO
Checking for C header file check.h... yes
Checking for C library check... yes
Checking for C library m... yes
Checking for C library subunit... no
Checking for C library rt... yes
gcs flags:
CFLAGS: -std=c99 -fno-strict-aliasing -pipe
CXXFLAGS: -pipe -Wno-long-long -Wno-deprecated -ansi
CCFLAGS: -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-variadic-macros
CPPFLAGS: -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO -DGCS_USE_GCOMM -DGALERA_LOG_H_ENABLE_CXX
scons: done reading SConscript files.
scons: Building targets ...
g++ -o galera/src/certification.o -c -Wold-style-cast -Weffc++ -pipe -Wno-long-long -Wno-deprecated -ansi -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO -Iasio -I/usr/local/include -Iwsrep/src -I. -Icommon -Igalerautils/src -Igcache/src -Igcs/src galera/src/certification.cpp
In file included from galera/src/write_set.hpp:9:0,
from galera/src/trx_handle.hpp:9,
from galera/src/certification.hpp:8,
from galera/src/certification.cpp:5:
galera/src/key_os.hpp:8:10: fatal error: wsrep_api.h: No such file or directory
#include "wsrep_api.h"
^~~~~~~~~~~~~
compilation terminated.
scons: *** [galera/src/certification.o] Error 1
scons: building terminated because of errors.
As i see shared_ptr was found. But tomorrow i will resolve issue with wsrep_api.h and tell final result.
I've copied files from manticore to galera
cp ../../manticore-3.0.0-190509-95141ec-release/src/replication/* ./wsrep/src/
and run scons
again.
It made more, but stops again on other error:
g++ -o galera/src/wsdb.o -c -Wold-style-cast -Weffc++ -pipe -Wno-long-long -Wno-deprecated -ansi -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO -Iasio -I/usr/local/include -Iwsrep/src -I. -Icommon -Igalerautils/src -Igcache/src -Igcs/src galera/src/wsdb.cpp
In file included from galera/src/wsdb.cpp:5:0:
galera/src/wsdb.hpp: In member function 'size_t galera::Wsdb::ConnTrxHash::operator()(pthread* const&) const':
galera/src/wsdb.hpp:70:68: error: invalid conversion from 'pthread_t {aka pthread*}' to 'size_t {aka long unsigned int}' [-fpermissive]
size_t operator()(const pthread_t& key) const { return key; }
^~~
scons: *** [galera/src/wsdb.o] Error 1
scons: building terminated because of errors.
could you try to take original Galera repo located at https://github.com/percona/galera to build with only scons script.
as our fork could have fixes related to our code and might not build without CMake steps that we skipped building with scons
Sad, but the same error:
g++ -o galera/src/wsdb.o -c -Wold-style-cast -Weffc++ -pipe -Wno-long-long -Wno-deprecated -ansi -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO -Iasio -I/usr/local/include -Iwsrep/src -I. -Icommon -Igalerautils/src -Igcache/src -Igcs/src galera/src/wsdb.cpp
In file included from galera/src/wsdb.cpp:5:0:
galera/src/wsdb.hpp: In member function 'size_t galera::Wsdb::ConnTrxHash::operator()(pthread* const&) const':
galera/src/wsdb.hpp:70:68: error: invalid conversion from 'pthread_t {aka pthread*}' to 'size_t {aka long unsigned int}' [-fpermissive]
size_t operator()(const pthread_t& key) const { return key; }
^~~
scons: *** [galera/src/wsdb.o] Error 1
scons: building terminated because of errors.
could you edit that code and repalce
- size_t operator()(const pthread_t& key) const { return key; }
+ size_t operator()(const pthread_t& key) const { return (size_t)key; }
or
- size_t operator()(const pthread_t& key) const { return key; }
+ size_t operator()(const pthread_t& key) const { return sizeof(key); }
Both resolve issue, but first with warning. So i leave second variant.
galera/src/wsdb.hpp:70:76: warning: use of old-style cast [-Wold-style-cast]
size_t operator()(const pthread_t& key) const { return (size_t)key; }
But original build failed with error:
g++ -o gcs/src/gcs_group.o -c -pipe -Wno-long-long -Wno-deprecated -ansi -g -O3 -fno-omit-frame-pointer -DNDEBUG -m64 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-variadic-macros -DHAVE_COMMON_H -DHAVE_SYS_ENDIAN_H -DHAVE_EXECINFO_H -DHAVE_TR1_ARRAY -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DOPENSSL_HAS_SET_ECDH_AUTO -DGCS_USE_GCOMM -DGALERA_LOG_H_ENABLE_CXX -Iasio -I/usr/local/include -Iwsrep/src -Icommon -Igalerautils/src -Igcomm/src -Igcache/src gcs/src/gcs_group.cpp
gcs/src/gcs_group.cpp: In function 'bool ip_address_present(const char*)':
gcs/src/gcs_group.cpp:1272:32: error: aggregate 'ip_address_present(const char*)::sockaddr_in sa1' has incomplete type and cannot be defined
struct sockaddr_in sa1;
^~~
gcs/src/gcs_group.cpp:1273:33: error: aggregate 'ip_address_present(const char*)::sockaddr_in6 sa2' has incomplete type and cannot be defined
struct sockaddr_in6 sa2;
^~~
gcs/src/gcs_group.cpp:1276:32: error: 'AF_INET' was not declared in this scope
valid = (inet_pton(AF_INET, ip.c_str(), &(sa1.sin_addr)) != 0)
^~~~~~~
gcs/src/gcs_group.cpp:1277:35: error: 'AF_INET6' was not declared in this scope
|| (inet_pton(AF_INET6, ip.c_str(), &(sa2.sin6_addr)) != 0);
^~~~~~~~
scons: *** [gcs/src/gcs_group.o] Error 1
scons: building terminated because of errors.
And yourth failed with:
g++ -o galera/tests/galera_check -m64 galera/tests/galera_check.o galera/tests/data_set_check.o galera/tests/key_set_check.o galera/tests/write_set_ng_check.o galera/tests/write_set_check.o galera/tests/trx_handle_check.o galera/tests/service_thd_check.o galera/tests/ist_check.o galera/tests/saved_state_check.o -L/usr/local/lib gcache/src/libgcache.a galera/src/libgalera++.a gcs/src/libgcs.a gcomm/src/libgcomm.a galerautils/src/libgalerautils++.a galerautils/src/libgalerautils.a -lpthread -lrt -lexecinfo -lssl -lcrypto -lcheck -lm -lrt
builder_unit_test(["galera/tests/galera_check.passed"], ["galera/tests/galera_check"])
Running suite(s): DataSet
100%: Checks: 2, Failures: 0, Errors: 0
Running suite(s): KeySet
100%: Checks: 3, Failures: 0, Errors: 0
Running suite(s): WriteSet
terminate called after throwing an instance of 'gu::Exception'
what(): RecordSet checksum does not match:
computed: 82c333f3 a7631443 0465b6b1 398c3040
found: 3b12906c 3e2af41a 42abcb2b 49345ccb: 22 (Invalid argument)
at galerautils/src/gu_rset.cpp:checksum():551
terminate called after throwing an instance of 'gu::Exception'
what(): RecordSet checksum does not match:
computed: 1ee24d72 3baaf2af 88be4814 ccb5a588
found: 51cf3265 62753832 45dea176 fa658e7b: 22 (Invalid argument)
at galerautils/src/gu_rset.cpp:checksum():551
terminate called after throwing an instance of 'gu::Exception'
what(): RecordSet checksum does not match:
computed: 1ee24d72 3baaf2af 88be4814 ccb5a588
found: 51cf3265 62753832 45dea176 fa658e7b: 22 (Invalid argument)
at galerautils/src/gu_rset.cpp:checksum():551
40%: Checks: 5, Failures: 0, Errors: 3
galera/tests/write_set_ng_check.cpp:226:E:WriteSet basic:ver3_basic_rsv1:0: (after this point) Received signal 6 (Abort trap)
galera/tests/write_set_ng_check.cpp:226:E:WriteSet basic:ver3_basic_rsv2_wsv3:0: (after this point) Received signal 6 (Abort trap)
galera/tests/write_set_ng_check.cpp:226:E:WriteSet basic:ver3_basic_rsv2_wsv4:0: (after this point) Received signal 6 (Abort trap)
Running suite(s): write_set
100%: Checks: 8, Failures: 0, Errors: 0
Running suite(s): trx_handle
100%: Checks: 2, Failures: 0, Errors: 0
Running suite(s): service_thd
100%: Checks: 3, Failures: 0, Errors: 0
Running suite(s): ist
terminate called after throwing an instance of 'gu::NotSet'
terminate called after throwing an instance of 'gu::NotSet'
terminate called after throwing an instance of 'gu::NotSet'
terminate called after throwing an instance of 'gu::NotSet'
terminate called after throwing an instance of 'gu::NotSet'
16%: Checks: 6, Failures: 0, Errors: 5
galera/tests/ist_check.cpp:196:E:test_ist_v1:test_ist_v1:0: (after this point) Received signal 6 (Abort trap)
galera/tests/ist_check.cpp:196:E:test_ist_v2:test_ist_v2:0: (after this point) Received signal 6 (Abort trap)
galera/tests/ist_check.cpp:196:E:test_ist_v3:test_ist_v3:0: (after this point) Received signal 6 (Abort trap)
galera/tests/ist_check.cpp:196:E:test_ist_v4:test_ist_v4:0: (after this point) Received signal 6 (Abort trap)
galera/tests/ist_check.cpp:196:E:test_ist_v5:test_ist_v5:0: (after this point) Received signal 6 (Abort trap)
Running suite(s): saved_state
100%: Checks: 3, Failures: 0, Errors: 0
Total tests failed: 8
scons: *** [galera/tests/galera_check.passed] Error 1
scons: building terminated because of errors.
Describe the environment
Manticore Search version: 3.0.0
OS version: 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Describe the problem
Description of the issue:
Error on compile:
Steps to reproduce:
Output of cmake:
"See also" files attached
CMakeError.log
CMakeOutput.log