大厦Portaudio在OSX 10.7.5使用SDK10.6或10.7失败 [英] Building Portaudio on OSX 10.7.5 using SDK10.6 or 10.7 fails

查看:260
本文介绍了大厦Portaudio在OSX 10.7.5使用SDK10.6或10.7失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仍然有麻烦建设Portaudio库我的系统,这是OSX 10.7.5使用X code 4.3.2,无需安装命令行工具和在

  /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

我描述不久(也为其他人遇到了同样的问题)是我迄今所做的(以下不同的解决方案我已经在网络上找到)。

1)我下载了Portaudio/ pa_stable_v19_20111121.tgz(最后的稳定版)来源:


  

    

www.portaudio.com/download.html


  

2)我读了这里建设Portaudio的说明:


  

    

www.portaudio.com/docs/v19-doxydocs/compile_mac_coreaudio.html


  

,并试图从终端窗口编译建议的命令:


  

    

./配置及放大器;&安培;让


  

这导致(不那么奇怪)在很多结尾错误:

LLVM-GCC-4.2:错误尝试给exec'/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2':execvp:没有这样的文件或目录
脂:无法打开输入文件:/var/folders/1_/xkp08ky561jg02zjjrpsxg940000gn/T//ccPxCTrJ.out(没有这样的文件或目录)
令: * 的[SRC / hostapi / CoreAudio的/ pa_mac_core.lo]错误1

这是因为竞价排名是不是因为OSX 10.5不再支持。此外,该开发文件夹不存在对OSX 10.7,而且是在开发人员的文件夹移动到一切

  /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

3)我下载了一个补丁(mac_configure_patch.txt)修复从配置:


  

    

https://www.assembla.com/spaces/portaudio /票/ 216#/活动/票务


  

和它复制到portaudio目录并通过在终端中输入应用吧:


  

    

$贴剂下; mac_configure_patch.txt


  

一个确认消息说:


  

    

补丁文件configure.in


  

所以,一切似乎很动听。但还是Portaudio正在努力建立竞价排名。

4)现在我设定的ARCHFLAGS,CFLAGS,LDFLAGS只建立i386硬件架构如下(禁用通用版本):


  

    

$ MACOSX_DEPLOYMENT_TARGET =10.7ARCHFLAGS = - 拱i386的CFLAGS = - O2 -g -Wall -isysroot /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/软件开发工具包/ MacOSX10.7.sdk -arch i386的-mmacosx版本分钟= 10.7LDFLAGS = - isysroot /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10 .7.sd -arch i386的-mmacosx版本分钟= 10.7的./configure --disable-MAC-通用


  

5)另外我发现:


  

A):在.INCLUDE / pa_mac_core.h应该取消注释

的#include AudioToolbox.h
  
  

B):认为-Werror,从生成文件(不Makefile.in)应该被删除


accoding到:
http://www.fluxforge.com/blog/building -portaudio-下-OS-X-107-狮子

6)现在,我尝试建立(使用:命令使),编制启动,但但失败:


  

    

LD:框架没有找到CoreAudio的


    
    

collect2:LD返回1退出状态


    
    

请: * 的[LIB / libportaudio.la]错误1


  

7)所以我尝试使用指向框架-F /系统/库/框架-framework CoreAudio的

导致以下终端命令:


  

    

$ MACOSX_DEPLOYMENT_TARGET =10.7ARCHFLAGS = - 拱i386的CFLAGS = - O2 -g -Wall -isysroot /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/软件开发工具包/ MacOSX10.7.sdk -arch i386的-mmacosx版本分钟= 10.7LDFLAGS = - isysroot /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10 .7.sd -arch i386的-mmacosx版本分钟= 10.7 -F /系统/库/框架-framework CoreAudio的的./configure --disable-MAC-通用


  

这似乎解决CoreAudio的框架问题,但会导致另一个错误说:


  

    

LD:找不到-lSystem库


    
    

collect2:LD返回1退出状态


    
    

请: * 的[LIB / libportaudio.la]错误1


  

我现在被困在这一点上。试图建立Portaudio在OSX 10.7使用SDK10.6或SDK10.7时,有没有人遇到相同的问题。有没有人找到解决如何从终端打造Portaudio?
我对任何提示非常感谢!
在此先感谢!


解决方案

OK,最后我解决了这个问题。希望解决方案将帮助其他人。我只是忘了还路径添加到CoreAudio的框架的CFLAGS。下面是最终配置/构建命令使用SDK10.7为i386硬件架构和放大器在OSX 10.7.5建设portaudio; x86_64的:

在portaudio目录,键入打开一个终端窗口:


  

    

MACOSX_DEPLOYMENT_TARGET =10.7ARCHFLAGS = - 拱i386的CFLAGS = - O2 -g -Wall -isysroot /Applications/X$c$c.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs /MacOSX10.7.sdk -arch i386的-mmacosx版本分钟= 10.7 -F /系统/库/框架-framework CoreAudio的LDFLAGS = - isysroot /Applications/X$c$c.app/Contents/Developer/Platforms /MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -arch i386的-mmacosx版本分钟= 10.7 -F /系统/库/框架-framework CoreAudio的的./configure --disable-MAC-通用


  

