error at building libjingle on Mac OS X 10.7.2 like “error: string.h: No such file or directory”

谁说胖子不能爱 提交于 2019-12-02 09:41:52
user1066381

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.

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.

I had the same issue.

In my case the issue was caused by the wrong CCFLAGS in the main.scons file in the directory 'talk' (top level of the source tree). There was a wrong path for '-isysroot' argument:

CCFLAGS = [ '-arch', 'i386', '-isysroot', '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk',

'-fasm-blocks', ],

There was not iPhoneSimulator4.0.sdk on my mac, only iPhoneSimulator4.3.sdk and iPhoneSimulator5.0.sdk.

So, I just replaced 4.0 to 5.0 and got the following:

CCFLAGS = [ '-arch', 'i386', '-isysroot', '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk', '-fasm-blocks', ],

It helped to me.

To resolve the issue try the following:

  1. Check what version of sdk you've got in the folder /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
  2. Set an appropriate path for -isysroot argument in the main.scons file at the top of source tree (in my case it's ilibjingle/gtalk/libjingle-0.5/talk):

Then try to run $path_to_swtoolkit/hammer.sh again.

I hope it will help you.

Try to add the following include to your main.scons file:

main.scons:

... // more than 300 lines and the you will find the mac_env section

mac_env.Append(
  CPPDEFINES = [
    'OSX',
  ],
  CCFLAGS = [
    '-m32',
    '-arch', 'i386',
    '-isysroot', '/Developer/SDKs/MacOSX10.5.sdk',
    '-fasm-blocks',
    '-I/usr/include', <--- Add this line and this will tell to scons where is your includes
...
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!