5.7.20-19 build error on macOS

Bug #1741647 reported by Raymon de Looff on 2018-01-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Invalid
Undecided
Unassigned
5.7
Fix Released
Low
Laurynas Biveinis

Bug Description

Percona Server 5.7.20-19 fails to compile on macOS due to the following errors (https://github.com/Homebrew/homebrew-core/pull/22514):

[ 2%] Building C object strings/CMakeFiles/strings.dir/ctype-sjis.c.o
cd /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DDISABLE_MYSQL_THREAD_H -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/libbinlogevents/export -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/strings.dir/ctype-sjis.c.o -c /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings/ctype-sjis.c
In file included from /tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/strings/ctype-simple.c:19:
/tmp/percona-server-20180106-69001-1yjj964/percona-server-5.7.20-19/include/my_sys.h:582:6: error: conflicting types for 'memset_s'
void memset_s(void *dest, size_t dest_max, int c, size_t n);
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/string.h:145:9: note: previous declaration is here
errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
        ^
1 error generated.

[ 17%] Building C object mysys/CMakeFiles/mysys.dir/my_mkdir.c.o
cd /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/export -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/mysys.dir/my_mkdir.c.o -c /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_mkdir.c
[ 17%] Building C object mysys/CMakeFiles/mysys.dir/my_mmap.c.o
cd /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys && /usr/local/Homebrew/Library/Homebrew/shims/super/clang -DHAVE_CONFIG_H -DHAVE_LIBEVENT1 -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/extra/rapidjson/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/include -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/libbinlogevents/export -I/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/mysys.dir/my_mmap.c.o -c /tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_mmap.c
/tmp/percona-server-20180106-79707-1kepku6/percona-server-5.7.20-19/mysys/my_malloc.c:327:6: error: conflicting types for 'memset_s'
void memset_s(void *dest, size_t dest_max, int c, size_t n)
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/string.h:145:9: note: previous declaration is here
errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
        ^
1 error generated.

description: updated
description: updated

Robert, can you take a look?

tags: added: regression

Robert provided a patch for me to test

After fixing memset_s, the next issue is

[ 47%] Linking CXX shared module keyring_file.so
ld: unknown option: --version-script=/Users/laurynas/percona/mysql-server/plugin/keyring/keyring_file.version
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [plugin/keyring/keyring_file.so] Error 1
make[1]: *** [plugin/keyring/CMakeFiles/keyring_file.dir/all] Error 2
make: *** [all] Error 2

The above was caused by https://github.com/percona/percona-server/pull/2064, fixing at the same time

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2286

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers