mariadb安装失败:make(Mac OSX 10.6.8)

时间:2015-01-20 10:43:01

标签: mariadb

我不确定如何继续。 make步骤失败:

error: ‘strnlen’ was not declared in this scope
    make[2]: *** [storage/connect/CMakeFiles/connect.dir/xobject.cpp.o] Error 1
    make[1]: *** [storage/connect/CMakeFiles/connect.dir/all] Error 2
    make: *** [all] Error 2

以下是一些输出:

~/Downloads$ tar xvfz mariadb-10.0.15.tar.gz 
…
…

=====BUILD======

~/Downloads/mariadb-10.0.15$ cmake . -DBUILD_CONFIG=mysql_release
-- Running cmake version 3.1.0
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
...
...
-- Looking for strlcpy
-- Looking for strlcpy - found
-- Looking for strnlen
-- Looking for strnlen - not found
-- Looking for strlcat
-- Looking for strlcat - found
-- Looking for strsignal
-- Looking for strsignal - found
-- Looking for fgetln
-- Looking for fgetln - found
-- Looking for strpbrk
-- Looking for strpbrk - found
-- Looking for strstr
-- Looking for strstr - found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoul
-- Looking for strtoul - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for shmctl
-- Looking for shmctl - found
-- Looking for shmdt
-- Looking for shmdt - found
-- Looking for shmget
-- Looking for shmget - found
-- Looking for tell
-- Looking for tell - not found
-- Looking for tempnam
-- Looking for tempnam - found
-- Looking for thr_setconcurrency
-- Looking for thr_setconcurrency - not found
-- Looking for thr_yield
-- Looking for thr_yield - not found
...
...
-- Looking for vasprintf

-- Performing Test HAVE_XUCRED - Success
-- Looking for event.h
-- Looking for event.h - found
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   libmysql
   libmysqld

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/7stud/Downloads/mariadb-10.0.15



========MAKE==========

~/Downloads/mariadb-10.0.15$ make
….
…
...
[ 50%] Building CXX object storage/connect/CMakeFiles/connect.dir/value.cpp.o
cc1plus: warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++
[ 50%] Building CXX object storage/connect/CMakeFiles/connect.dir/xindex.cpp.o
cc1plus: warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++
[ 50%] Building CXX object storage/connect/CMakeFiles/connect.dir/xobject.cpp.o
cc1plus: warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++
/Users/7stud/Downloads/mariadb-10.0.15/storage/connect/xobject.cpp: In member function ‘bool STRING::Set(char*, uint)’:
/Users/7stud/Downloads/mariadb-10.0.15/storage/connect/xobject.cpp:275: error: ‘strnlen’ was not declared in this scope
make[2]: *** [storage/connect/CMakeFiles/connect.dir/xobject.cpp.o] Error 1
make[1]: *** [storage/connect/CMakeFiles/connect.dir/all] Error 2
make: *** [all] Error 2

~/Downloads/mariadb-10.0.15$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

接下来,使用自制软件:

  

上次登录:星期五1月16日03:28:09关于ttys001~ $ brew install mariadb
  ==>安装mariadb依赖:pidof   ==>正在下载http://www.nightproductions.net/downloads/pidof_source.tar.gz

     ################################################## ################ 100.0%      

==>修补   ==> make all CC = gcc-4.2 CFLAGS = /Users/7stud/.homebrew/Cellar/pidof/0.1.4:3个文件,24K,内置3个   秒   ==>安装mariadb   ==>正在下载http://ftp.osuosl.org/pub/mariadb/mariadb-10.0.15/source/mariadb-10.0.15.tar.gz

     ################################################## ################ 100.0%      

