Welcome to the forum, Guest

  • Page:
  • 1
  • 2

TOPIC: Compiling under Centos 7

Compiling under Centos 7 6 years 3 months ago #1614

ccarpo

Offline

Fresh Boarder

Posts: 6

Karma: 0

Hello together,

has anybody successfully compiled yacreader under centos 7?

after installing some dependencies to get qmake, unarr etc, I came to a point where I have no clue how to proceed any further:
/usr/bin/ld: warning: libpoppler.so.52, needed by /usr/lib/libpoppler-qt5.so, not found (try using -rpath or -rpath-link)

When I try to install it from pkgs.org/fedora-rawhide/fedora-i386/popp...2.fc23.i686.rpm.html
yum says that there is already a poppler library 0.22.x installed (libpoppler.so.32) which I cannot uninstall without removing half of my OS like cups, gnome, etc. as well :(

Thanks for any help/idea/binary packages ;)
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1616

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

Welcome ccarpo!

FINALLY there's somebody else than me actually trying to compile it on Linux :cheer:


Poppler and poppler-qt5 usually come in pairs. So installing just a newer version of poppler-qt5 won't do, they have to match. Sadly several components on your system seem to depend on exactly the version of poppler you have installed, so you can't update just poppler, but you would have to update a lot more stuff.

In your situation I would probably go for the approach of compiling poppler and poppler-qt5 myself and installing them alongside the system provided library in /opt/. You could then either switch to these libraries by setting LD_PRELOAD to the alternative library or by changing the build system to use it directly. A good candidate for this approach would be poppler 0.24 or newer (0.22 has no Qt5 api)

If you don't need pdf support patching YACReader to not use poppler could also be an option.


Whatever approach you choose, I'm happy to help.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1618

ccarpo

Offline

Fresh Boarder

Posts: 6

Karma: 0

Wow. Thank you very much for your input.

I'll first try to compile poppler and might need some help there. Until now I just compiled programs "out of the box" and as a java developer I don't know much about make. I start digging into it and if I'm stuck (and also if I am successfull of course) I'll let you know.

Greets
CCarpo
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1621

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

Hi,

you're welcome. I've been in your shoes and much of the current Linux build process for YACReader is the result of that (so you know who to blame :cheer:)

You do not necessarily need to know much about make. Software on Linux is usually build and installed using three steps or stages:

1. configure
2. make
3. make install

The configure part depends on the build system that is used (if any at all).

In poppler, you seem to have a choice between autotools and CMake. To build using autotools run this:

./autogen.sh --prefix=/opt
make
make install

This will install the files in /opt, but your package manager will not know about them. It does not have to be /opt, you could use your home directory too.

To make use of these libraries you then either add them to the LD_PRELOAD environment variable so they are loaded before your systems poppler version or you add the paths directly to the .pro files so YACReader's build system will know where to look for them.

You might not even need to compile it yourself for this, it is possible just extracting the newer fedora packages and using the LD_PRELOAD approach would already do the job, but I can't promise you that.

This is intermediate to advanced Linux stuff. Nothing too complicated, but nothing a normal user does on a daily basis. Expect things not to run on the first try, expect that some of my suggestions don't work out of the box, not on your system (or not at all). Also, don't be afraid to ask "stupid" questions, we've all been there.

Edit: Had ./configure instead of ./autogen.sh
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Last Edit: 6 years 3 months ago by selmf.
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1629

ccarpo

Offline

Fresh Boarder

Posts: 6

Karma: 0

Ok so here what worked and what didn't:

What worked
  • Making poppler 0.24.5 -> but this didn't give me the required libpoppler.so.52 but only version .44
  • Prefixing it to /opt
  • Setting LD_PRELOAD variable

What didn't work
  • Making poppler 0.33.0 -> missing jpeg library which couldn't be installed manually..
  • Making YACReader with LD_PRELOAD -> No effect at all
  • Making YACReader with customized YACReader.pro and YACReaderLibrary.pro -> added /opt/lib folder to INCLUDE PATH
unix:!macx{

INCLUDEPATH  += /opt/lib
INCLUDEPATH  += /usr/include/poppler/qt5
LIBS         += -L/usr/lib -lpoppler-qt5

!CONFIG(no_opengl) {
	LIBS	     += -lGLU
	}
}
  • Making YACReader after copying libpoppler.so.52 (and libpoppler.so.52.0.0) from compiled rpm package to /opt/lib

Additional Infos:
  • when setting LD_PRELOAD I also checked if LD_LIBRARY_PATH was set. But both variables were non existing.
  • I did disable SELinux but I read that LD_PRELOAD might be not evaluated on systems with SELinux.

Questions:
  • Should I try to compile any other versions of poppler?
  • Can I make any other changes to the .pro Files?
  • How hard is it to remove PDF support from YACReader because I think I do not really need it. All of my comics are in cbr or cb7
