Bug #51913 cmake build fails on mac os x 10.6

Submitted: 10 Mar 2010 13:46 Modified: 10 Mar 2010 14:55
Reporter: Mattias Jonsson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:mysql-trunk OS:Any
Assigned to: CPU Architecture:Any

[10 Mar 2010 13:46] Mattias Jonsson
Description:
I have tried to compile mysql-trunk and mysql-trunk-bugfixing on mac os x 10.6 by using cmake, and it fails:
ranlib: file: libmysqlclient.a(mysqlclient_depends.c.o) has no symbols
/usr/bin/ranlib: file: libmysqlclient.a(mysqlclient_depends.c.o) has no symbols
/usr/bin/ranlib: warning for library: libmysqlclient.a the table of contents is empty (no object file members in the library define global symbols)

....

/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:1047: error: expected constructor, destructor, or type conversion before ‘*’ token
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc: In function ‘int not_in_history(const char*)’:
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2400: error: ‘HIST_ENTRY’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2400: error: ‘oldhist’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2400: error: ‘history_get’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc: In function ‘void initialize_readline(char*)’:
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2436: error: invalid conversion from ‘char** (*)()’ to ‘char** (*)(const char*, int, int)’
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2437: error: invalid conversion from ‘int (*)(const char*, int)’ to ‘char* (*)(const char*, int)’
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2438: error: invalid conversion from ‘int (*)()’ to ‘int (*)(int, int)’
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2438: error:   initializing argument 2 of ‘int rl_add_defun(const char*, int (*)(int, int), int)’
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc: In function ‘char** new_mysql_completion(const char*, int, int)’:
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/client/mysql.cc:2460: error: ‘completion_matches’ was not declared in this scope
make[2]: *** [client/CMakeFiles/mysql.dir/mysql.cc.o] Error 1
make[1]: *** [client/CMakeFiles/mysql.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

cmake --version
cmake version 2.8.0

from ccmake:
 CAT_EXECUTABLE                   /bin/cat                                     
 CMAKE_BUILD_TYPE                 RelWithDebInfo                               
 CMAKE_INSTALL_PREFIX             /usr                                         
 CMAKE_OSX_ARCHITECTURES                                                       
 CMAKE_OSX_DEPLOYMENT_TARGET      10.6                                         
 CMAKE_OSX_SYSROOT                /Developer/SDKs/MacOSX10.6.sdk               
 ENABLED_PROFILING                ON                                           
 ENABLE_DEBUG_SYNC                ON                                           
 ENABLE_DTRACE                    ON                                           
 INSTALL_LAYOUT                   UNIX                                         
 MYSQL_DATADIR                    /usr/var                                     
 WITH_ARCHIVE_STORAGE_ENGINE      OFF                                          
 WITH_AUDIT_NULL                  OFF                                          
 WITH_BLACKHOLE_STORAGE_ENGINE    OFF                                          
 WITH_DEBUG                       OFF                                          
 WITH_DEBUG_FULL                  OFF                                          
 WITH_EMBEDDED_SERVER             OFF                   
 WITH_ERROR_INJECT                OFF                                          
 WITH_EXTRA_CHARSETS              all                                          
 WITH_FEDERATED_STORAGE_ENGINE    OFF                                          
 WITH_INNOBASE_STORAGE_ENGINE     OFF                                          
 WITH_LIBEDIT                     ON                                           
 WITH_LIBWRAP                     OFF                                          
 WITH_PARTITION_STORAGE_ENGINE    ON                                           
 WITH_PERFSCHEMA_STORAGE_ENGINE   ON                                           
 WITH_READLINE                    OFF                                          
 WITH_SSL                         no                                           
 WITH_UNIT_TESTS                  ON                                           
 WITH_ZLIB                        system    

When trying to disable LIBEDIT:
 CMake Error at cmake/readline.cmake:223 (MESSAGE):
   Cannot find system readline or libedit libraries.Use WITH_READLINE or
   WITH_LIBEDIT
 Call Stack (most recent call first):
   CMakeLists.txt:213 (MYSQL_CHECK_READLINE)

So I would guess that it lacks some checks/dependency for LIBEDIT/READLINE

When I toggle WITH_READLINE to ON:

In file included from /Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex_hash.h:25,
                 from /Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/sql_lex.cc:107:
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex.h:199: error: ‘ERROR_SYM’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex.h:233: error: ‘GENERAL’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex.h:420: error: ‘PROCEDURE_SYM’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex.h:442: error: ‘RELAY’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/lex.h:498: error: ‘SLOW’ was not declared in this scope
[ 75%] Building CXX object sql/CMakeFiles/sql.dir/sql_load.cc.o
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/sql_lex.cc: In function ‘int MYSQLlex(void*, void*)’:
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/sql_lex.cc:844: error: ‘WITH_CUBE_SYM’ was not declared in this scope
/Users/mattiasj/clones/bzrroot/test-mysql-trunk/sql/sql_lex.cc:846: error: ‘WITH_ROLLUP_SYM’ was not declared in this scope
[ 75%] Building CXX object sql/CMakeFiles/sql.dir/sql_manager.cc.o
make[2]: *** [sql/CMakeFiles/sql.dir/sql_lex.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2

How to repeat:
branch mysql-trunk (revid:alik@sun.com-20100309095211-tple6waim9kponxm)
mkdir b ; cd b
cmake ..
make -j5
<failure...>

I have tried CMAKE_BUILD_TYPE=Debug too which also fails...

It works if not using cmake (like 'HAVE_CMAKE=no BUILD/compile-pentium-debug-max')
[10 Mar 2010 14:55] Mattias Jonsson
Hmm, seems to have been problem with using an old tree, which have been used to build non cmake builds before, and then building out-of-source cmake build.

Works with a newly created mysql-trunk[-bugfixing] tree.

Setting status "Can't repeat".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.