kiwix / kiwix-build

Kiwix & openZIM build engine
GNU General Public License v3.0
87 stars 42 forks source link

Why compiling libkiwix for iOS/macOS does embeds the libzim? #647

Closed kelson42 closed 10 months ago

kelson42 commented 10 months ago

With: kiwix-build --target-platform iOS_arm64 libkiwix

I thought that now the two libraries should be handled separatly. So we should have IMO:

mgautierfr commented 10 months ago

Why do you think that libkiwix embeds libzim ?

The only reason why you may find libzim symbol in libkiwix is because we compile libraries in static mode. So potentially libzim symbols used by libkiwix are statically linked in libkiwix.

kelson42 commented 10 months ago

@rgaudin told me and the README on kiwix/apple says nothing about compiling the libzim! Is that normal to have them or should we avoid this and push to compile libzim separatly?

rgaudin commented 10 months ago

As I said, libkiwix in kiwix-build automatically triggers a libzim build as libzim is considered a dependency. @kelson42 tells me that libkiwix doesn't depend on libzim anymore (as it doesn't wrap it anymore) and thus should not be automatically built when building libkiwix.

At least that's what I understood but all those comments are confusing :)

mgautierfr commented 10 months ago

What we had removed from libkiwix is the API to read article in zim files (https://github.com/kiwix/libkiwix/pull/789). This means that if you want to read content in a zim files you must use libzim API (and so, directly depend on it).

But libkiwix still need to read in libzim (for itself). At least for:

So:

rgaudin commented 10 months ago

OK, that's very clear.

kelson42 commented 10 months ago

@rgaudin Does it implies changes in the xcframework or can we just close this ticket?

rgaudin commented 10 months ago

We can close.