Search code examples
ioscommand-lineprotocol-buffers

Xcode 5.1 unable to find utility "make", not a developer tool or in PATH


I am trying to follow these directions to install Google Protocol Buffers. After creating the script, I try to run it with the following command:

$ ./build-proto-ios.sh

I receive the following output:

mkdir: ios-build: File exists
Platform is iPhoneSimulator
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
Platform is iPhoneOS
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
Platform is iPhoneOS
./build-proto-ios.sh: line 40: ./configure: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
make: error: unable to find utility "make", not a developer tool or in PATH
cp: src/.libs/libprotobuf-lite.a: No such file or directory
make: error: unable to find utility "make", not a developer tool or in PATH
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: ios-build/libprotobuf-lite-armv7.a (No such file or directory)

So, I looked for information on:

unable to find utility "make", not a developer tool or in PATH

I found this information for installing the Xcode command line tools, because I thought that might be the cause. But even after installing the latest command line tools for OS X Mavericks, I'm still getting this error.

Any ideas?


Solution

  • Looks like that's not your actual problem. When the script is running, it's looking for the included make in the iOS 6 folder... which probably doesn't exist.

    Check out https://gist.github.com/PR3x/0fde040902ed4e9a1a61 for a script that will build protobuf as a fat library for you. Just place it in a new folder, chmod +x, and run. (Based on https://stackoverflow.com/a/19582682/939927)

    One thing to note is that you'll need to change all of your generated .pb.* files to use the ::google_public: namespace instead of ::google:, as Apple uses that internally.

    Another thing to note is that this only works for 32-bit ARM and the simulator. 64-bit ARM (iPhone 5s) doesn't build yet.

    Good luck!