Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with Qt6 + Poppler #352

Closed
jbeich opened this issue Nov 4, 2022 · 1 comment
Closed

Fails to build with Qt6 + Poppler #352

jbeich opened this issue Nov 4, 2022 · 1 comment

Comments

@jbeich
Copy link
Contributor

jbeich commented Nov 4, 2022

PDFium isn't packaged on BSDs yet, so the workaround is to disable PDF via CONFIG+=no_pdf.

$ c++ --version
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin

$ pkg install pkgconf poppler-qt6 qt6-5compat qt6-base qt6-multimedia qt6-svg qt6-tools unarr
$ qmake6
Info: creating stash file /tmp/yacreader/.qmake.stash
$ make
cd YACReader/ && ( test -e Makefile || /usr/local/bin/qmake6 -o Makefile /tmp/yacreader/YACReader/YACReader.pro ) && make -f Makefile
Project ERROR: Could not find poppler-qt5
*** Error code 3
../common/comic.cpp:813:16: error: assigning to 'Poppler::Document *' from incompatible type 'std::unique_ptr<Document>'
    pdfComic = Poppler::Document::load(_path);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../common/comic.cpp:886:20: error: no viable conversion from 'std::unique_ptr<Page>' to 'Poppler::Page *'
    Poppler::Page *pdfpage = pdfComic->page(page);
                   ^         ~~~~~~~~~~~~~~~~~~~~
../YACReaderLibrary/initial_comic_info_extractor.cpp:45:28: error: no viable conversion from 'std::unique_ptr<Document>' to 'Poppler::Document *'
        Poppler::Document *pdfComic = Poppler::Document::load(_fileSource);
                           ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
@selmf
Copy link
Member

selmf commented Nov 5, 2022

Yes, that is a known issue.

The Qt6 interface of poppler was not available yet when @luisangelsm started working on the Qt6 port, so we did the same as you and just built with no_pdf.
I am looking into supporting poppler-qt6 right now, but as this contains some subtle API changes, I will probably end up doing some refactoring on the other parts of our PDF backend as well so it does not end up as a larger mess of conditional #ifdefs than it already is.

If you are interested, I can either:

  • Give you a snapshot of my horrible, proof-of-concept not ready for merge yet working poppler-qt6 code
  • Help you package PDFium

selmf added a commit to selmf/yacreader that referenced this issue Nov 13, 2022
selmf added a commit to selmf/yacreader that referenced this issue Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants