Theos make成功,obj文件夹为空,make package失败


#1

按照书上的步骤,我一步步操作

先说说我的解决步骤:

(1)theos安装目录,发现当前用户组Andrew 没有 /opt/theos/bin 的rwx权限
MacBook-Pro:iosreproject Andrew$ ls -l /opt/Theos/bin
total 200
-rwxr-xr-x 1 root wheel 491 Dec 13 09:58 deb_build_num.sh
-rwxr-xr-x 1 root wheel 1022 Dec 13 09:58 denicify.pl
lrwxr-xr-x 1 root wheel 21 Dec 13 09:58 dm.pl -> …/vendor/dm.pl/dm.pl
-rwxr-xr-x 1 root wheel 61 Dec 13 09:58 dm.pl.txt
-rwxr-xr-x 1 root wheel 892 Dec 13 09:58 fakeroot.sh
-rwxr-xr-x 1 root wheel 148 Dec 13 09:58 install.copyFile
-rwxr-xr-x 1 root wheel 313 Dec 13 09:58 install.exec
-rwxr-xr-x 1 root wheel 213 Dec 13 09:58 install.mergeDir
drwxr-xr-x 6 root wheel 192 Dec 13 09:58 lib
-rwxr-xr-x 1 root wheel 2125 Dec 13 09:58 logify.pl
-rwxr-xr-x 1 root wheel 29276 Dec 13 09:58 logos.pl
-rwxr-xr-x 1 root wheel 9161 Dec 13 09:58 nic.pl
-rwxr-xr-x 1 root wheel 3616 Dec 13 09:58 nicify.pl
-rwxr-xr-x 1 root wheel 980 Dec 13 09:58 package_version.sh
-rwxr-xr-x 1 root wheel 1122 Dec 13 09:58 post-update
-rwxr-xr-x 1 root wheel 437 Dec 13 09:58 target.pl
-rwxr-xr-x 1 root wheel 1033 Dec 13 09:58 update-git-repo
-rwxr-xr-x 1 root wheel 552 Dec 13 09:58 vercmp.pl

(2)在公司运维同事的帮助下,当前用户获取到了 /opt/theos 的rwx权限:
MacBook-Pro:Demo Andrew$ ls -l /opt/theos/bin/
total 200
-rwxr-xr-x 1 Andrew wheel 491 Dec 13 09:58 deb_build_num.sh
-rwxr-xr-x 1 Andrew wheel 1022 Dec 13 09:58 denicify.pl
-rwxr-xr-x 1 Andrew wheel 61 Dec 13 09:58 dm.pl.txt
lrwxr-xr-x 1 Andrew wheel 21 Dec 13 09:58 dpkg-deb -> …/vendor/dm.pl/dm.pl
-rwxr-xr-x 1 Andrew wheel 892 Dec 13 09:58 fakeroot.sh
-rwxr-xr-x 1 Andrew wheel 148 Dec 13 09:58 install.copyFile
-rwxr-xr-x 1 Andrew wheel 313 Dec 13 09:58 install.exec
-rwxr-xr-x 1 Andrew wheel 213 Dec 13 09:58 install.mergeDir
drwxr-xr-x 6 Andrew wheel 192 Dec 13 09:58 lib
-rwxr-xr-x 1 Andrew wheel 2125 Dec 13 09:58 logify.pl
-rwxr-xr-x 1 Andrew wheel 29276 Dec 13 09:58 logos.pl
-rwxr-xr-x 1 Andrew wheel 9161 Dec 13 09:58 nic.pl
-rwxr-xr-x 1 Andrew wheel 3616 Dec 13 09:58 nicify.pl
-rwxr-xr-x 1 Andrew wheel 980 Dec 13 09:58 package_version.sh
-rwxr-xr-x 1 Andrew wheel 1122 Dec 13 09:58 post-update
-rwxr-xr-x 1 Andrew wheel 437 Dec 13 09:58 target.pl
-rwxr-xr-x 1 Andrew wheel 1033 Dec 13 09:58 update-git-repo
-rwxr-xr-x 1 Andrew wheel 552 Dec 13 09:58 vercmp.pl

(3)按照书上的配置,将dm.pl成功修改为dpkg-deb,然后参考过http://bbs.iosre.com/t/make-package/1445 这个帖子,执行:
MacBook-Pro:retest Andrew$ perl -i -pe ‘y|\r||d’ /opt/theos/bin/dpkg-deb
MacBook-Pro:retest Andrew$ echo $?
0
MacBook-Pro:retest Andrew$ perl -i -pe ‘y|\r||d’ /opt/theos/bin/dpkg-deb
MacBook-Pro:retest Andrew$ ls !$
ls /opt/theos/bin/dpkg-deb
/opt/theos/bin/dpkg-deb
MacBook-Pro:retest Andrew$ file !$
file /opt/theos/bin/dpkg-deb
/opt/theos/bin/dpkg-deb: Perl script text executable

