[转]在 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,网上有许多教程,但是多数的时间比较早了,版本 ...
随机推荐
- js 正则学习小记之左最长规则
原文:js 正则学习小记之左最长规则 昨天我在判断正则引擎用到的方法是用 /nfa|nfa not/ 去匹配 "nfa not",得到的结果是 'nfa'.其实我们的本意是想得到整 ...
- 经Apache将tomcat转用80port这两个域名
一般用tomcat通告Java web项目采用www.xxx.com:8080/appname/xxxservlet要访问一个简单的服务,这会'暴漏'应用程序名称(当然,你也可以摆脱),它看起来并不规 ...
- 基于Linux平台病毒BlackHole病毒的决心
今天会见了病毒,少量的代码,但在使用小漏洞的函数的,真正的杀伤力相当惊人. 转载请注明出处:http://blog.csdn.net/u010484477谢谢^_^ watermark/2/text/ ...
- 从头开始学JavaScript (四)——操作符
原文:从头开始学JavaScript (四)--操作符 一.一元操作符 1.自增自减操作符:分为前置型和后置型: 前置型:++a;--a; 后置型:a++;a--; 例: <script typ ...
- BZOJ 1355 Baltic2009 Radio Transmission KMP算法
标题效果:给定一个字符串,求最小周期节(不能整除) 示例Hint这是错误的忽略了就好了 环路部分应该是cab 这个称号充分利用KMP在next自然阵列,那是,n-next[n]它表示一个循环节 POJ ...
- PHP移动互联网的发展票据(6)——MySQL召回数据库基础架构[1]
原文地址 :http://www.php100.com/html/php/api/2014/0326/6707.html 一.数据类型 1.整型 数据类型 存储空间 说明 取值范围 TINYINT 1 ...
- 搜集朋友写的几篇Android Elf相关的文档
对android elf的资料学习,多数是在看雪找的资料,另一部分朋友的研究,当然,给他们提议过整理成一系列文章,只是大家工作都太忙,也都没顾上,这里简单整理放上一些pdf的资料,有兴趣的朋友能够看看 ...
- python解析Yahoo的XML格式的天气预报,获取当天和近期几天的天气:
下面是接口xml格式数据: <rss xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo=& ...
- file 上传文件后缀名 限制
比如: 要求只能上传Excel <input type="file" accept="application/vnd.ms-excel,application/vn ...
- C语言库函数大全及应用实例三
原文:C语言库函数大全及应用实例三 [编程资料]C语言库函数大全及应用实例三 函数名: ecvt 功 能: 把一个浮点数转换为字符串 用 法: char ecvt(double value, int ...