Last Edit: 6 years 3 months ago by ccarpo.
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1631

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

Hi,

forget that Fedora package with poppler-qt5. It will only work with poppler 0.33 which you can't install. Poppler 24.5 will do nicely.

It seems that there is a bug in Poppler 24.5 that affects the compilation of the qt5 wrapper. You need to run a little fix before running the configuration script to make it work, details can be found here:

www.linuxfromscratch.org/blfs/view/7.5/general/poppler.html

Just adding /opt/lib to the library search path won't work. You should go for something like this (make sure to check if the paths are correct and the lib is present):
unix:!macx{

INCLUDEPATH  += /opt/include/poppler/qt5
LIBS         += -L/opt/lib -lpoppler-qt5
[...]

LD_PRELOAD won't be needed then.

Removing pdf support shouldn't be too hard. It is only used in the files common/comic.[cpp|h] and YACReaderLibrary/library_creator.cpp. If you remove it and the function calls from there and the build files, you can build without pdf support.

Btw, if you have cb7 comics you'd probably be better off building YACReader with p7zip instead of unarr (unarr doesn't support cb7 on Linux).
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1635

ccarpo

Offline

Fresh Boarder

Posts: 6

Karma: 0

Ooook,

I tried your hint with the fix for Poppler 24.5. The fix worked without any problems but didn't change anything when compiling.
YACReader still wants to get hold of libpoppler.so.52 but Poppler 24.5 only delivers libpoppler.44.

Then I started modifying the sources. I saw that YAC sometimes would also use poppler-qt4 libs if qt5 wouldn't be available. But this was a dead en because YAC demands that I must use qt5...

After commenting the poppler parts out of the files you mentioned and fixing some compilation problems I only had to install the multimedia and script packages of qt5 and it SUCCESSFULLY compiled :)

I have to postpone installation because work and so on but I just wanted to let you know that it seems I'm on the right track...

Greets CCarpo
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1636

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

Nice to hear you're on the right track. Installing different versions of libraries alongside is tricky, so removing poppler is probably the best solution for you right now. It might be a good idea to add a compile option for that in the future.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1637

ccarpo

Offline

Fresh Boarder

Posts: 6

Karma: 0

Ok. I'm back to compiling.
make install worked as expected but somehow 7zip did not get compiled/installed with it.

When creating a library, importing a comic or opening a comic i get a "unable to load 7zip lib from ./utils"

Is there anything else to do?
My steps to include p7zip:

1. Downloading p7zip 9.20.1
2. extracting the sources to yacreader-8.0/compressed_archive/libp7zip
3. running "qmake-qt5 CONFIG+=7zip" like described in INSTALL.txt
4. and then normally make and make install

Where is "./utils" expected?

.. a little bit later...

I found the yacreaderlibrary.log in ~/.local/share/YACReader/YACReaderLibrary and it gives a better error message:
ERROR 2015-07-15T10:55:31.603 "Loading 7z.dll : Cannot load library /usr/lib/p7zip/7z.so: (/usr/lib/p7zip/lib7z.so: cannot open shared object file: No such file or directory)"

I tried a couple of things: Installing p7zip 9.20 precompiled binaries which installs to /usr/local/lib/p7zip/ and then creating a link from /usr/local/lib/p7zip/ to /usr/lib/p7zip/7z.so
Which gave me an "wrong ELF class: ELFCLASS32" probably because they were compiled with 32 bit and I need 64?!

There also wasthe recommendation I found in yacreader-8.0/compressed_archived/README_7zip.txt
If you wish to keep using
p7zip with YACReader, you can copy 7z.so and Codecs/Rar29.so from p7zip 9.20.1 to "/usr/lib/yacreader/". YACReader will then detect these files and use
them instead of the system provided p7zip files which allows you to keep both YACReader and an up to date p7zip installation.

Are the p7zip files compiled during make of yacreader? Where are the outputfiles there?
I probably have to compile the p7zip myself to get a x64 compatible version which I can then link -_-

Sometimes it's just not fun...
The administrator has disabled public write access.

Compiling under Centos 7 6 years 3 months ago #1639

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

Hi,

yes, the p7zip stuff is not fun at all. That's one of the reason the unarr backend exists. P7zip is however a very widespread program and available as a package on almost every Linux distribution I am aware of. I'd really recommend you to grab one of these packages, for example from Fedora. Make sure it's version 9.20.1, the newer 9.38 versions won't work (the recommendation with /usr/lib/yacreader exitsts for this reason).

You could try compiling p7zip yourself but I advise against it. The program really hasn't aged that well and requires a bit of patching to successfully build, at least on my system. Could be different on yours, the software you're running is a bit older.

The ./utils message is actually something that is only relevant to the mac and windows versions. It seems like I overlooked that stuff when working on the linux integraton. Sorry.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum