我正在尝试在我的Mac机上安装Gammu。我已经安装了cmake&还有Apple Developer Command Line Tools。
当我运行./configure
时,我得到了以下信息:
Avi-MacBook-Pro:gammu-1.32.0 avi$ ./configure
Wrapper script for configuring CMake for Gammu.
This provides limited compatibility with configure, if you want full
configuration control, use directly CMake. More information about CMake
is available at <http://www.cmake.org>.
-- Configuring Gammu 1.32.0
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Threads (missing: Threads_FOUND)
-- MySQL not found.
-- Found PostgreSQL: /usr/include, /usr/lib/libpq.dylib
-- libdbi not found.
-- Could NOT find Libintl (missing: LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND)
-- glib-2.0 not found.
-- gobject-2.0 not found.
-- Bluez not found.
-- Using OSX Bluetooth stack
-- Bluetooth support enabled
-- libusb-1.0 not found.
-- Nokia support enabled
-- Nokia MBUS2 protocol enabled
-- Nokia FBUS2 protocol enabled
-- Nokia FBUS2DLR3 protocol enabled
-- Nokia DKU2PHONET protocol enabled
-- Nokia DKU2AT protocol enabled
-- Nokia DKU5FBUS2 protocol enabled
-- Nokia FBUS2PL2303 protocol enabled
-- Nokia FBUS2BLUE protocol enabled
-- Nokia PHONETBLUE protocol enabled
-- Nokia BLUEFBUS2 protocol enabled
-- Nokia BLUEPHONET protocol enabled
-- Nokia 3320 and compatible phones support enabled
-- Nokia 650 and compatible phones support enabled
-- Nokia 61xx and compatible phones support enabled
-- Nokia 6510 and compatible phones support enabled
-- Force using 6210 frames for calendar for DCT4 phones disabled
-- Nokia 7110 and compatible phones support enabled
-- Nokia 9210 and compatible phones support enabled
-- Nokia 3650 and compatible phones support enabled
-- AT support enabled
-- AT protocol enabled
-- AT protocol over Bluetooth enabled
-- AT phones support enabled
-- Alcatel support enabled
-- Alcatel protocol enabled
-- Alcatel phones support enabled
-- OBEX compatible phones support enabled
-- OBEX protocol over Bluetooth enabled
-- Generic OBEX phones support enabled
-- AT with OBEX phones support enabled
-- Symbian phones support (S60) enabled
-- Symbian phones support (gnapplet) enabled
-- GNAPBUS protocol over Bluetooth enabled
-- Gnapplet phones support enabled
-- S60 phones support enabled
-- Cell Broadcast messages support enabled
-- Backup/Restore functions enabled
/var/lock is not writable, skipping locking tests!
-- Init script not being installed, install it by -DINSTALL_LSB_INIT=ON
-- Udev rules not being installed, install it by -DINSTALL_UDEV_RULES=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/avi/Desktop/gam/gammu-1.32.0/build-configure
当我运行make
时,我收到错误:
Avi-MacBook-Pro:gammu-1.32.0 avi$ make
make -C build-configure
[ 1%] Building C object helper/CMakeFiles/string.dir/string.o
In file included from /Users/avi/Desktop/gam/gammu-1.32.0/helper/string.c:1:
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:14:10: error: 'string.h'
file not found with <angled> include; use "quotes" instead
#include <string.h>
^~~~~~~~~~
"string.h"
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:39:57: error: unknown type
name 'size_t'
extern int strncasecmp (const char *s1, const char *s2, size_t n);
^
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:58:1: error: unknown type
name 'wchar_t'
wchar_t towlower (wchar_t c);
^
/Users/avi/Desktop/gam/gammu-1.32.0/helper/string.h:58:22: error: unknown type
name 'wchar_t'
wchar_t towlower (wchar_t c);
^
In file included from /Users/avi/Desktop/gam/gammu-1.32.0/helper/string.c:3:
/Users/avi/Desktop/gam/gammu-1.32.0/build-configure/helper/../include/gammu-unicode.h:18:10: fatal error:
'wchar.h' file not found
#include <wchar.h>
^
5 errors generated.
make[3]: *** [helper/CMakeFiles/string.dir/string.o] Error 1
make[2]: *** [helper/CMakeFiles/string.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
答案 0 :(得分:0)
您的问题与CMake无关。您的C编译器找不到C标准中定义的某些标头。那是经过考验的,可能与Gammu无关。
你能检查一下你是否可以编译一个简单的hello word C测试程序,包括哪些?如果失败,则必须修复编译器。
答案 1 :(得分:0)
它丢失了很多文件,你必须得到几个丢失的文件,特别是当你为服务器使用MAMP时。这就是我成功在我的mac上安装gammu的方法
要在Mac OS X上安装gammu,您需要: Mac OS X 10.8.4, Xcode 4.6.3, MAMP 2.1.4&amp;来自mysql.com的Mysql(用于头文件和库文件) Gammu 1.33.0, Cmake 2.8.11.2&amp;使用Homebrew包管理器安装它。
使用命令行工具安装xcode 安装MAMP
安装Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
然后,您可以使用以下命令安装cmake:
$ brew install cmake
下载gammu
http://sourceforge.net/projects/gammu/files/gammu/1.33.0/gammu-1.33.0.tar.gz
将其解压缩并放入您的主文件夹
$ ./configure
$ make
使用MAMP时:
MAMP没有必要的头文件和库文件,所以要让他们从mysql.com安装mysql选择64位osx 10.8
将来自源代码安装的头文件或包含它们的二进制安装(Mountain Lion的MySQL二进制文件包括这些)从/ usr / local / mysql / include复制到/ Applications / MAMP / Library / include。< / p>
要访问/ usr / local,您可以在safari&amp;中键入/usr/local/mysql/lib/libmysqlclient_r.dylib。点击“输入”,您将被定向到查找器中的该文件。
$ /bin/ls -1 /usr/local/mysql/lib/libmysqlclient* | xargs -t -n1 -I% ln -fs % /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient.18.dylib /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient.a /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient.dylib /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient_r.18.dylib /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient_r.a /Applications/MAMP/Library/lib/
ln -fs /usr/local/mysql/lib/libmysqlclient_r.dylib /Applications/MAMP/Library/lib/
现在,让我们用mysql支持编译gammu,像往常一样提取gammu,编辑cmake / FindMySQL.cmake,添加你的MAMP mysql路径,它应该是这样的:
find_program(MYSQL_CONFIG mysql_config
${MYSQL_CONFIG_PREFER_PATH}
/usr/local/bin/
/usr/bin/
/Applications/MAMP/Library/bin
/Applications/MAMP/Library
)
然后,让我们配置cmake:
$ mkdir build
$ cd build
$ cmake -DMYSQL_LIBRARIES=/Applications/MAMP/Library/lib/libmysqlclient_r.dylib ..
$ make
$ sudo make install
我希望这可以帮助你安装gammu。