Welcome to the forum, Guest

TOPIC: Unable to compile from sources

Unable to compile from sources 1 year 9 months ago #6911

mcon

Offline

Fresh Boarder

Posts: 8

Karma: 0

I feel a little dumb, but...

I am trying to compile from sources on Linux (Debian Sid, if it matters).

Problem is system seems to try compiling for Windows (and fails, of course).

I haven't found the right spell to compile; here's my latest attempt:

mcon@cinderella:/tmp/yacreader-9.8.2.2106204$ make
cd YACReader/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /tmp/yacreader-9.8.2.2106204/YACReader/YACReader.pro CONFIG+=7zip PREFIX=/usr/local ) && make -f Makefile 
Project MESSAGE: Using system provided installation of poppler-qt5 found by pkg-config.
Project MESSAGE: Found p7zip source code...
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|previous patch
|--- libp7zip/CPP/include_windows/windows.h
|+++ libp7zip/CPP/include_windows/windows.h
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 17
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|fix linux build
|--- libp7zip/CPP/myWindows/StdAfx.h
|+++ libp7zip/CPP/myWindows/StdAfx.h
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
1 out of 1 hunk ignored
patching file libp7zip/CPP/7zip/Archive/7z/7zIn.cpp
Hunk #1 FAILED at 1097 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/7zip/Archive/7z/7zIn.cpp.rej
patching file libp7zip/CPP/7zip/Compress/ShrinkDecoder.cpp
Hunk #1 FAILED at 121 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/ShrinkDecoder.cpp.rej
patching file libp7zip/CPP/7zip/Compress/Rar1Decoder.cpp
Hunk #1 FAILED at 29 (different line endings).
Hunk #2 FAILED at 406 (different line endings).
Hunk #3 FAILED at 477 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar1Decoder.cpp.rej
patching file libp7zip/CPP/7zip/Compress/Rar1Decoder.h
Hunk #1 FAILED at 39 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar1Decoder.h.rej
patching file libp7zip/CPP/7zip/Compress/Rar2Decoder.cpp
Hunk #1 FAILED at 80 (different line endings).
Hunk #2 FAILED at 100 (different line endings).
Hunk #3 FAILED at 170 (different line endings).
Hunk #4 FAILED at 344 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar2Decoder.cpp.rej
patching file libp7zip/CPP/7zip/Compress/Rar2Decoder.h
Hunk #1 FAILED at 139 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar2Decoder.h.rej
patching file libp7zip/CPP/7zip/Compress/Rar3Decoder.cpp
Hunk #1 FAILED at 92 (different line endings).
Hunk #2 FAILED at 545 (different line endings).
Hunk #3 FAILED at 606 (different line endings).
Hunk #4 FAILED at 623 (different line endings).
Hunk #5 FAILED at 824 (different line endings).
Hunk #6 FAILED at 838 (different line endings).
6 out of 6 hunks FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar3Decoder.cpp.rej
patching file libp7zip/CPP/7zip/Compress/Rar3Decoder.h
Hunk #1 FAILED at 192 (different line endings).
Hunk #2 FAILED at 200 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file libp7zip/CPP/7zip/Compress/Rar3Decoder.h.rej
patching file libp7zip/CPP/7zip/Common/StreamObjects.cpp
Hunk #1 FAILED at 157 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/7zip/Common/StreamObjects.cpp.rej
patching file libp7zip/CPP/Windows/ErrorMsg.cpp
Hunk #1 FAILED at 14 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file libp7zip/CPP/Windows/ErrorMsg.cpp.rej
WARNING: Failure to find: /tmp/yacreader-9.8.2.2106204/compressed_archive/libp7zip/CPP/myWindows/wine_date_and_time.cpp
make[1]: Entering directory '/tmp/yacreader-9.8.2.2106204/YACReader'
compiling ../compressed_archive/7z_precompiled_header.h
../compressed_archive/7z_precompiled_header.h:6:10: fatal error: libp7zip/CPP/myWindows/StdAfx.h: No such file or directory
    6 | #include "libp7zip/CPP/myWindows/StdAfx.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:796: YACReader.gch/c++] Error 1
make[1]: Leaving directory '/tmp/yacreader-9.8.2.2106204/YACReader'
make: *** [Makefile:49: sub-YACReader-make_first] Error 2
mcon@cinderella:/tmp/yacreader-9.8.2.2106204$ 

Any hint welcome.
TiA!
The administrator has disabled public write access.

Unable to compile from sources 1 year 9 months ago #6912

Luis Ángel

Offline

Administrator

Posts: 2614

Thank you received: 543

Karma: 21

Until recently 7zip wasn't compatible with Linux/macos, that's why p7zip was born, it has some code that provides alternatives to Windows APIs. That's why you see all that windows stuff.

What version of p7zip are you using?

File to patch:
Skip this patch? [y]
Skipping patch.

That patch should work if you are using the right version -> github.com/YACReader/yacreader/blob/deve...hive/README_7zip.txt
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.

Unable to compile from sources 1 year 9 months ago #6915

mcon

Offline

Fresh Boarder

Posts: 8

Karma: 0

You are right.
THANKS!

