Reputation: 2749
I created an "External Build System" project in Xcode to run my custom Makefile when run. By default this works fine, but when I want to pass it -C ~/Desktop/GIFPaper/ package install
so the full shell command equivalent would be:
make -C ~/Desktop/GIFPaper/ package install
I get this error:
/Applications/Xcode.app/Contents/Developer/usr/bin/make package requires dpkg-deb.
make: *** [internal-package-check] Error 1
Program ended with exit code: 2
The weird thing is that I have dpkg installed and if I open Terminal and change the directory to:
/Applications/Xcode.app/Contents/Developer/usr/bin/
and the run:
make -C ~/Desktop/GIFPaper/ package install
everything works fine. So far I have added:
-C ~/Desktop/GIFPaper/ package install
as arguments to the Run scheme. What am I doing wrong?
Upvotes: 0
Views: 2580
Reputation: 11
I had this problem.
First of all I installed dpkg with brew install dpkg
but if I ran make package install
i received this error
dpkg-deb: file `com.mycompany.mytweak.deb' contains ununderstood data member data.tar.xz , giving up
dpkg: error processing com.mycompany.mytweak.deb (--install):
subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
This because the compress algoritm of dpkg was incompatible with iphone, so i simply did a backup of my installed dpkg-deb with
mv /usr/local/bin/dpkg-deb /usr/local/bin/dpkg-deb.bak
and I copied the dpkg-deb locate in
/Applications/Xcode.app/Contents/Developer/usr/bin/
in the folder where was my installed dpkg.deb with
sudo cp /Applications/Xcode.app/Contents/Developer/usr/bin/dpkg-deb /usr/local/bin/dpkg-deb
Now it works.
Upvotes: 1
Reputation: 6347
I guess you are using a Makefile depending on this file (or a similar rule):
https://github.com/DHowett/theos/blob/master/makefiles/package/deb.mk
It requires that dpkg-deb
is in the path or will fail with the error message you posted.
You say you installed dpkg, but this doesn't mean an executable called dpkg-deb
is available to make when invoked from Xcode. Indeed, with your external build system, make is invoked with a restricted PATH. Your solution of installing dpkg-deb and copying to /Applications/Xcode.app/Contents/Developer/usr/bin/
is quite dirty and involves installing the missing binary in Xcode itself, in the first directory of the default PATH.
Alternatively, you can modify the PATH directly from Xcode, by checking "Pass build settings in environment" (this is the default) and adding a PATH build setting. Ideal value would be ${inherited}:/usr/local/bin
or ${inherited}:/opt/local/bin
depending on where dpkg-deb
is actually installed.
Upvotes: 2
Reputation: 2749
I figured it out, for anyone with this problem in the future. Download dpkg-deb using curl http://debmaker-osx.googlecode.com/svn-history/r5/trunk/dpkg-deb > dpkg-deb
then set its permissions as an executable with chmod +x dpkg-deb
then copy it to the Xcode bin directory with sudo cp dpkg-deb /Applications/Xcode.app/Contents/Developer/usr/bin/dpkg-deb
Hope this helps!
Upvotes: 1