libimobiledevice revisited

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
User avatar
dr__Dan
Posts: 93
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 59 times
Been thanked: 30 times

libimobiledevice revisited

Post by dr__Dan »

Greetings Fatdog team!

I had occasion to use the features of the libimobiledevice suite, but since the time it was packaged for Fatdog64 some while back Apple has made changes, and the producers of libimobiledevice have made changes to keep up and to improve their software. I attempted to update to their latest versions. I downloaded and attempted to compile the new versions. I had to symlink some .m4 files from /aufs/pup_ro11/usr/share/aclocal to /usr/share/aclocal. I had to update python with pip. I had to discover that there are some newer versions that are not obviously changed. Their official webpage is not fully updated, but their github pages are. I attempted to follow the instructions to compile each of them, and I attempted to use updated versions of the existing Fatdog recipes. Some of them are compiled and packaged. Still, after all this, on some of them I am getting errors of this sort:

Code: Select all

utils.h:82:9: error: redeclaration of enumerator ‘PLIST_FORMAT_XML’
   82 |         PLIST_FORMAT_XML,
      |         ^~~~~~~~~~~~~~~~
In file included from client.c:40:
/usr/include/plist/plist.h:156:9: note: previous definition of ‘PLIST_FORMAT_XM ’ with type ‘enum <anonymous>’
  156 |         PLIST_FORMAT_XML     = 1,  /**< XML format */
      |         ^~~~~~~~~~~~~~~~
utils.h:83:9: error: redeclaration of enumerator ‘PLIST_FORMAT_BINARY’
   83 |         PLIST_FORMAT_BINARY
      |         ^~~~~~~~~~~~~~~~~~~
/usr/include/plist/plist.h:157:9: note: previous definition of ‘PLIST_FORMAT_BINARY’ with type ‘enum <anonymous>’
  157 |         PLIST_FORMAT_BINARY  = 2,  /**< bplist00 format */
      |         ^~~~~~~~~~~~~~~~~~~

At this stage, I know that I am out of my depth and could use some assistance to get these updated. I wouldn't mind some advice on resolving this current issue, just out of curiosity, but I don't have a lot of time to invest in this. It has been educational, but I have other work to accomplish.

Thanks for any assistance.

Dan

10 years on with Fatdog64. :D

step
Posts: 576
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 63 times
Been thanked: 213 times
Contact:

Re: libimobiledevice revisited

Post by step »

Hi Dan, they have several components on github. Which ones could you not build? Do you really need python support of this suite? Unless you have a python app that interacts with your phone, disable python support for your builds (example below). You shouldn't need to do the aclocal symlinking hack. Are you sure you had the right devx loaded and no other devx also loaded?

Example for libplist (without pkgbuild system)

Code: Select all

cd workdir
git clone https://github.com/libimobiledevice/libplist.git
cd libplist
: optional; rox README.md
./autogen.sh --prefix=/usr --without-cython
make
make install DESTDIR=/tmp/libplist

It worked for me, without errors or warnings. Does it work for you?

Then create a package out of /tmp/libplist following step 3 of https://distro.ibiblio.org/fatdog/web/f ... ckage.html

User avatar
dr__Dan
Posts: 93
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 59 times
Been thanked: 30 times

Re: libimobiledevice revisited

Post by dr__Dan »

Hello @step, thank you for the information. There is so much to know about compiling, and I don't know most of it, but i'm a little more knowledgeable now, and have got it working better. I was able to duplicate your example, but I had already updated libplist. The error was with usbmuxd, and it seems that was the last piece of the puzzle. I did not understand about excluding python. I'll have to do a little reading to better understand that. Would you explain why the recipe is different from your example?

Code: Select all

TARBALL=libplist-$PKGVER.tar.bz2
MD5SUM=d6e2b9f713f18ae0a0f3353c03315bfd
SRC_URL=https://github.com/libimobiledevice/libplist/releases/download/2.3.0/$TARBALL

uses a different source for the package, and

Code: Select all

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static"
	pkg_build_autoconf &&
	pkg_build_slackdesc
}

doesn't have --without-cython

I'm still reading certain recipes when I have time :roll: with a goal of updating my xfe recipe submission, and these have been helpful.

I do have a devx problem! I'll have to reboot and reset that. 249 days and counting, Fatdog64 is quite stable.

As far as packaging, I have that comfortably figured out.

Thank you for your time and assistance. This is very useful for me.

Dan

10 years on with Fatdog64. :D

step
Posts: 576
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 63 times
Been thanked: 213 times
Contact:

Re: libimobiledevice revisited

Post by step »

Hi @dr__Dan, a pkgbuild recipe contains a set of instructions to download and compile a specific source code release, packaging the results for Fatdog64 on a Fatdog64 target in a sandboxed environment that won't affect the regular file system. The pkgbuild system is a tool for reproducible builds.

Instead my example above shows how to download the source code from github in its current state (which could still be unreleased and unstable), to compile it following hints in the project README file. The libmobiledevice project utilizes GNU autotools to makes their build configuration portable across many compilation targets. Eventually, you will get familiar enough with autotools to be able to cut some corners. Until then, read the README and INSTALL files (these make for a dry reading).

My point about excluding python is that if you don't need a feature you shouldn't build it unless you build packages for other people who could have different needs. If you're building a package just for your own benefit, try to make it as simple as possible. In this specific case, the README file says that you can exclude building python bindings with the configure switch --disable-python. (Aside: configure is generated by GNU autotools, you can get a list of its options with ./configure --help). Python bindings would be necessary only if you had a python application that needs libplist to manage your iPhone. Do you have such an app? If you don't, save yourself some time and disable python bindings when you build libimobiledevice recipes.

On to the pkgbuild recipe fragments you included. The first fragment sets three variables that encapsulate a specific source code version to download and save to your hard disk. That's an essential step for a reproducible build: now anybody could download exactly the same files.

The second fragment provides the instructions that compile the source code using Fatdog64's standard GNU autoconf build function (in functions.sh), and package the results as a txz file. The instructions in this fragment are reproducible using the pkgbuild system. They wouldn't work as is for Puppy Linux, EasyOS, Debian, etc. - although experienced package maintainers would be able to adapt them for other distributions.

doesn't have --without-cython

That's because the packages in the Fatdog64 repository cater to a broad audience who could need python bindings.

User avatar
dr__Dan
Posts: 93
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 59 times
Been thanked: 30 times

Re: libimobiledevice revisited

Post by dr__Dan »

@step, you have done me a good service. I expect to refer to your post as I continue to develop my knowledge and familiarity. It is my goal to assist in updating package recipes as I find opportunity, or add new recipes for new software not in the repository.

Thank you!

Dan

10 years on with Fatdog64. :D

Post Reply

Return to “Software”