Today, I had the need to debug mysql, given that I download the code and I try to compile on my MacBook pro.
Surprise I got the following issue:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
-- Performing Test HAVE_IB_ATOMIC_PTHREAD_T_GCC - Success -- Check size of pthread_t -- Check size of pthread_t - done -- Performing Test HAVE_PEERCRED -- Performing Test HAVE_PEERCRED - Failed -- GTEST_LIBRARIES:optimized;/Users/marcotusa/mysql_work/source/gtest-1.6.0/test;debug;/Users/marcotusa/mysql_work/source/gtest-1.6.0 -- Configuring incomplete, errors occurred! tusamac:mysql-5.6.5-m8 marcotusa$ cmake . -G Xcode -DCMAKE_INSTALL_PREFIX:PATH=/Users/marcotusa/mysql_work/template/mysql-5.6.5 -DCMAKE_USE_RELATIVE_PATHS=1 -DDEBUG_EXTNAME=1 -DDISABLE_SHARED=OFF -DENABLE_DOWNLOADS=1 -DWITHOUT_SERVER=0
-DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_DEBUG=1 -DWITH_EMBEDDED_SERVER=0
-DWITH_EXTRA_CHARSETS=all -DWITH_FAST_MUTEXES=1 -DWITH_FEDERATED_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_LIBEDIT=1 -DWITH_LIBWRAP=1
-DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1
-- MySQL 5.6.5-m8 CMake Error at configure.cmake:196 (LIST): list sub-command REMOVE_DUPLICATES requires list to be present. Call Stack (most recent call first): CMakeLists.txt:262 (INCLUDE) |
Obviously on linux all works fine.
After having fight a little by myself, I start to look around and I have found that bug 65050 was talking about it.
But for version 5.5. and is marked as Critical.
Anyhow I review the patch describe there, and look in the file configure.cmake.
Obviously the lines were different but once identify the right position: line 196 in 5.6.6 m8.
Replacing the line
196 |
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
|
with
196 197 198 |
IF(CMAKE_REQUIRED_LIBRARIES) LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES) ENDIF() |
I run again the cmake and finally I got :
1 2 3 4 5 6 7 8 9 10 11 |
tusamac:mysql-5.6.5-m8 marcotusa$ cmake . -G Xcode -DCMAKE_INSTALL_PREFIX:PATH=/Users/marcotusa/mysql_work/template/mysql-5.6.5
-DCMAKE_USE_RELATIVE_PATHS=1 -DDEBUG_EXTNAME=1 -DDISABLE_SHARED=OFF -DENABLE_DOWNLOADS=1
-DWITHOUT_SERVER=0 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_DEBUG=1 -DWITH_EMBEDDED_SERVER=0 -DWITH_EXTRA_CHARSETS=all -DWITH_FAST_MUTEXES=1
-DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_LIBEDIT=1
-DWITH_LIBWRAP=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_UNIT_TESTS=1 -- MySQL 5.6.5-m8 -- C warning options: -Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -Wdeclaration-after-statement -- C++ warning options: -Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror -Wno-unused-parameter -Woverloaded-virtual -- Successfully downloaded http://googletest.googlecode.com/files/gtest-1.5.0.tar.gz to /Users/marcotusa/mysql_work/source/mysql-5.6.5-m8/source_downloads -- GTEST_LIBRARIES:gtest -- Configuring done -- Generating done -- Build files have been written to: /Users/marcotusa/mysql_work/source/mysql-5.6.5-m8 tusamac:mysql-5.6.5-m8 marcotusa$ |
Easy and clean.
Thank you to : Mike McQuaid for identifying the issue and submit the patch
And shame on MySQL/Oracle for having Mac OS/X so out of the radar.
{joscommentenable}