Welcome to the forum, Guest

TOPIC: Trying to compile YACReader on Alpine and failing

Trying to compile YACReader on Alpine and failing 1 month 3 weeks ago #8717

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

Hello!

So, I'm trying to compile yacreader 9.14.2.2402143 on the latest stable version of alpine linux.

Alpine does not have libunarr in it's repositories.

OK, no problem, I compiled with 7zip support instead. And while it comples, as soon as I try to open any actual cbr or cbz it segfaults.

OK, so I'll try with unarr instead.

Well, getting the unarr source and putting it where it should didn't compile.

OK, so I'll try installing libunarr myself so then yacreader can use it as a shared library.

Now, libunarr wanted to install to non-FHS locations, which alpine tries to enforce and it was easier (and preferable) to install in FHS locations.

OK, no problem. Now I run qmake with QMAKE_LIBS set to point to the path where libunarr actually is.

And that's where I get nothing but linking errors. Specifically in compressed_archive.o or compressed_archive.cpp numerous undefined references, to for example MyFree and UString::UString()

I can provide more output but didn't want to make the first post too noisy unnecessarily.

I'm just wondering at the moment if there are any tips or anything else I could try? I'm using okular to read cbz files but the lack of a reader that can handle cbr files is killing me.
The administrator has disabled public write access.

Trying to compile YACReader on Alpine and failing 1 month 3 weeks ago #8718

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

what 7zip sources/package are you using? It’s been a while since I compiled yacreader in Linux (other than what’s on Azure Pipelines)
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 3 weeks ago #8719

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

you can try with libarchive too btw
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 #8742

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

Apologies for my late reply, and thank you for responding so quickly!

I tried with the source of 7zip 23.01 as that's what it suggests in the readme. I also tried the latest source - both compiled and both resulting executables segfaulted in the same way.

libarchive is different from libunarr, right? I was hoping to compile something in with rar file support, at least rar4. Does libarchive support rar at all? From the documentation it had seemed unarr is used by default unless 7zip is specified.
The administrator has disabled public write access.

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

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

I created today a couple of scripts for building YACReader in Ubuntu (22.04 and 24.04)

github.com/YACReader/yacreader/tree/develop/build_scripts

You can get some inspiration there. The one for Ubuntu 22.04 builds 7zip too. Just make sure you use the code from develop because there was a bug in how 7zip was loaded in Linux.
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 #8744

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

This build script isn't too suitable for me since I'm on alpine, but the key steps are the same as I performed manually. Cloning the latest YACReader release getting the 7z2301 source and placing it in the right folder.

The problem isn't that it doesn't compile, it's that it segfaults anytime I go to load an archive, even just a cbz.

I tried using unarr as a fallback but that gets me to the errors I describe in the post.

Is there anything I can do to troubleshoot why the compiled executable is segfaulting in the way it is? While the interface displays nicely, it's not at all usable.

Could it be a musl thing, and if so is there any fix?
The administrator has disabled public write access.

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

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

It works brilliantly when I extract the cbz to a folder and use the open folder functionality, so it's definitely something with the 7z stuff and how it's linking.
The administrator has disabled public write access.

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

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

Like I said in the previous message: Just make sure you use the code from develop because there was a bug in how 7zip was loaded in Linux. Don’t use the code from the latest release, use the develop branch from github.
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 #8747

Luis Ángel

Offline

Administrator

Posts: 2831

Thank you received: 582

Karma: 317

And make sure 7z.so is in place in /usr/lib/7zip

Not sure if you have a 7zip 23.01 package available for alpine, if not you have to build it yourself, on of the scripts does it and it also copies 7z.so to the right place.
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 #8749

Firetoe

Offline

Fresh Boarder

Posts: 9

Karma: 0

Ah! Apologies for missing that in your previous reply.

So, I'm compiling only YACRader itself, using `qmake CONFIG+="no_pdf 7zip" in the latest develop branch.

I had to add about 3`-I` paramters to the Makefile because it wasn't finding some of the QT stuff like QApplication for some reason. No big deal.

Now when trying to compile though, I get an error on line 182 of main.cpp that `error: 'DATADIR' was not declared in this scope`.

I can't see it declared elsewhere in main.cpp and I'm not sure where it should be being sourced from. Is this something that should be set with qmake?
The administrator has disabled public write access.
Powered by Kunena Forum