在Mac OS X 10.7.2上构建libjingle时出现错误,例如“错误:string.h:没有这样的文件或目录". [英] error at building libjingle on Mac OS X 10.7.2 like "error: string.h: No such file or directory"

查看:119
本文介绍了在Mac OS X 10.7.2上构建libjingle时出现错误,例如“错误:string.h:没有这样的文件或目录".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Mac OS X 10.7.2上构建libjingle.当我根据libjingle的自述文件运行$path_to_swtoolkit/hammer.sh时,输出如下.

I failed to build libjingle on Mac OS X 10.7.2. The output was the following when I run $path_to_swtoolkit/hammer.sh according to the README of libjingle.

MBP17:talk rei25$ ~/Desktop/swtoolkit/hammer.sh
scons: Reading SConscript files ...

scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/rei25/Desktop/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
third_party/expat-2.0.1/lib/xmlparse.c:6:48: error: string.h: No such file or directory
third_party/expat-2.0.1/lib/xmlparse.c:7:20: error: assert.h: No such file or directory
In file included from third_party/expat-2.0.1/lib/xmlparse.c:24:
third_party/expat-2.0.1/lib/expat.h:17:20: error: stdlib.h: No such file or directory
cc1: warnings being treated as errors
third_party/expat-2.0.1/lib/xmlparse.c: In function 'parserCreate':
third_party/expat-2.0.1/lib/xmlparse.c:719: warning: implicit declaration of function 'malloc'
third_party/expat-2.0.1/lib/xmlparse.c:719: warning: incompatible implicit declaration of built-in function 'malloc'
third_party/expat-2.0.1/lib/xmlparse.c:723: error: 'realloc' undeclared (first use in this function)
third_party/expat-2.0.1/lib/xmlparse.c:723: error: (Each undeclared identifier is reported only once
third_party/expat-2.0.1/lib/xmlparse.c:723: error: for each function it appears in.)
third_party/expat-2.0.1/lib/xmlparse.c:724: error: 'free' undeclared (first use in this function)
third_party/expat-2.0.1/lib/xmlparse.c: In function 'parserInit':
third_party/expat-2.0.1/lib/xmlparse.c:848: warning: implicit declaration of function 'memset'
third_party/expat-2.0.1/lib/xmlparse.c:848: warning: incompatible implicit declaration of built-in function 'memset'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'XML_Parse':
third_party/expat-2.0.1/lib/xmlparse.c:1543: warning: implicit declaration of function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c:1543: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'XML_GetBuffer':
third_party/expat-2.0.1/lib/xmlparse.c:1627: warning: implicit declaration of function 'memmove'
third_party/expat-2.0.1/lib/xmlparse.c:1627: warning: incompatible implicit declaration of built-in function 'memmove'
third_party/expat-2.0.1/lib/xmlparse.c:1656: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'XML_GetParsingStatus':
third_party/expat-2.0.1/lib/xmlparse.c:1750: warning: implicit declaration of function 'assert'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'storeRawNames':
third_party/expat-2.0.1/lib/xmlparse.c:2009: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'doContent':
third_party/expat-2.0.1/lib/xmlparse.c:2424: warning: implicit declaration of function 'memcmp'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'storeAtts':
third_party/expat-2.0.1/lib/xmlparse.c:2922: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c:2931: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'addBinding':
third_party/expat-2.0.1/lib/xmlparse.c:3039: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'lookup':
third_party/expat-2.0.1/lib/xmlparse.c:5871: warning: incompatible implicit declaration of built-in function 'memset'
third_party/expat-2.0.1/lib/xmlparse.c:5898: warning: incompatible implicit declaration of built-in function 'memset'
third_party/expat-2.0.1/lib/xmlparse.c:5927: warning: incompatible implicit declaration of built-in function 'memset'
third_party/expat-2.0.1/lib/xmlparse.c: In function 'poolGrow':
third_party/expat-2.0.1/lib/xmlparse.c:6112: warning: incompatible implicit declaration of built-in function 'memcpy'
third_party/expat-2.0.1/lib/xmlparse.c:6148: warning: incompatible implicit declaration of built-in function 'memcpy'
scons: *** [build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o] Error 1
scons: building terminated because of errors.

我确定Mac中是否存在string.hassert.h等. 我还尝试了cd到目录expat-2.0.1并运行./configuremake,并成功了. 我已经在网上搜索了此问题,对我来说似乎没有用.所以,如果您知道为什么,谢谢您告诉我!

I'm sure about the existence of string.h, assert.h and so on in my Mac. I also tried cd to the directory expat-2.0.1 and run ./configure and make, and succeeded. I've searched the web for this problem and it seems nothing useful to me. So, if you know why, thank you for telling me!

PS我的问题似乎是这样的: http://groups.google.com/group/googletestframework/browse_thread/thread/e8ed5a3f410b7ec7/a8ba72e727801fc8?show_docid=a8ba72e727801fc8

P.S My problem seems to be like this one: http://groups.google.com/group/googletestframework/browse_thread/thread/e8ed5a3f410b7ec7/a8ba72e727801fc8?show_docid=a8ba72e727801fc8

推荐答案

狮子也遇到了同样的问题.正如Wayon所指出的那样,似乎开发人员已将特定的SDK版本"/Developer/SDKs/MacOSX10.5.sdk"硬编码.截止发稿时,Xcode 4随附的最新版本是10.7.修复了构建中还有其他几个问题之后,我不确定它们是否与OS X有关,或者只是损坏的构建脚本而已.对于lib叮当.

I had the same problem with lion. As wayon pointed out it's appears the developers hardcoded a particular SDK version "/Developer/SDKs/MacOSX10.5.sdk". As of the time of posting, the latest version is 10.7 which comes with Xcode 4. After fixing that there were a couple other issues with the build, I'm not sure if they're related to OS X or just a broken build script for lib jingle.

这是修复我发现的其他问题的补丁, libjingle补丁. 另外,您可能必须通过 stackoverflow swtoolkit修复来修复swtoolkit.

Here's the patch which fixes the other issues I found, libjingle patch. Also, you'll probably have to fix swtoolkit via stackoverflow swtoolkit fix.

我还没有检查单元测试是否通过,但至少现在可以编译.

I haven't checked if the unit tests pass, but at least it compiles now.

这篇关于在Mac OS X 10.7.2上构建libjingle时出现错误,例如“错误:string.h:没有这样的文件或目录".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