==>修补   ==> cmake。 -DCMAKE_INSTALL_PREFIX = / Users / 7stud / .homebrew / Cellar / mariadb / 10.0.15 -DCMAKE_FIND_FRAMEWORK = LAST -DCMAKE   ==>制作cd /tmp/mariadb-0ocIfC/mariadb-10.0.15/storage/innobase& amp ;& amp; /Users/7stud/.homebrew/Cellar/cmake/3.1.0/bin/cmake -E   cmake_link_script CMakeFiles / innobase.dir / link.txt --verbose = 1   /Users/7stud/.homebrew/Library/ENV/3.2.6/g++-4.2 -Wall -Wall   -Wno-unused-parameter -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -DDBUG_OFF -bundle -Wl,-headerpad_max_install_names -o ha_innodb.so CMakeFiles / innobase.dir / api / api0api.cc.o   CMakeFiles / innobase.dir / API / api0misc.cc.o   CMakeFiles / innobase.dir / BTR / btr0btr.cc.o   CMakeFiles / innobase.dir / BTR / btr0cur.cc.o   CMakeFiles / innobase.dir / BTR / btr0pcur.cc.o   CMakeFiles / innobase.dir / BTR / btr0sea.cc.o   CMakeFiles / innobase.dir / BUF / buf0buddy.cc.o   CMakeFiles / innobase.dir / BUF / buf0buf.cc.o   CMakeFiles / innobase.dir / BUF / buf0dblwr.cc.o   CMakeFiles / innobase.dir / BUF / buf0checksum.cc.o   CMakeFiles / innobase.dir / BUF / buf0dump.cc.o   CMakeFiles / innobase.dir / BUF / buf0flu.cc.o   CMakeFiles / innobase.dir / BUF / buf0lru.cc.o   CMakeFiles / innobase.dir / BUF / buf0rea.cc.o   CMakeFiles / innobase.dir /数据/ data0data.cc.o   CMakeFiles / innobase.dir /数据/ data0type.cc.o   CMakeFiles / innobase.dir /字典/ dict0boot.cc.o   CMakeFiles / innobase.dir /字典/ dict0crea.cc.o   CMakeFiles / innobase.dir /字典/ dict0dict.cc.o   CMakeFiles / innobase.dir /字典/ dict0load.cc.o   CMakeFiles / innobase.dir /字典/ dict0mem.cc.o   CMakeFiles / innobase.dir /字典/ dict0stats.cc.o   CMakeFiles / innobase.dir /字典/ dict0stats_bg.cc.o   CMakeFiles / innobase.dir /达因/ dyn0dyn.cc.o   CMakeFiles / innobase.dir / EVAL / eval0eval.cc.o   CMakeFiles / innobase.dir / EVAL / eval0proc.cc.o   CMakeFiles / innobase.dir / FIL / fil0fil.cc.o   CMakeFiles / innobase.dir / FSP / fsp0fsp.cc.o   CMakeFiles / innobase.dir / FUT / fut0fut.cc.o   CMakeFiles / innobase.dir / FUT / fut0lst.cc.o   CMakeFiles / innobase.dir /公顷/ ha0ha.cc.o   CMakeFiles / innobase.dir /公顷/ ha0storage.cc.o   CMakeFiles / innobase.dir /公顷/ hash0hash.cc.o   CMakeFiles / innobase.dir / FTS / fts0fts.c​​c.o   CMakeFiles / innobase.dir / FTS / fts0ast.cc.o   CMakeFiles / innobase.dir / FTS / fts0blex.cc.o   CMakeFiles / innobase.dir / FTS / fts0config.cc.o   CMakeFiles / innobase.dir / FTS / fts0opt.cc.o   CMakeFiles / innobase.dir / FTS / fts0pars.cc.o   CMakeFiles / innobase.dir / FTS / fts0que.cc.o   CMakeFiles / innobase.dir / FTS / fts0sql.cc.o   CMakeFiles / innobase.dir / FTS / fts0tlex.cc.o   CMakeFiles / innobase.dir /处理器/ ha_innodb.cc.o   CMakeFiles / innobase.dir /处理器/ handler0alter.cc.o   CMakeFiles / innobase.dir /处理器/ i_s.cc.o   CMakeFiles / innobase.dir / IBUF / ibuf0ibuf.cc.o   CMakeFiles / innobase.dir /锁/ lock0iter.cc.o   CMakeFiles / innobase.dir /锁/ lock0lock.cc.o   CMakeFiles / innobase.dir /锁/ lock0wait.cc.o   CMakeFiles / innobase.dir /日志/ log0log.cc.o   CMakeFiles / innobase.dir /日志/ log0recv.cc.o   CMakeFiles / innobase.dir /马赫/ mach0data.cc.o   CMakeFiles / innobase.dir / MEM / mem0mem.cc.o   CMakeFiles / innobase.dir / MEM / mem0pool.cc.o   CMakeFiles / innobase.dir /地铁/ mtr0log.cc.o   CMakeFiles / innobase.dir /地铁/ mtr0mtr.cc.o   CMakeFiles / innobase.dir / OS / os0file.cc.o   CMakeFiles / innobase.dir / OS / os0proc.cc.o   CMakeFiles / innobase.dir / OS / os0sync.cc.o   CMakeFiles / innobase.dir / OS / os0thread.cc.o   CMakeFiles / innobase.dir /页/ page0cur.cc.o   CMakeFiles / innobase.dir /页/ page0page.cc.o   CMakeFiles / innobase.dir /页/ page0zip.cc.o   CMakeFiles / innobase.dir /帕/ lexyy.cc.o   CMakeFiles / innobase.dir /帕/ pars0grm.cc.o   CMakeFiles / innobase.dir /帕/ pars0opt.cc.o   CMakeFiles / innobase.dir /帕/ pars0pars.cc.o   CMakeFiles / innobase.dir /帕/ pars0sym.cc.o   CMakeFiles / innobase.dir /阙/ que0que.cc.o   CMakeFiles / innobase.dir /读/ read0read.cc.o   CMakeFiles / innobase.dir / REM / rem0cmp.cc.o   CMakeFiles / innobase.dir / REM / rem0rec.cc.o   CMakeFiles / innobase.dir /行/ row0ext.cc.o   CMakeFiles / innobase.dir /行/ row0ftsort.cc.o   CMakeFiles / innobase.dir /行/ row0import.cc.o   CMakeFiles / innobase.dir /行/ row0ins.cc.o   CMakeFiles / innobase.dir /行/ row0merge.cc.o   CMakeFiles / innobase.dir /行/ row0mysql.cc.o   CMakeFiles / innobase.dir /行/ row0log.cc.o   CMakeFiles / innobase.dir /行/ row0purge.cc.o   CMakeFiles / innobase.dir /行/ row0row.cc.o   CMakeFiles / innobase.dir /行/ row0sel.cc.o   CMakeFiles / innobase.dir /行/ row0uins.cc.o   CMakeFiles / innobase.dir /行/ row0umod.cc.o   CMakeFiles / innobase.dir /行/ row0undo.cc.o   CMakeFiles / innobase.dir /行/ row0upd.cc.o   CMakeFiles / innobase.dir /行/ row0quiesce.cc.o   CMakeFiles / innobase.dir /行/ row0vers.cc.o   CMakeFiles / innobase.dir / SRV / srv0conc.cc.o   CMakeFiles / innobase.dir / SRV / srv0mon.cc.o   CMakeFiles / innobase.dir / SRV / srv0srv.cc.o   CMakeFiles / innobase.dir / SRV / srv0start.cc.o   CMakeFiles / innobase.dir /同步/ sync0arr.cc.o   CMakeFiles / innobase.dir /同步/ sync0rw.cc.o   CMakeFiles / innobase.dir /同步/ sync0sync.cc.o   CMakeFiles / innobase.dir / TRX / trx0i_s.cc.o   CMakeFiles / innobase.dir / TRX / trx0purge.cc.o   CMakeFiles / innobase.dir / TRX / trx0rec.cc.o   CMakeFiles / innobase.dir / TRX / trx0roll.cc.o   CMakeFiles / innobase.dir / TRX / trx0rseg.cc.o   CMakeFiles / innobase.dir / TRX / trx0sys.cc.o   CMakeFiles / innobase.dir / TRX / trx0trx.cc.o   CMakeFiles / innobase.dir / TRX / trx0undo.cc.o   CMakeFiles / innobase.dir在/ usr / usr0sess.cc.o   CMakeFiles / innobase.dir / UT / ut0bh.cc.o   CMakeFiles / innobase.dir / UT / ut0byte.cc.o   CMakeFiles / innobase.dir / UT / ut0crc32.cc.o   CMakeFiles / innobase.dir / UT / ut0dbg.cc.o   CMakeFiles / innobase.dir / UT / ut0list.cc.o   CMakeFiles / innobase.dir / UT / ut0mem.cc.o   CMakeFiles / innobase.dir / UT / ut0rbt.cc.o   CMakeFiles / innobase.dir / UT / ut0rnd.cc.o   CMakeFiles / innobase.dir / UT / ut0ut.cc.o   CMakeFiles / innobase.dir / UT / ut0vec.cc.o   CMakeFiles / innobase.dir / UT / ut0wqueue.cc.o   ../../libservices/libmysqlservices.a   -Wl,-bundle_loader,/ tmp / mariadb-0ocIfC / mariadb-10.0.15 / sql / mysqld /usr/local/lib/libz.dylib /usr/local/lib/libz.dylib   /Users/7stud/.homebrew/Cellar/cmake/3.1.0/bin/cmake -E   cmake_progress_report /tmp/mariadb-0ocIfC/mariadb-10.0.15/CMakeFiles   19 20 21 22 23 24 25 26 27 28 [95%]建立目标innobase使:***   [全部]错误2

     

请阅读:http://git.io/brew-troubleshooting

     

这些开放的问题也可能有所帮助:mysql-connector-c ++无法构建   mariadb(https://github.com/Homebrew/homebrew/issues/34578)包   mariadb不满足--with-mysql选项   (https://github.com/Homebrew/homebrew/issues/32973)mariadb:失踪   /usr/local/etc/my.cnf.d,由brew prune删除   (https://github.com/Homebrew/homebrew/issues/31760)〜$

1 个答案:

答案 0 :(得分:0)

请你试试这个:

brew update
brew doctor
brew install mariadb

参考https://mariadb.com/kb/en/mariadb/building-mariadb-on-mac-os-x-using-homebrew/