[MDEV-5314] Compiling fails on OSX using clang Created: 2013-11-19  Updated: 2014-02-19  Resolved: 2014-02-19

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.6
Fix Version/s: 10.0.9

Type: Bug Priority: Major
Reporter: Rob Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 3
Labels: clang, compile, gcc
Environment:

OSX Maverick 10.9
XCode 5.0.2

CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc


Attachments: HTML File logtail    

 Description   

Cannot compile from source: https://downloads.mariadb.org/f/mariadb-10.0.6/kvm-tarbake-jaunty-x86/mariadb-10.0.6.tar.gz/from/http:/mirrors.supportex.net/mariadb



 Comments   
Comment by Lee Hanxue (Inactive) [ 2013-11-19 ]

Replicated via homebrew on OS X Mavericks.

https://github.com/mxcl/homebrew/issues/24489

Log files:
CMakeCache.txt - https://gist.github.com/7548516
01.cmake - https://gist.github.com/7548483
01.cmake.cc - https://gist.github.com/7548629
CMakeError.log - https://gist.github.com/7548418
CMakeOutput.log - https://gist.github.com/7548403

Comment by Aleai Sumity (Inactive) [ 2013-11-25 ]

problem detect os type
mariadb Darwin (OSX ) Windows API

(Windows) _strtoi64 = strtoll (Unix)

http://msdn.microsoft.com/en-us/library/h80404d3(v=vs.90).aspx
_________
/usr/local/Library/ENV/4.3/clang -DCHECK_FUNCTION_EXISTS=_strtoi64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTryCompileExec1005542383.dir/CheckFunctionExists.c.o -o cmTryCompileExec1005542383
Undefined symbols for architecture x86_64:
"__strtoi64", referenced from:
_main in CheckFunctionExists.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTryCompileExec1005542383] Error 1
make: *** [cmTryCompileExec1005542383/fast] Error 2

Comment by Sergey Vojtovich [ 2014-02-19 ]

cmake failure at https://gist.github.com/hanxue/7548483 is duplicate of MDEV-5182 (fixed).
Failure described in the attached logtail file is same as http://bugs.mysql.com/bug.php?id=70542 (needs to be fixed).
__strtoi64 related stuff seem to be just cmake probe and shouldn't matter as such.

Comment by Sergey Vojtovich [ 2014-02-19 ]

Sergei, please review fix for this bug.

Comment by Sergei Golubchik [ 2014-02-19 ]

Am I right that it's only s/test/MY_TEST/g?
In that case — ok to push

Comment by Sergey Vojtovich [ 2014-02-19 ]

Correct, it's only s/test/MY_TEST/g.

Comment by Sergey Vojtovich [ 2014-02-19 ]

Fixed in 10.0.9: revno: 4006, revision-id: svoj@mariadb.org-20140219100515-47zpgffjc2hegjlb

Generated at Thu Feb 08 07:03:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.