[转]在 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,网上有许多教程,但是多数的时间比较早了,版本 ...
随机推荐
- WIN phone 8.1 SDK 坑遇到 Hyper-V
先声明! 仅限WIN操作系统下 ! 事实上 Hyper-V 就是个虚拟机 ,是微软弄出来和 VM 争市场的.(所以Hyper-V中你随便安装什么系统都行,可是 Hyper-V必须 安装在WIN下) ...
- Struts2流程
Struts2流程 1.client浏览器初始化时发出HTTP请求 2.依据web.xml配置,上述请求被FilterDispatcher接收 3.依据struts.xml配置,找到须要调用的Acti ...
- python_random随机
在数据清洗,评估 ,抽验等等过程中,经常有这样的应用场景 : 需要在一个大的数据集合中随机出来样本,进行人工评估.为了保证足够随机,借助脚本来实现. 下面一个脚本 ,用于应对这种应用场景. 使用方法 ...
- 【MySQL案件】mysql登录-S失败
1.1.1. mysql登录mysql时间,-S参数失效 [环境的叙述性说明] mysql5.5.14 [问题叙述性说明] 配置多个实例 实例1 实例2 datadir /home/mysql_330 ...
- android--解--它们的定义tabhost(动态添加的选项+用自己的主动性横向滑动标签+手势切换标签页和内容特征)
在本文中,解决他们自己的定义tabhost实现,并通过代码集成动态加入标签功能.自己主动标签横向滑动功能.和手势标签按功能之间切换. 我完成了这个完美的解决方案一起以下: 1.定义tabwidget布 ...
- Linq实现对XML的简单增删查改
一.传统DOM创建XML方法 private static void CreateXmlDocWithDom() { XmlDocument doc =new XmlDocument(); XmlEl ...
- linux_后台启动多个java -jar 程序,及关闭
启动脚本 startup.sh #!/bin/bash x=$(($)) )) do java -jar /home/chenpenghui/crawler/crawler-hb/StartUpIp. ...
- SQL Server AlwaysON 同步模式的疑似陷阱
原文:SQL Server AlwaysON 同步模式的疑似陷阱 SQL Server 2012 推出的最重要的功能之一Alwayson,是一个集之前Cluster和Mirror于一体的新功能,即解决 ...
- QTP 11.05下载并完成+皴
下载链接: QQ:1010305129 QTP11.50 下载地址: 迅雷下载:http://kuai.xunlei.com/d/HhEvBQJ..AAgxtNQada 电驴下载地址:ed2k://| ...
- 安卓MonkeyRunner源码分析之启动
在工作中因为要追求完成目标的效率,所以更多是强调实战,注重招式,关注怎么去用各种框架来实现目的.但是如果一味只是注重招式,缺少对原理这个内功的了解,相信自己很难对各种框架有更深入的理解. 从几个月前开 ...