Percona XtraDB cluster build failing


#1

– Performing Test HAVE_CXX_ISINF
– Performing Test HAVE_CXX_ISINF - Success
– Looking for timer_create
– Looking for timer_create - found
– Looking for timer_settime
– Looking for timer_settime - found
– Looking for kqueue
– Looking for kqueue - not found
– Looking for EVFILT_TIMER
– Looking for EVFILT_TIMER - not found
– Check if the system is big endian
– Searching 16 bit integer
– Check size of unsigned short
– Check size of unsigned short - done
– Using unsigned short
– Check if the system is big endian - little endian
– Check size of char *
– Check size of char * - done
– Check size of long
– Check size of long - done
– Check size of short
– Check size of short - done
– Check size of int
– Check size of int - done
– Check size of long long
– Check size of long long - done
– Check size of off_t
– Check size of off_t - done
– Check size of time_t
– Check size of time_t - done
– Check size of struct timespec
– Check size of struct timespec - done
– Check size of uint
– Check size of uint - done
– Check size of ulong
– Check size of ulong - done
– Check size of u_int32_t
– Check size of u_int32_t - done
– Performing Test HAVE_VISIBILITY_HIDDEN
– Performing Test HAVE_VISIBILITY_HIDDEN - Success
– Checking stack direction : -1
– Looking for include files time.h, sys/time.h
– Looking for include files time.h, sys/time.h - found
– Looking for O_NONBLOCK
– Looking for O_NONBLOCK - found
– Performing Test HAVE_PAUSE_INSTRUCTION
– Performing Test HAVE_PAUSE_INSTRUCTION - Success
– Performing Test HAVE_BSS_START
– Performing Test HAVE_BSS_START - Success
– Performing Test HAVE_BUILTIN_UNREACHABLE
– Performing Test HAVE_BUILTIN_UNREACHABLE - Success
– Performing Test HAVE_BUILTIN_EXPECT
– Performing Test HAVE_BUILTIN_EXPECT - Success
– Performing Test HAVE_BUILTIN_STPCPY
– Performing Test HAVE_BUILTIN_STPCPY - Success
– Performing Test HAVE_GCC_ATOMIC_BUILTINS
– Performing Test HAVE_GCC_ATOMIC_BUILTINS - Success
– Performing Test HAVE_GCC_SYNC_BUILTINS
– Performing Test HAVE_GCC_SYNC_BUILTINS - Success
– Looking for netinet/in6.h
– Looking for netinet/in6.h - not found
– Check size of struct sockaddr_in6
– Check size of struct sockaddr_in6 - done
– Check size of struct in6_addr
– Check size of struct in6_addr - done
– Performing Test HAVE_SOCKADDR_STORAGE_SS_FAMILY
– Performing Test HAVE_SOCKADDR_STORAGE_SS_FAMILY - Success
– Performing Test HAVE_SOCKADDR_IN_SIN_LEN
– Performing Test HAVE_SOCKADDR_IN_SIN_LEN - Failed
– Performing Test HAVE_SOCKADDR_IN6_SIN6_LEN
– Performing Test HAVE_SOCKADDR_IN6_SIN6_LEN - Failed
– Performing Test HAVE_IMPLICIT_DEPENDENT_NAME_TYPING
– Performing Test HAVE_IMPLICIT_DEPENDENT_NAME_TYPING - Failed
– Looking for chown
– Looking for chown - found
– Looking for include file numaif.h
– Looking for include file numaif.h - not found
– Check size of socklen_t
– Check size of socklen_t - failed
– Performing Test HAVE_NO_UNUSED_CONST_VAR
– Performing Test HAVE_NO_UNUSED_CONST_VAR - Success
– Check size of mbstate_t
– Check size of mbstate_t - done
– Performing Test HAVE_LANGINFO_CODESET
– Performing Test HAVE_LANGINFO_CODESET - Success
– Looking for wcsdup
– Looking for wcsdup - found
– Check size of wchar_t
– Check size of wchar_t - done
– Check size of wint_t
– Check size of wint_t - done
– Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:66 (MESSAGE):
Curses library not found. Please install appropriate package,

  remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.