(4)貌似是执行成功了,然后执行下面的代码,依然是报错
MacBook-Pro:retest Andrew$ make package messages=yes
==> Error: /Applications/Xcode.app/Contents/Developer/usr/bin/make package requires dm.pl.
make: *** [internal-package-check] Error 1

目前我的theos 环境是这样的:
MacBook-Pro:~ Andrew$ ls -l /opt/theos/bin
total 216
-rwxrwxrwx 1 Andrew wheel 491 Dec 13 09:58 deb_build_num.sh
-rwxrwxrwx 1 Andrew wheel 1022 Dec 13 09:58 denicify.pl
-rwxrwxrwx 1 Andrew wheel 61 Dec 13 09:58 dm.pl.txt
-rwxrwxrwx@ 1 Andrew wheel 6673 Dec 13 11:44 dpkg-deb
-rwxrwxrwx 1 Andrew wheel 892 Dec 13 09:58 fakeroot.sh
-rwxrwxrwx 1 Andrew wheel 148 Dec 13 09:58 install.copyFile
-rwxrwxrwx 1 Andrew wheel 313 Dec 13 09:58 install.exec
-rwxrwxrwx 1 Andrew wheel 213 Dec 13 09:58 install.mergeDir
drwxrwxrwx 7 Andrew wheel 224 Dec 13 14:07 lib
-rwxrwxrwx 1 Andrew wheel 2125 Dec 13 09:58 logify.pl
-rwxrwxrwx 1 Andrew wheel 29276 Dec 13 09:58 logos.pl
-rwxrwxrwx 1 Andrew wheel 9161 Dec 13 09:58 nic.pl
-rwxrwxrwx 1 Andrew wheel 3616 Dec 13 09:58 nicify.pl
-rwxrwxrwx 1 Andrew wheel 980 Dec 13 09:58 package_version.sh
-rwxrwxrwx 1 Andrew wheel 1122 Dec 13 09:58 post-update
-rwxrwxrwx 1 Andrew wheel 437 Dec 13 09:58 target.pl
-rwxrwxrwx@ 1 Andrew wheel 1033 Dec 13 09:58 update-git-repo
-rwxrwxrwx 1 Andrew wheel 552 Dec 13 09:58 vercmp.pl
MacBook-Pro:~ Andrew$

昨天晚上搞到1点多,始终卡在打包环节。对命令行不熟悉,上午拉着运维同事帮我一起看问题,期间也新建过项目,按照书上将的重新来配置,目前依旧没有解决:joy_cat:

请有经验的老司机指点一二 ,多谢了!!


#2

Theos升级了,安装步骤也更新了,论坛里搜一下,有新教程


#3

意思是,我上面说的,第三步是多余的么?:joy_cat:


#4

在.theos/obj里,Theos这里有Bug一直没修复


#5

肉眼可见的那个obj原本应该是对隐藏目录.theos/obj的符号链接


#6

Soga 我去试试:grinning:


#7

谢谢指导,去目录下看了看,真的有 :grinning:


#8

果断修复了提个merge request啊


#9

我都快一年没正经搞过iOS逆向了,摸了


#10

按照这个教程http://iosre.com/t/theos/4928,重新安装了Theos,目前依然是无法通过make package命令打包。错误截图如下:

究竟是哪里配置不对了?


#11

上流Theos源码的问题应该是


#12

谢谢您的解答,问题解决了,我的解决方式很稀里糊涂。之前一直无法打包,我就放了两天,没有在去看了,上周五我电脑拿去Apple 店换屏,昨天拿到后继续看这个问题,发现,我之前装的theos环境没有了,另外,我有个demo有double,我怀疑是apple维修人员再给我换屏时候,重装了系统,比较不解的是,我电脑是有密码的。怎么登陆的?还备份了我一些文件。

回到正题:我重新按照论坛中最新的theos的安装步骤,在安装之前执行了下面这条命令
sudo cpan -I IO::Compress::Lzma
安装Perl成功,接着继续安装theos,安装完成之后make,make package 竟然成功了。

虽然目前能够编译、打包成功,可总觉得这个问题稀里糊涂的。还是有些疑点:

之前一直无法打包,我不知道是不是我电脑上一些自带的Perl、ruby、homebrew这些工具的环境存在问题,我之前装cocoapod,有做一些依赖环境的升级,环境变量修改的操作。而这次Apple的维修人员给我重装了系统,然后修复了之前存在的一些问题。之前按照theos 的wik,也有安装过Perl环境,后面装完theos,工程依旧是无法打包。


#13

之前群里我也是建议试试这么干的[quote=“GDAwen, post:12, topic:10416”]
sudo cpan -I IO::Compress::Lzma
[/quote]


#14

我升级了Theos(/opt/theos)了也遇到这个问题。后来按官方安装文档干脆重新clone一个theos到~/theos下。改好环境变量后,在项目目录继续make package install,问题还在!原来我犯了个低级错误:项目当前的Terminal窗口还是原来的Session…:joy:。好吧,老了,⌘+T 后再 make package install,没事了。


#15

按照github上文档安装 就没问题