[转]在 Mac OS X上编译 libimobiledevice 的方法
link: http://blog.boceto.fr/2012/05/05/libimobiledevice-for-macosx/
The objective of the day: Compiler libimobiledevice for macosx.
The objective is to be able to deploy the apps generated with jembe directly to your iphone or ipad without using itunes.
I will describe the whole compilation process. If you are only interested on the binary, go directly to the download section
I already write some post here to explain how to create the cross compiler and use it. I also write about the issues on compiling the dependencies. If you need to redo all the work, you can read these posts:
Start downloading the sources here.
Then, while trying to compile libimobiledevice, there are some more issues. So I go for the simplest solution:
- Do not compile python binding (–without-cython)
- configure complains on largefile ?! (–disable-largfile)
- An issue with malloc and realloc! (ac_cv_func_realloc_0_nonnull and ac_cv_func_malloc_0_null)
- A linker issue with inline function debug_buffer (You will have to remove the inline directive)
|
1
2
3
|
export ac_cv_func_realloc_0_nonnull=yesexport ac_cv_func_malloc_0_nonnull=yesPKG_CONFIG_PATH=/home/benoit/workspace/imobiledevice/binary/mac/lib/pkgconfig/ ../configure --host=i386-apple-darwin --target=i386-apple-darwin --prefix=/home/benoit/workspace/imobiledevice/binary/mac/ --without-cython --disable-largefile |
Great… We already have some very interesting tools like idevicesyslog. But we also need the installer.
So download the ideviceinstaller sources and just compile. I don’t had any issue here.
You can test the binary here. It works fine, but you have to define the DYLD_LIBRARY_PATH to use it, because all links are absolute by default. You can view the problem using otool utility:
|
1
2
3
4
5
6
7
8
9
10
11
|
$ /opt/compiler/mac/bin/i386-apple-darwin-otool -L bin/ideviceinstallerbin/ideviceinstaller: /home/benoit/workspace/imobiledevice/binary/mac/lib/libimobiledevice.3.dylib (compatibility version 4.0.0, current version 4.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.11) /home/benoit/workspace/imobiledevice/usbmuxd/build/libusbmuxd/libusbmuxd.2.dylib (compatibility version 2.0.0, current version 1.0.8) /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /home/benoit/workspace/imobiledevice/libplist/build/src/libplist.1.dylib (compatibility version 1.0.0, current version 1.1.8) /home/benoit/workspace/imobiledevice/binary/mac/lib/libzip.2.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) |
So you will have to use install_name_tool to update the links. For exemple:
|
1
|
$ /opt/compiler/mac/bin/i386-apple-darwin-install_name_tool -change /home/benoit/workspace/imobiledevice/binary/mac/lib/libimobiledevice.3.dylib @executable_path/../lib/libimobiledevice.3.dylib bin/ideviceinstaller |
At the end, you should have:
|
1
2
3
4
5
6
7
8
9
10
|
$ /opt/compiler/mac/bin/i386-apple-darwin-otool -L bin/ideviceinstaller bin/ideviceinstaller: @executable_path/../lib/libimobiledevice.3.dylib (compatibility version 4.0.0, current version 4.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.11) @executable_path/../lib/libusbmuxd.2.dylib (compatibility version 2.0.0, current version 1.0.8) /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) /home/benoit/workspace/imobiledevice/libplist/build/src/libplist.1.dylib (compatibility version 1.0.0, current version 1.1.8) @executable_path/../lib/libzip.2.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) |
That all. Download the imobiledevice binary!
[转]在 Mac OS X上编译 libimobiledevice 的方法的更多相关文章
- Mac OS X 上Lua的安装方法
先在Mac OS的终端查询下本机是否已安装Lua Last login: Thu Jul 10 07:54:48 on ttys000 keshans-Mac-mini:~ keshan$ lua - ...
- Mac OS X上尝试编译CoreCLR源代码
CoreCLR登陆GitHub之后,体验CoreCLR首当其冲的方式就是在自己的电脑上编译它,昨天分别在Windows与Linux上成功编译了CoreCLR,详见: 1)Windows上成功编译Cor ...
- 在Mac OS X上用自己编译出的CoreCLR运行.NET程序
当昨天被Mac OS X上无法编译CoreCLR的问题困扰时(详见Mac OS X上尝试编译CoreCLR源代码),后来发现这个难题竟然被神人@kangaroo给解决了,连CoreCLR的微软开发人员 ...
- 如何在Mac OS X上安装 Ruby运行环境
对于新入门的开发者,如何安装 Ruby和Ruby Gems 的运行环境可能会是个问题,本页主要介绍如何用一条靠谱的路子快速安装 Ruby 开发环境.此安装方法同样适用于产品环境! 系统需求 首先确定操 ...
- Mac OS X上用CoreCLR运行一个真正的.NET控制台程序
这个真正的控制台程序来自corefxlab,名叫CoreClrHelloWorld,是一个跨平台的.NET控制台演示程序,可以显示微软.Linux.苹果的logo. CoreClrHelloWorld ...
- Mac OS X上安装 Ruby运行环境
环境 对于新入门的开发者,如何安装 Ruby和Ruby Gems 的运行环境可能会是个问题,本页主要介绍如何用一条靠谱的路子快速安装 Ruby 开发环境.此安装方法同样适用于产品环境! 系统需求 ...
- Sqlite在Windows、Linux 和 Mac OS X 上的安装过程
一:在 Windows 上安装 SQLite 1,下载 请访问SQLite下载页面http://www.sqlite.org/download.html,从Windows 区下载预编译的二进制文件.需 ...
- Mac OS X上使用Wireshark抓包
Wireshark针对UNIX Like系统的GUI发行版界面采用的是X Window(1987年更改X版本到X11).Mac OS X在Mountain Lion之后放弃X11,取而代之的是开源的X ...
- Mac OS X 上安装 ASP.NET 5
在Mac OS X Yosemite 10.10.3 中搭建第一个 ASP.NET 5 Web 项目 终于有时间在 Mac 上安装一下 ASP.NET 5,网上有许多教程,但是多数的时间比较早了,版本 ...
随机推荐
- English is very important!
Well, as a college student,I haven't realized how important the English is . But as a web programmer ...
- 如何利用百度音乐播放器的API接口来获取高音质歌曲
第一步:在网页中打开以下网址: http://box.zhangmen.baidu.com/x?op=12&count=1&title=时间都去哪儿了$$王铮亮$$$$ 其中红色地方可 ...
- 使用ArcGIS API for Silverlight实现地形坡度在线分析
原文:使用ArcGIS API for Silverlight实现地形坡度在线分析 苦逼的研究生课程终于在今天结束了,也许从今以后再也不会坐在大学的课堂上正式的听老师讲课了,接下来的时间就得开始找工作 ...
- Unity插件之NGUI学习(6)—— 关于Widget怎样加入触发事件(触发OnClick)
NGUI中,Button本身就带有OnClick事件,可是Sprite,Label等( 也绑有Widget的)并没有触发事件,事实上NGUI的事件触发都必须加入Box Collider,并勾选Is T ...
- Hash散列算法 Time33算法
hash在开发由频繁使用.今天time33也许最流行的哈希算法. 算法: 对字符串的每一个字符,迭代的乘以33 原型: hash(i) = hash(i-1)*33 + str[i] ; 在使用时.存 ...
- linux_ubuntu12.04 安装 svn
sudo apt-get install subversion sudo mkdir /home/svn sudo svnadmin create /home/svn/repository cd /h ...
- Redis源代码分析(一)--Redis结构解析
从今天起,本人将会展开对Redis源代码的学习,Redis的代码规模比較小,很适合学习,是一份很不错的学习资料,数了一下大概100个文件左右的样子,用的是C语言写的.希望终于能把他啃完吧,C语言好久不 ...
- BCM策略路由交换芯片
BCM几个交换芯片的寄存器和相关的路由 EGR_L3_NEXT_HOP.EGR_L3_INTF.ING_L3_NEXT_HOP BCM XGS系列SDK中和路由相关的几个命令 l3 l3table. ...
- 【百度地图API】建立全国银行位置查询系统(五)——如何更改百度地图的信息窗口内容?
原文:[百度地图API]建立全国银行位置查询系统(五)--如何更改百度地图的信息窗口内容? 摘要: 酷讯.搜房.去哪儿网等大型房产.旅游酒店网站,用的是百度的数据库,却显示了自定义的信息窗口内容,这是 ...
- Redis MSET的极限在哪里
·背景 Redis以"快.准.狠"而著称,除了其主-从模式略失光彩(主从模式更多是被以讹传讹,3.0依旧在测试中),大部分的应用可谓尖兵利器.在一些常规写的时候,MSET和HMSE ...