Welcome to the forum, Guest

TOPIC: Trying to compile YACReader on Alpine and failing

Trying to compile YACReader on Alpine and failing 1 month 2 weeks ago #8750

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

DATADIR is added to the DEFINES in the .pro files, so qmake should be defining it when it creates the makefiles

It's weird that you have to edit the Makefile, do you have all the required qt packages for building?
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 2 weeks ago #8755

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

I didn't have the same issues with with yacreader 9.14.2.2402143, but with the development version I did.

I definitely have everything needed installed, it all compiles fine, at least with version 9.14.2.2402143.

There seems to be an issue with the paths yacreader looks for, and where Alpine keeps things. The only reason I am specifying no_pdf as an option to qmake is because it isn't finding the poppler-dev packages I have installed, and I don't care about PDF support so it's easier to disable it.

So to solve this, I took the Makefile qmake generated for the 9.14.2.2402143 branch and copied it to the devel branch.

Doing this, everything compiled, and I can run the app fine, but it still crashes when trying to open a cbr file. Notably it doesn't segfault, however it does print the following message when it exits after attempting to open a cbr file: WARN 2024-09-09T14:02:55.950 QThread::wait: Thread tried to wait on itself. I tested this 5 times with different files and that error message was the same every time, barring the timestamp difference.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 2 weeks ago #8756

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

is 7z.so 23.01 installed? did you build it and installed? did you installed from an alpine package? is it at /usr/lib/7zip?

the dev branch compiles just fine across multiple platforms and OS versions, so it is weird that you have to tweak things no make it compile…
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 2 weeks ago #8757

selmf

Offline

Developer

Posts: 639

Thank you received: 135

Karma: 18

Well, Alpine is not exactly your run-off-the-mill Linux distro. It is very minimal and uses non-standard components.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 2 weeks ago #8758

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

It's perfectly suited for desktop use and keeps uptodate packages of the various desktop environments and their dependencies, browsers, various other desktop software, even games.

It's infrastructure allows for creating very minimal containers, which has led some people to think that is it's purpose, but that was never the case.

The paths are all FHS standard, as I've discovered from using the apkbuild system to create packages, and needing to override the expectation that paths will be FHS compliant.

All the expected development packages are ther, and everything compiles as long as the correct directories are specified.

If there is any issue I would think it would have to be with musl and not alpine as a distro specifically. But other Qt applications all compile and work without issue, like Okular for example.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 1 week ago #8759

selmf

Offline

Developer

Posts: 639

Thank you received: 135

Karma: 18

We had musl bugs ;)

We look for poppler using pkgconfig and use a fallback hardcoded path if that is not available:

github.com/YACReader/yacreader/blob/deve...cies/pdf_backend.pri

Not all distros ship qmake with pkg-config enabled, though.

For the DATADIR and other default path definitions, we set them up here:

github.com/YACReader/yacreader/blob/develop/config.pri

I'd strongly advise against manually changing the generated Makefiles.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 1 week ago #8760

selmf

Offline

Developer

Posts: 639

Thank you received: 135

Karma: 18

So, took some time to read the whole thread. Some things you should take into account:

1. 7zip support in YACReader by default tries to load the 7z library from your system. The version and probably build flags of the 7z source used to build YACReader need to match what your system provides. In the case of Alpine, this is currently 23.01 without rar support (git.alpinelinux.org/aports/tree/main/7zip/APKBUILD, line 31)

2. It is perfectly possible to install libunarr to FHS compliant paths. For reference, see aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=libunarr

3. You can also use libarchive. Recent versions support rar4 and rar5

If you want to go the 7zip road, you can either modify the APKBUILD so it supports rar5 and has the correct version or you can place a compatible 7z.so in LIBDIR/yacreader/7z.so which defaults to FHS /usr/lib/yacreader/7z.so. YACReader will use this instead of the system version if it exists.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 1 week ago #8761

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

Thank you for your reples!

So, with musl bugs, maybe that could explain the segfault when 7zip is compiled in?

The reason I tried compiling 7zip support in is that I specifically want rar support. To that end I uninstalled the 7zip alpine packages to make sure they wouldn't be used and attempted to compile support in directly.

The issue with FHS paths seemed to be that YACReader isn't looking in those paths by default, at least from what I can tell. I will attempt compiling and installing libunarr to FHS compliant paths - I had thought I already tried this, but will try again to be certain. See for example also though, YACReader doesn't find poppler-dev stuff at all, even falling back to a hardcoded path, and the devel branch not finding QT libraries.

How can you specify libarchive as an option to qmake? My understanding is that if 7zip is not passed as an option it default to libunarr.

I'm not attached to 7zip support in any way, I just want rar support in YACReader since cbr files are so common.

Normally I wouldn't modify the Makefile at all, just with the devel branch when trying to compile it wasn't finding the QT libraries needed so I added those in.

I will try compiling an Alpine package of 7zip with rar5 by modifying the APKBUILD as you suggest, and then look more into libarchive as well. Thanks for the tips! I'll report back how it goes.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 1 week ago #8762

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

Actually /usr/lib/yacreader/7z.so is not used in every code path, that needs to be fixed, so you’ll have to replace the system one.
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 1 week ago #8763

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

Also be aware that unarr doesn’t support rar5 yet
Contribute to the project becoming a patron: www.patreon.com/yacreader
You can also donate via Pay-Pal: www.paypal.com/donate?business=5TAMNQCDD...e=Support+YACReader\
The administrator has disabled public write access.
Powered by Kunena Forum