I made a stupid mistake and downloaded 7z1602-src.7z instead of p7zip_16.02_src_all.tar.bz2
Now compilation got completely through.

Unfortunately it doesn't seem to work right:
Trying to open any .cbr results in "unable to load 7z lib from ./utils".

Starting YACReader from the command line I also see (I don't know if it's relevant):
WARN 2022-07-14T08:50:20.765 defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

What am I still missing?
TiA!
The administrator has disabled public write access.

Unable to compile from sources 1 year 9 months ago #6917

Luis Ángel

Offline

Administrator

Posts: 2614

Thank you received: 543

Karma: 21

YACReader loads 7zip (p7zip) dynamically, so you need to have it installed in your system. You can try to install it from a package or building it yourself from the sources. You need the full version that includes RAR support. Remember to install the right version 16.02
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.

Unable to compile from sources 1 year 9 months ago #6918

mcon

Offline

Fresh Boarder

Posts: 8

Karma: 0

Thaks.

I do have p7zip installed, but I strongly doubt it is version 16.02 as I installed normally via `apt`.
I'm not sure downgrading forced is a good idea.

Correction:
packages installed are:
p7zip 16.02+dfsg-8
p7zip-full 16.02+dfsg-8
p7zip-rar 16.02-3

... so it should work (I think).

Note that "from ./utils" seems to suggest YACCReader is trying to load from "the wrong place".

Note also using standard decompression tool (unarr) is not really an option because AFAIK it doesn't handle "modern" (v5) rar files.

What are my options (beside going back to McomiX, of course ;) )?

TiA!
The administrator has disabled public write access.

Unable to compile from sources 1 year 9 months ago #6923

Luis Ángel

Offline

Administrator

Posts: 2614

Thank you received: 543

Karma: 21

I will take a look at the code, I don’t remember right now how p7zip is 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.

Unable to compile from sources 1 year 9 months ago #6930

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

mcon wrote:
Thaks.
Note that "from ./utils" seems to suggest YACCReader is trying to load from "the wrong place".

Yes and no. The message is incorrect on Linux, but only half. By default, YACReader will look in /usr/lib/p7zip. If it does not find the files it needs under this path, the message will appear. The problem is most likely that Debian uses a different path, i.e. /usr/lib64/p7zip or something along these lines.
mcon wrote:
What are my options (beside going back to McomiX, of course ;) )?

You've got two options. You can either run qmake with LIBDIR=/usr/lib64 (or whatever is correct) to set the correct path in the build system or you can fix things by creating symlinks, either to the path your build expects or if you want something a little more stable in case Debian Sid updates to the latest 7z you can place a copy of p7zip/7z.so and /p7zip/Codecs/Rar.so into /usr/lib/yacreader.

If you go for the copy, I strongly recommend taking a look at the source. This is an old workaround for constantly breaking Linux packages and while it is still in the source, we do not really support this any more (i.e. you're on your own!).
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Unable to compile from sources 1 year 9 months ago #6935

mcon

Offline

Fresh Boarder

Posts: 8

Karma: 0

Thanks selmf.

I will try rebuilding using workarounds you suggested,but I strongly doubt that's the problem:

mcon@cinderella:/usr$ ls -la /usr/lib/p7zip/
total 5368
drwxr-xr-x   3 root root    4096 Jul 13 22:01 .
drwxr-xr-x 140 root root    4096 Jul 14 09:38 ..
-rwxr-xr-x   1 root root  597680 Aug 15  2020 7z
-rwxr-xr-x   1 root root 1462016 Aug 15  2020 7za
-rwxr-xr-x   1 root root  473576 Aug 15  2020 7zCon.sfx
-rwxr-xr-x   1 root root  962096 Aug 15  2020 7zr
-rw-r--r--   1 root root 1986216 Aug 15  2020 7z.so
drwxr-xr-x   2 root root    4096 Jul 13 22:01 Codecs
mcon@cinderella:/usr$ file /usr/lib/p7zip/*
/usr/lib/p7zip/7z:        ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=89e7c9a94ccbe7fdf82be42400b40384331d87a0, for GNU/Linux 3.2.0, stripped
/usr/lib/p7zip/7za:       ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4a9528b6042eabd07b0956c4bb1c197fc5202c45, for GNU/Linux 3.2.0, stripped
/usr/lib/p7zip/7zCon.sfx: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=8e560e56d7a2f51f749b1eae13f127bb5805cfc2, for GNU/Linux 3.2.0, stripped
/usr/lib/p7zip/7zr:       ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=dec92a0f6064f5d48d6f6710e3b1ceb7d879e97d, for GNU/Linux 3.2.0, stripped
/usr/lib/p7zip/7z.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7bc04754b99cc9e0f174751b085bf773be6a29b6, stripped
/usr/lib/p7zip/Codecs:    directory
mcon@cinderella:/usr$ 

I also tied copying
sudo cp ../p7zip/7z.so ../p7zip/Codecs/Rar.so /usr/lib/yacreader
and aloso to
/usr/local/lib/yacreader
as I installed YACRader in
/usr/local/bin
.
Nothing changed.

I will try to debug as soon as I get a bit of time.
The administrator has disabled public write access.
Powered by Kunena Forum