Ubuntu – Did debuild fail with “configure: error: unrecognized option:”

debuildiosppa

I was trying to follow the instructions listed in this question/answer.

libimobiledevice 1.2 (iOS 8 Support) for Ubuntu 14.04 Trusty

The answer said : "Actually I cheated a bit. I couldn't satisfy the build dependencies, because a library isn't available in sufficiently recent versions in Ubuntu 14.04: libimobiledevice-1.2.0 requires libusbmuxd-dev (>= 1.0.9), so you'll have to build it from source first with the same recipe."

I assumed that "build it from source first with the same recipe." meant to follow the same steps, substituting libusbmuxd-dev for libimobiledevice. I also assumed that I should do that before building lbimobiledevice.

I did that and get a fatal error in the debuild step 5. Being new to this, and after a lot of searching, I am at a loss for how to determine what the error is and what needs to be done to correct it. This is the first thing I have done after a new install of 14.04. So if someone can help it would be appreciated.

configure: error: unrecognized option: -DCMAKE_INSTALL_PREFIX=/usr'
Try./configure –help' for more information

stevie@Studio1:~/usbmuxd-1.1.0$ debuild -b -j$(getconf _NPROCESSORS_ONLN)
 dpkg-buildpackage -rfakeroot -D -us -uc -b -j2
dpkg-buildpackage: source package usbmuxd
dpkg-buildpackage: source version 1.1.0-0ubuntu1
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by StevieRay <stevie@Studio1>
 dpkg-source --before-build usbmuxd-1.1.0
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
dh clean
   dh_testdir
   dh_auto_clean
   dh_clean
 debian/rules build
dh build
   dh_testdir
   debian/rules override_dh_auto_configure
make[1]: Entering directory `/home/stevieray/usbmuxd-1.1.0'
dh_auto_configure --    -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_SKIP_RPATH=true -DLIB_SUFFIX= -DUSB_PKGCONF_INCLUDE_DIRS="/usr/        include/libusb-1.0"
configure: error: unrecognized option: `-DCMAKE_INSTALL_PREFIX=/usr'
Try `./configure --help' for more information
dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/        man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --        libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking -DCMAKE_INSTALL_PREFIX=/        usr -DCMAKE_SKIP_RPATH=true -DLIB_SUFFIX= -DUSB_PKGCONF_INCLUDE_DIRS=/usr/include/libusb-1.0 returned         exit code 1
make[1]: *** [override_dh_auto_configure] Error 2
make[1]: Leaving directory `/home/stevieray/usbmuxd-1.1.0'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc -b -j2 failed

Best Answer

This is because the CMAKE_INSTALL_PREFIX option is missing for the make.
So in your ~/usbmuxd-1.1.0 add the complementary file CMakeCache.txt
and write in it:
CMAKE_INSTALL_PREFIX:PATH=/usr