Call Stack (most recent call first):
cmake/readline.cmake:190 (FIND_CURSES)
cmake/readline.cmake:264 (FIND_SYSTEM_READLINE)
CMakeLists.txt:498 (MYSQL_CHECK_EDITLINE)

– Configuring incomplete, errors occurred!
See also “/hab/cache/src/Percona-XtraDB-Cluster-5.7.14-26.17/CMakeFiles/CMakeOutput.log”.
See also “/hab/cache/src/Percona-XtraDB-Cluster-5.7.14-26.17/CMakeFiles/CMakeError.log”.
Percona-XtraDB-Cluster: Build time: 1m50s
Percona-XtraDB-Cluster: Exiting on error

Plans.sh

pkg_name=Percona-XtraDB-Cluster
pkg_origin=honeyz
pkg_version=5.7.14-26.17
pkg_maintainer='The Habitat Maintainers humans@habitat.sh
pkg_license=(‘GPL-2.0’)
pkg_source=https://www.percona.com/downloads/Percona-XtraDB-Cluster-57/{pkg_name}-{pkg_version}/source/tarball/{pkg_name}-{pkg_version}.tar.gz
pkg_shasum=39ee278cf6302cb9dd7c065b93dfe415ca93fdfe0ae3e9bedbcb54bcd6c12292

pkg_upstream_url=https://www.percona.com
pkg_description=$(cat << EOF
Percona XtraDB Cluster is a high-availability solution for MySQL. It ensures the highest possible uptime, prevents data loss, and provides linear scalability for a growing environment.

Features of Percona XtraDB Cluster include:

Synchronous replication: Data is written to all nodes simultaneously, or not written at all if it fails even on a single node.
Multi-master replication: Any node can trigger a data update.
True parallel replication: Multiple threads on slave performing replication on row level.
Automatic node provisioning: You simply add a node and it automatically syncs.
Data consistency: No more unsynchronized nodes.
EOF
)

pkg_deps=(
core/glibc
core/gcc-libs
core/coreutils
core/sed
core/gawk
core/grep
core/pcre
core/procps-ng
core/inetutils
core/ncurses
core/openssl
core/check
core/bison
)

pkg_build_deps=(
core/cmake
core/coreutils
core/diffutils
core/patch
core/make
core/scons
core/gcc

– MySQL currently requires boost_1_59_0

core/boost159
core/boost
core/libaio
core/ncurses
core/readline
core/linux-pam
)

pkg_svc_user="hab"
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
pkg_expose=(3306)

do_build() {
cmake . -DLOCAL_BOOST_DIR="(pkg_path_for core/boost159)" \ -DBOOST_INCLUDE_DIR="(pkg_path_for core/boost159)"/include
-DWITH_BOOST="$(pkg_path_for core/boost159)"
-DWITH_WSREP=1
-DWITH_SSL=yes
-DCMAKE_INSTALL_PREFIX="$pkg_prefix"
make
}

do_check() {
ctest
}


#2

I don’t know enough (or any, really) cmake to understand what it’s looking for when it’s trying to detect ncurses, but my guess is you’ll have to pass some flag to get it to do so inside $(pkg_path_for core/ncurses).


#3

So I started playing with this today. I think that honestly the right way to build this package is to use the compilation tools percona team provide in their package. I’ve gotten pretty close to getting a successful build out of it using their build script. ./build-ps/build-binary.sh

scons: *** [garb/garb_config.os] Error 1
scons: building terminated because of errors.
cp: cannot stat 'garb/garbd': No such file or directory
cp: cannot stat 'libgalera_smm.so': No such file or directory
   Percona-XtraDB-Cluster: Build time: 0m30s
   Percona-XtraDB-Cluster: Exiting on error

Looks like the remaining bit here is to get a galera package built that percona can depend upon.