5.7 build failed on mac osx

Bug #1525258 reported by 神仙
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

percona server 5.7 build failed on mac osx

cmake -DWITH_BOOST=/opt/boost ~/Documents/work/xzy/percona-server/ -DWITHOUT_TOKUDB=1 -DCMAKE_INSTALL_PREFIX=/opt/percona-server-5.7 -DBUILD_CONFIG=mysql_release

.....

[ 0%] Building C object strings/CMakeFiles/strings.dir/bchange.c.o
In file included from /Users/xiezhenye/Documents/work/xzy/percona-server/strings/bchange.c:27:
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:672:3: error: unknown type name 'FILETIME'
  FILETIME ft;
  ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:673:3: error: unknown type name '__int64'
  __int64 i64;
  ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:676:8: error: redefinition of 'timespec'
struct timespec {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_types/_timespec.h:30:1: note: previous
      definition is here
_STRUCT_TIMESPEC
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_types/_timespec.h:29:33: note: expanded
      from macro '_STRUCT_TIMESPEC'
#define _STRUCT_TIMESPEC struct timespec
                                       ^
In file included from /Users/xiezhenye/Documents/work/xzy/percona-server/strings/bchange.c:27:
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:702:3: warning: implicit declaration of function 'GetSystemTimeAsFileTime' is invalid
      in C99 [-Wimplicit-function-declaration]
  GetSystemTimeAsFileTime(&tv.ft);
  ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:703:12: error: no member named 'tv' in 'struct timespec'
  abstime->tv.i64= tv.i64 + (__int64)(nsec / 100);
  ~~~~~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:703:38: error: called object type '<dependent type>' is not a function or function
      pointer
  abstime->tv.i64= tv.i64 + (__int64)(nsec / 100);
                            ~~~~~~~~~^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:708:12: error: no member named 'max_timeout_msec' in 'struct timespec'
  abstime->max_timeout_msec= (long)max_timeout_msec;
  ~~~~~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:734:12: error: no member named 'tv' in 'struct timespec'
  if (ts1->tv.i64 > ts2->tv.i64)
      ~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:734:26: error: no member named 'tv' in 'struct timespec'
  if (ts1->tv.i64 > ts2->tv.i64)
                    ~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:736:12: error: no member named 'tv' in 'struct timespec'
  if (ts1->tv.i64 < ts2->tv.i64)
      ~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:736:26: error: no member named 'tv' in 'struct timespec'
  if (ts1->tv.i64 < ts2->tv.i64)
                    ~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:748:16: error: no member named 'tv' in 'struct timespec'
  return (ts1->tv.i64 - ts2->tv.i64) * 100;
          ~~~ ^
/Users/xiezhenye/Documents/work/xzy/percona-server/include/my_global.h:748:30: error: no member named 'tv' in 'struct timespec'
  return (ts1->tv.i64 - ts2->tv.i64) * 100;
                        ~~~ ^
1 warning and 12 errors generated.
make[2]: *** [strings/CMakeFiles/strings.dir/bchange.c.o] Error 1
make[1]: *** [strings/CMakeFiles/strings.dir/all] Error 2

.....

Tags: mac
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

I am able to build it on Mac OS X. Can you post full cmake output and build log with make VERBOSE=1 ?

Changed in percona-server:
status: New → Incomplete
Revision history for this message
神仙 (xiezhenye) wrote :

cmake output

Revision history for this message
神仙 (xiezhenye) wrote :

make ouput

Revision history for this message
神仙 (xiezhenye) wrote :

build failed both on branch release-5.7.10-1rc1( a0f7441) and 5.7(a7ef1b1)

神仙 (xiezhenye)
Changed in percona-server:
status: Incomplete → New
Revision history for this message
神仙 (xiezhenye) wrote :

I found that build not use the config.h and my_config.h in the build directory, and the config.h and my_config.h generated in the source dir is not correct.

Revision history for this message
神仙 (xiezhenye) wrote :

The problem occurs when building in a directory other than the source directory.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

What is your cmake invocation line? Is your out-of-source build directory clean and does your source directory not contain any extra files? (such as previous in-source build).

Does Oracle MySQL build?

Revision history for this message
神仙 (xiezhenye) wrote :

out-of-source build directory is empty before cmake.
no extra files in source directory
oracle mysql build ok.

cmake -DWITH_BOOST=/opt/boost ~/Documents/work/xzy/percona-server/ -DWITHOUT_TOKUDB=1 -DCMAKE_INSTALL_PREFIX=/opt/percona-server-5.7 -DBUILD_CONFIG=mysql_release

I found that without -DWITHOUT_TOKUDB, cmake will fail:
cmake -DWITH_BOOST=/opt/boost ~/Documents/work/xzy/percona-server/ -DCMAKE_INSTALL_PREFIX=/opt/percona-server-5.7 -DBUILD_CONFIG=mysql_release

Revision history for this message
神仙 (xiezhenye) wrote :

CMakeError.log
may helps

tags: added: mac
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.