[oi-dev] build issue in percona-server-57
Michal Nowak
mnowak at startmail.com
Tue Nov 6 07:28:43 UTC 2018
On 11/06/18 01:07 AM, Rich Reynolds wrote:
> On 11/5/18 2:38 PM, Bob Friesenhahn wrote:
>> On Mon, 5 Nov 2018, Rich Reynolds wrote:
>>
>>>
>>> [ 32%] Building CXX object
>>> sql/CMakeFiles/binlog.dir/binlog_crypt_data.cc.o
>>> /codebase/oi-userland/components/database/percona-server-57/percona-server-5.7.22-22/sql/binlog_crypt_data.cc:
>>> In member function 'void Binlog_crypt_data::free_key(uchar*&,
>>> std::size_t&)':
>>> /codebase/oi-userland/components/database/percona-server-57/percona-server-5.7.22-22/sql/binlog_crypt_data.cc:62:37:
>>> error: 'memset_s' was not declared in this scope
>>> memset_s(key, 512, 0, key_length);
>>> ^
>>> make[3]: *** [sql/CMakeFiles/binlog.dir/build.make:336:
>>> sql/CMakeFiles/binlog.dir/binlog_crypt_data.cc.o] Error 1
>>>
>>>
>>>
>>> this a patching, upstream or makefile issue? ill investigate if no
>>> one knows off the top of head
>>
>> This appears to be a C'11 function. See
>> https://en.cppreference.com/w/c/string/byte/memset. Depending on C'11
>> at this time is very optimistic.
>>
>> What version of GCC are you using?
>>
>> Bob
> cmake was fine with 6.4.0
>
> -- Running cmake version 3.11.3
> -- Found Git: /usr/bin/git (found version "2.19.1")
> -- Configuring with MAX_INDEXES = 64U
> -- The C compiler identification is GNU 6.4.0
> -- The CXX compiler identification is GNU 6.4.0
> -- Check for working C compiler: /usr/gcc/6/bin/gcc
> -- Check for working C compiler: /usr/gcc/6/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Check for working CXX compiler: /usr/gcc/6/bin/g++
> -- Check for working CXX compiler: /usr/gcc/6/bin/g++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
>
> and cuz more information is better than less:
>
> -- CMAKE_BUILD_TYPE: RELEASE
> -- COMPILE_DEFINITIONS:
> _FILE_OFFSET_BITS=64;__EXTENSIONS__;_POSIX_PTHREAD_SEMANTICS;_REENTRANT;_PTHREADS;BOOST_GEOMETRY_SQRT_CHECK_FINITENESS;HAVE_CONFIG_H;HAVE_LIBEVENT1
>
> -- CMAKE_C_FLAGS: -m32 -O3 -Wall -Wextra -Wformat-security -Wvla
> -Wwrite-strings -Wdeclaration-after-statement
> -- CMAKE_CXX_FLAGS: -m32 -O3 -Wall -Wextra -Wformat-security -Wvla
> -Woverloaded-virtual -Wno-unused-parameter
> -- CMAKE_C_LINK_FLAGS: -m32
> -- CMAKE_CXX_LINK_FLAGS: -m32
> -- CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG -DDBUG_OFF -DNDEBUG
> -- CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG -DDBUG_OFF -DNDEBUG
> -- Configuring done
>
> rich
>
Three months ago illumos added support for memset_s(3C)
(https://www.illumos.org/issues/8548) before that it likely wasn't detected.
memset_s(3C) seems to require
#define __STDC_WANT_LIB_EXT1__ 1
#include <string.h>
I don't know how to do that properly in cmake/C++.
If anyone does know, I'll fix it in userland when updating Percona
Server to 5.7.23-23.
This works for cmake to use GCC 7.3:
GCC_VERSION = 7
Michal
More information about the oi-dev
mailing list