- Posts: 3354
- Thank you received: 692
Help and support for Linux users.
Trying to compile YACReader on Alpine and failing
- Luis Ángel
-
- Offline
- Administrator
-
Less
More
2 years 3 weeks ago #8750
by Luis Ángel
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\
Replied by Luis Ángel on topic Trying to compile YACReader on Alpine and failing
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?
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\
Please Log in or Create an account to join the conversation.
- Firetoe
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
2 years 3 weeks ago #8755
by Firetoe
Replied by Firetoe on topic Trying to compile YACReader on Alpine and failing
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.
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.
Please Log in or Create an account to join the conversation.
- Luis Ángel
-
- Offline
- Administrator
-
Less
More
- Posts: 3354
- Thank you received: 692
2 years 3 weeks ago #8756
by Luis Ángel
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\
Replied by Luis Ángel on topic Trying to compile YACReader on Alpine and failing
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…
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\
Please Log in or Create an account to join the conversation.
- selmf
- Offline
- Moderator
-
Less
More
- Posts: 639
- Thank you received: 136
2 years 3 weeks ago #8757
by selmf
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Replied by selmf on topic Trying to compile YACReader on Alpine and failing
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.
Please Log in or Create an account to join the conversation.
- Firetoe
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
2 years 3 weeks ago #8758
by Firetoe
Replied by Firetoe on topic Trying to compile YACReader on Alpine and failing
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.
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.
Please Log in or Create an account to join the conversation.
- selmf
- Offline
- Moderator
-
Less
More
- Posts: 639
- Thank you received: 136
2 years 3 weeks ago #8759
by selmf
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Replied by selmf on topic Trying to compile YACReader on Alpine and failing
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.
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.
Please Log in or Create an account to join the conversation.
- selmf
- Offline
- Moderator
-
Less
More
- Posts: 639
- Thank you received: 136
2 years 3 weeks ago #8760
by selmf
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Replied by selmf on topic Trying to compile YACReader on Alpine and failing
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.
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.
Please Log in or Create an account to join the conversation.
- Firetoe
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
2 years 3 weeks ago #8761
by Firetoe
Replied by Firetoe on topic Trying to compile YACReader on Alpine and failing
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.
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.
Please Log in or Create an account to join the conversation.
- Luis Ángel
-
- Offline
- Administrator
-
Less
More
- Posts: 3354
- Thank you received: 692
2 years 3 weeks ago #8762
by Luis Ángel
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\
Replied by Luis Ángel on topic Trying to compile YACReader on Alpine and failing
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\
Please Log in or Create an account to join the conversation.
- Luis Ángel
-
- Offline
- Administrator
-
Less
More
- Posts: 3354
- Thank you received: 692
2 years 3 weeks ago #8763
by Luis Ángel
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\
Replied by Luis Ángel on topic Trying to compile YACReader on Alpine and failing
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\
Please Log in or Create an account to join the conversation.
Moderators: Luis Ángel