libimobiledevice / libplist

A library to handle Apple Property List format in binary or XML
https://libimobiledevice.org
GNU Lesser General Public License v2.1
535 stars 304 forks source link

libplist doesn't install plist.pxd #138

Closed paulvojta closed 5 years ago

paulvojta commented 5 years ago

libimobiledevice won't compile without plist.pxd, but libplist doesn't install it.

To reproduce:

This is on Debian stretch (stable), amd64 architecture. The python-all-dev and cython packages are installed; python-plist is not.

  1. Check for plist.pxd (it should be absent from both places):

    ls -l /usr/{local/,}include/plist/cython/plist.pxd
  2. Download libplist, libusbmuxd, and libimobiledevice from github.

  3. For each of these packages, do:

    ./autogen.sh
    make
    sudo make install

    The "make" step for libimobiledevice will fail. In part, it says:

    Making all in cython make[2]: Entering directory '/home/vojta/libimobiledevice-master/cython' make[2]: *** No rule to make target '/usr/local/include/plist/cython/plist.pxd', needed by 'imobiledevice.c'. Stop.

Sorry about Issue #111. I don't know why I said plist.pyx -- I meant plist.pxd.

andreasg123 commented 5 years ago

I've run into the same issue in Ubuntu 18.04 with the difference that I'm trying to get it to work in Python 3. I modified running autogen.sh accordingly:

./autogen.sh PYTHON=python3

This issue is also discussed here: https://github.com/libimobiledevice/libimobiledevice/issues/283

The solution of installing python-plist doesn't work for me because I want to make it work for Python 3 (no python3-plist).

andreasg123 commented 5 years ago

This comment provides a workaround: https://github.com/libimobiledevice/libimobiledevice/issues/283#issuecomment-198262395

After sudo make install, run these commands:

mkdir /usr/local/include/plist/cython
cp -p cython/plist.pxd /usr/local/include/plist/cython

I tried to investigate how to fix the issue more permanently but I'm not familar enough with automake. plist.pxd is included in EXTRA_DIST in cython/Makefile.am but those files are not copied anywhere as part of make install.

paulvojta commented 5 years ago

Correct about EXTRA_DIST: That variable lists EXTRA files that are to be DISTributed (in the tarball created by make dist_gzip and other similar targets). I'm not all that familiar with automake either, but the following patch seems to fix the problem:

    --- libplist-master/cython/Makefile.am  2019-05-19 16:24:15.000000000 -0700
    +++ libplist-master-new/cython/Makefile.am      2019-06-22 22:50:05.908058031 -0700
    @@ -27,4 +27,7 @@
     .pyx.c:
            $(CYTHON) -I$(CYTHON_PLIST_INCLUDE_DIR) -I$(top_srcdir)/src -o $@ $<

    +pxddir = $(includedir)/plist/cython
    +pxd_DATA = plist.pxd
    +
     endif
nikias commented 5 years ago

Should be fixed with commit 811a53aefe4693113ef723783c151e473853a398. Let me know if not.

paulvojta commented 5 years ago

Verified fixed -- thanks!

Paul Vojta

On Thu, Aug 08, 2019 at 02:17:52AM -0700, Nikias Bassen wrote:

Should be fixed with commit 811a53aefe4693113ef723783c151e473853a398. Let me know if not.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/libimobiledevice/libplist/issues/138#issuecomment-519439384