如果这个已经完成,你需要编辑的Makefile 和改变的 -Werror 提至 -Wall

然后:


  

    


  

瞧。有你有在portaudio / lib目录下的libportaudio.la。现在,您可以键入


  

    

须藤使安装


  

(你会被要求使用密码确认)

把库中的系统目录下。

终于可以更动Portaudio!
玩得开心!

I am still having trouble building the Portaudio library on my system, which is OSX 10.7.5 with Xcode 4.3.2, having Command Line Tools installed and having SDK10.6 and SDK10.7 under

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

I describe shortly (also for others that run into the same problem) what I have done so far (following different solutions I have found on the web).

1) I downloaded "Portaudio" / pa_stable_v19_20111121.tgz (last stable release) from:

www.portaudio.com/download.html

2) I read the instructions on building Portaudio here:

www.portaudio.com/docs/v19-doxydocs/compile_mac_coreaudio.html

and tried to compile from a Terminal window with the suggested command:

./configure && make

This resulted (not so surprisingly) in a lot of errors ending with:

llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory lipo: can't open input file: /var/folders/1_/xkp08ky561jg02zjjrpsxg940000gn/T//ccPxCTrJ.out (No such file or directory) make: * [src/hostapi/coreaudio/pa_mac_core.lo] Error 1

This happens because "ppc" is not supported anymore since OSX 10.5. Moreover the "Developer" folder doesn't exist on OSX 10.7 and everything that was in the Developer folder has moved to

   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

3) I downloaded a patch (mac_configure_patch.txt) to fix "configure" from:

https://www.assembla.com/spaces/portaudio/tickets/216#/activity/ticket:

and copied it to the portaudio directory and applied it by typing in Terminal:

$ patch < mac_configure_patch.txt

A confirmation message said:

patching file configure.in

So everything seems fine. But still Portaudio is trying to build for "ppc".

4) Now I set the ARCHFLAGS, CFLAGS, LDFLAGS to only build for architecture i386 as follows (disabling universal build):

$ MACOSX_DEPLOYMENT_TARGET="10.7" ARCHFLAGS="-arch i386" CFLAGS="-O2 -g -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -arch i386 -mmacosx-version-min=10.7" LDFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sd -arch i386 -mmacosx-version-min=10.7" ./configure --disable-mac-universal

5) Further I found that:

A): "#include AudioToolbox.h" in ".include/pa_mac_core.h" should be UNCOMMENTED

B): that "-wError" from "Makefile" (not Makefile.in) should be removed.

accoding to: http://www.fluxforge.com/blog/building-portaudio-under-os-x-107-lion

6) Now I try to build (using: "sudo make"), compilation starts but but fails with:

ld: framework not found CoreAudio

collect2: ld returned 1 exit status

make: * [lib/libportaudio.la] Error 1

7) So I try to point to the framework using "-F/System/Library/Frameworks -framework CoreAudio"

leading to the following Terminal command:

$ MACOSX_DEPLOYMENT_TARGET="10.7" ARCHFLAGS="-arch i386" CFLAGS="-O2 -g -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -arch i386 -mmacosx-version-min=10.7" LDFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sd -arch i386 -mmacosx-version-min=10.7 -F/System/Library/Frameworks -framework CoreAudio" ./configure --disable-mac-universal

which seems to fix the CoreAudio framework issue but results in another error saying:

ld: library not found for -lSystem

collect2: ld returned 1 exit status

make: * [lib/libportaudio.la] Error 1

I am now stuck at this point. Did anyone experience the same problems when trying to build Portaudio on OSX 10.7 using SDK10.6 or SDK10.7. Did anyone find a solution to how to build Portaudio from Terminal? I am very thankful for any hints!!! Thanks in advance!

解决方案

OK, finally I solved the issue. Hope the solution will help others as well. I just forgot to also add the path to the CoreAudio framework to the CFLAGS. Here is the final configure/build command for building portaudio on OSX 10.7.5 using SDK10.7 for architecture i386 & x86_64:

Open a Terminal window in the portaudio directory and type:

MACOSX_DEPLOYMENT_TARGET="10.7" ARCHFLAGS="-arch i386" CFLAGS="-O2 -g -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -arch i386 -mmacosx-version-min=10.7 -F/System/Library/Frameworks -framework CoreAudio" LDFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -arch i386 -mmacosx-version-min=10.7 -F/System/Library/Frameworks -framework CoreAudio" ./configure --disable-mac-universal

If this has finished, you need to edit Makefile and change the mention of -Werror to -Wall.

Then:

make

Voila. There you have your "libportaudio.la" in the portaudio/lib directory. You can now type

sudo make install

(you'll be asked to confirm using your password)

to put the library in the system directory.

Finally you can mess around with Portaudio! Have fun!

这篇关于大厦Portaudio在OSX 10.7.5使用SDK10.6或10.7失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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