Welcome to the forum, Guest

  • Page:
  • 1
  • 2

TOPIC: YACReaderLibraryServer compile error on Fedora 28

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3967

kavmoradhassel

Offline

Fresh Boarder

Posts: 9

Karma: 0

Hi there...I'm trying to compile the standalone server on Fedora 28, with libunarr 1.0.1 extracted into compressed_archive/unarr, but I've hit the following error and I'm not sure what to do next:

g++ -Wl,-O1 -o YACReaderLibraryServer library_creator.o package_manager.o bundle_creator.o db_helper.o data_base_management.o comic_db.o folder.o library_item.o comic.o bookmarks.o qnaturalsorting.o yacreader_local_server.o comics_remover.o http_worker.o yacreader_global.o yacreader_libraries.o comic_files_manager.o console_ui_library_creator.o main.o static.o startup.o requestmapper.o comiccontroller.o errorcontroller.o foldercontroller.o folderinfocontroller.o librariescontroller.o pagecontroller.o sessionmanager.o covercontroller.o updatecomiccontroller.o comicdownloadinfocontroller.o synccontroller.o logmessage.o logger.o filelogger.o dualfilelogger.o httplistener.o httpconnectionhandler.o httpconnectionhandlerpool.o httprequest.o httpresponse.o httpcookie.o httprequesthandler.o httpsession.o httpsessionstore.o staticfilecontroller.o template.o templateloader.o templatecache.o compressed_archive.o QsLogDest.o QsLog.o QsLogDestConsole.o QsLogDestFile.o QsLogDestFunctor.o qrc_images.o moc_library_creator.o moc_package_manager.o moc_bundle_creator.o moc_data_base_management.o moc_comic_db.o moc_library_item.o moc_comic.o moc_bookmarks.o moc_yacreader_local_server.o moc_comics_remover.o moc_http_worker.o moc_yacreader_libraries.o moc_comic_files_manager.o moc_console_ui_library_creator.o moc_requestmapper.o moc_comiccontroller.o moc_errorcontroller.o moc_foldercontroller.o moc_folderinfocontroller.o moc_librariescontroller.o moc_pagecontroller.o moc_covercontroller.o moc_updatecomiccontroller.o moc_comicdownloadinfocontroller.o moc_synccontroller.o moc_logger.o moc_filelogger.o moc_dualfilelogger.o moc_httplistener.o moc_httpconnectionhandler.o moc_httpconnectionhandlerpool.o moc_httprequesthandler.o moc_httpsessionstore.o moc_staticfilecontroller.o moc_templateloader.o moc_templatecache.o moc_compressed_archive.o moc_QsLogDestFunctor.o   -lpoppler-qt5 -lQt5Gui -lQt5Sql -lQt5Network -lQt5Core -lGL -lpthread 
compressed_archive.o: In function `CompressedArchive::getAllData(QVector<unsigned int> const&, ExtractDelegate*)':
compressed_archive.cpp:(.text+0x150): undefined reference to `ar_parse_entry_at'
compressed_archive.cpp:(.text+0x15a): undefined reference to `ar_entry_get_size'
compressed_archive.cpp:(.text+0x1ad): undefined reference to `ar_entry_uncompress'
compressed_archive.o: In function `CompressedArchive::getRawDataAtIndex(int)':
compressed_archive.cpp:(.text+0x34a): undefined reference to `ar_parse_entry_at'
compressed_archive.cpp:(.text+0x358): undefined reference to `ar_entry_get_size'
compressed_archive.cpp:(.text+0x3a4): undefined reference to `ar_entry_uncompress'
compressed_archive.o: In function `CompressedArchive::~CompressedArchive()':
compressed_archive.cpp:(.text+0x427): undefined reference to `ar_close_archive'
compressed_archive.cpp:(.text+0x430): undefined reference to `ar_close'
compressed_archive.o: In function `CompressedArchive::CompressedArchive(QString const&, QObject*)':
compressed_archive.cpp:(.text+0x501): undefined reference to `ar_open_file'
compressed_archive.cpp:(.text+0x536): undefined reference to `ar_open_rar_archive'
compressed_archive.cpp:(.text+0x559): undefined reference to `ar_entry_get_size'
compressed_archive.cpp:(.text+0x567): undefined reference to `ar_parse_entry'
compressed_archive.cpp:(.text+0x574): undefined reference to `ar_at_eof'
compressed_archive.cpp:(.text+0x5a1): undefined reference to `ar_entry_get_name'
compressed_archive.cpp:(.text+0x5f2): undefined reference to `ar_entry_get_offset'
compressed_archive.cpp:(.text+0x64d): undefined reference to `ar_open_tar_archive'
compressed_archive.cpp:(.text+0x668): undefined reference to `ar_open_zip_archive'
collect2: error: ld returned 1 exit status
make: *** [Makefile:447: YACReaderLibraryServer] Error 1


Any ideas? Thanks in advance!
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3968

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

The files must be extracted into compressed_archive/unarr/master. You can either move the files, or, as I'd recommend … install libunarr as a package. Working libunarr packages for Fedora can be found here:

software.opensuse.org//download.html?pro...elmf%3Ayacreader-rpm
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3987

kavmoradhassel

Offline

Fresh Boarder

Posts: 9

Karma: 0

I think I replied directly to selmf by accident...sorry!

When I extract to the "master" sub-directory, or when I install the libunarr RPM, I get the same error, shown below:

g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DSERVER_RELEASE -DNOMINMAX -DYACREADER_LIBRARY -DQT_NO_DEBUG_OUTPUT -DLIBDIR=\"/usr/lib\" -DDATADIR=\"/usr/share\" -DBINDIR=\"/usr/bin\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../YACReaderLibrary -I../common -I../YACReaderLibrary/server -I../YACReaderLibrary/db -I../YACReaderLibrary/server -I../YACReaderLibrary/server/lib/bfLogging -I../YACReaderLibrary/server/lib/bfHttpServer -I../YACReaderLibrary/server/lib/bfTemplateEngine -I../compressed_archive/unarr -I../QsLog -isystem /usr/include/poppler/qt5 -isystem /usr/include/poppler -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o library_creator.o ../YACReaderLibrary/library_creator.cpp
In file included from ../YACReaderLibrary/library_creator.cpp:15:
../compressed_archive/unarr/compressed_archive.h:7:10: fatal error: unarr.h: No such file or directory
 #include <unarr.h>
          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:1007: library_creator.o] Error 1


I looked at the source RPM, but it only contains the same .tar.xz packaged file that I started with originally. Do I need to extract the source into compressed_archive/unarr and install the binaries from the RPM?
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3990

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

I rechecked the code and I need to correct myself: For an embedded build, the source has to be in "unarr-master". If you extract the master zip as described here this happens automatically:

github.com/selmf/yacreader/blob/master/c...ive/unarr/README.txt

However, if you extract the release tarball, you will have to rename the extracted directory, i.e. unarr-version needs to be changed to unarr-master. The build system should pick it up then.

Regarding the failing rpm package I can confirm that there is a problem. When you requested help I added some newer Fedora versions to my OpenSuse Buildservice account, but these builds have all failed. I will investigate the issue.

Thanks for reporting and sorry for giving you wrong information :(

Edit: Also, before I forget this … make sure that you use the latest git checkout for 9.0.0, not the source tarball. I had to add some build system fixes after release which are related to server builds with embedded unarr.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Last Edit: 3 years 4 months ago by selmf.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3991

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

The libunarr package should actually work too. It is picked up in my builds (build fails for other reasons). Did you install the development package with the headers too?
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #3999

kavmoradhassel

Offline

Fresh Boarder

Posts: 9

Karma: 0

OK, using the latest from the repository and extracting the unarr source to unarr-master allows the build to complete.

However, now every command I try with my comics library results in "Directory not found".

I do notice that --version reports 9.5.0...did I pick up too recent a version from the repo? When you say "latest checkout for 9.0.0", does that map to a specific branch or tag? I think I pulled from the develop branch.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #4000

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

9.5.0 is the current alpha/beta and it's indeed the develop branch. I had the master branch in mind but dev is fine too, it actually should run more stable and it has better diagnostics.

Can you give me an example of a command not working and the corresponding library path?
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #4014

kavmoradhassel

Offline

Fresh Boarder

Posts: 9

Karma: 0

Sorry, it took me a while to get back to this.

Basically, any command gives the error. Looking at the log, I think the problem is that the upgraded server isn't recognizing the library for some reason...here's a section of the log from before the upgrade and then after:
INFO  2018-06-03T01:25:57.570 YACReaderLibraryServer attempting to start 
INFO  2018-06-03T01:25:57.590 ---------- System & configuration ---------- 
INFO  2018-06-03T01:25:57.590 SO : Linux (unknown version) 
INFO  2018-06-03T01:25:57.590 7z : found 
INFO  2018-06-03T01:25:57.590 Libraries:  QMap(("Comics", QPair(1,"/srv/comics"))) 
INFO  2018-06-03T01:25:57.590 -------------------------------------------- 
INFO  2018-06-03T01:25:57.771 YACReaderLibrary starting 
INFO  2018-06-03T19:13:16.761 YACReaderLibraryServer attempting to start 
INFO  2018-06-03T19:13:16.791 ---------- System & configuration ---------- 
INFO  2018-06-03T19:13:16.807 OS: "Fedora 28 (Twenty Eight)" Version:  "28" 
INFO  2018-06-03T19:13:16.807 Kernel: "linux" "4.15.15-300.fc27.x86_64" Architecture: "x86_64" 
INFO  2018-06-03T19:13:16.807 Libraries:  QMap() 
INFO  2018-06-03T19:13:16.807 -------------------------------------------- 
INFO  2018-06-03T19:13:16.808 YACReaderLibrary starting 

Note the empty "QMap()" in the second startup.

When upgrading from 8.5.0 to >=9.0.0, do I need to re-create my library, or translate some config file in some way?
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 4 months ago #4015

selmf

Offline

Developer

Posts: 604

Thank you received: 130

Karma: 17

No, upgrading shouldn't be an issue in this case. I think this is a path problem. Older versions of the headless server did not do any path checking and accepted whatever path you gave them. Current versions check the path and convert relative paths to absolute paths.
Is your library really located at "/srv/comics"? Double-check that path and see if you can access it with other tools, then try adding it as a library to headless server.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer compile error on Fedora 28 3 years 3 months ago #4115

kavmoradhassel

Offline

Fresh Boarder

Posts: 9

Karma: 0

Sorry, it took me a while to get back to this, so I decided to try with the newly-released 9.5.0 in the master branch. But I'm getting the same result. Having a quick look at the code, it seems to be the ConsoleUILibraryCreator::createLibrary method in YACReaderLibraryServer/console_ui_library_creator.cpp that is giving me the "Directory not found." response, based on not being able to open the path. But I've confirmed that /srv/comics really does exist, and it really does contain my library.

So I'll take a step back and describe what I'm doing...I build the server into a Docker image, where the server is compiled using the root account, but then run using a local account with the same UID:GID as the account that owns the filesystem with my comics library. The local account defined in the image has /srv/comics defined as its home directory, and this is also defined as a VOLUME in the image. I then create the Docker container for the server with this image, with the host filesystem containing my library mounted as /srv/comics inside the container.

I notice that someone else has reported the same issue with using version 9.x of the server in a Docker container, in the latest reply to the "YacReaderLibraryServer dockerized" post. So I suspect there's some configuration item or maybe file ownership issue that has changed for 9.x that needs to be addressed when the server is dockerized.

Does that clear up the problem at all? This problem was interesting before now, but now it's a blocker for me, with the new iOS app release that requires 9.5.0 on the server side.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum