Opened 6 years ago

Closed 6 years ago

#6634 closed enhancement (fixed)

Poppler can be compiled with support for QT4 and QT5 at once

Reported by: Chris Staub Owned by: Fernando de Oliveira
Priority: normal Milestone: 7.8
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by Fernando de Oliveira)

The Poppler page says that it will build with support for either QT4 or QT5, 1 at a time, but this isn't true. It can actually compile with support for both at once, if it finds them.

Attachments (1)

test-suite.log (20.4 KB ) - added by Chris Staub 6 years ago.
Qt4 testsuite log

Download all attachments as: .zip

Change History (14)

comment:1 by Fernando de Oliveira, 6 years ago

That was the reason I had modified the page the other way. By copying and pasting, the user would build it with the Qt version(s) that existed in the system. It took a long time to devise the tests so that it worked fine. I still think my page was not only better, but much better than what we have now.

comment:2 by Fernando de Oliveira, 6 years ago

You see now why there were two builds in the page, each one necessary for each Qt. Qt{4,5) could be at /usr or at /opt/qt4,5. But only one can be at /usr. That was the reason for the asymmetry.

I still dream getting back the hardly worked previous page. If the English there was wrong or poor, if the organization was not good, I don't mind, but the instructions were what is correct for BLFS.

I won't take this ticket, unless the fix would be reverting to the previous page and then you, Bruce, anybody else, would fix the Language, keeping the instruction, perhaps explaining better the reason for the instructions.

comment:3 by Fernando de Oliveira, 6 years ago

Not polite, not diplomatic and possibly even wrong, my previous comments.

I would prefer the previous version of the page, but still may be wrong.

Don't understand how it could find both versions of Qt at once.

Will try to do that, to see how it could find both versions of Qt, and if succeeded, will take the ticket.

If somebody else wants the ticket, I don't mind.

comment:4 by Fernando de Oliveira, 6 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

OK, found it.

Now, hopefully, my last apologies to Chris.

Thank you very much, Chris, now I am convinced that the page should be as is + corrections you suggested today.

And my old script will be retired, to reflect this.

comment:5 by Fernando de Oliveira, 6 years ago

Now, I can build at once for both Qt4,5, but 11 tests fail for each Qt. Only 5, for each Qt, pass.

If built for each Qt (thus, source setqt4,5 used and only one Qt version in the PATH), only one set of 16 tests are run, each time.

For both at once (no use of source setqt4,5, both in the PATH), the two test sets, one for each Qt, are run.

I can build for both Qt4,5 with:

      MOCQT4=$QT4DIR/bin/moc \
      MOCQT5=$QT5DIR/bin/moc \
      ./configure ...

and no use of source setqt4,5 run, so, /opt/qt4/bin:/opt/qt5/bin are in the PATH.

Each Qt:

Testsuite summary for poppler 0.33.0
============================================================================
# TOTAL: 16
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
--
Testsuite summary for poppler 0.33.0
============================================================================
# TOTAL: 16
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

Both, at once:

Testsuite summary for poppler 0.33.0
============================================================================
# TOTAL: 16
# PASS:  5
# SKIP:  0
# XFAIL: 0
# FAIL:  11
# XPASS: 0
# ERROR: 0
============================================================================
--
Testsuite summary for poppler 0.33.0
============================================================================
# TOTAL: 16
# PASS:  5
# SKIP:  0
# XFAIL: 0
# FAIL:  11
# XPASS: 0
# ERROR: 0
============================================================================

I can modify the page and and remove the tests.

Last edited 6 years ago by Fernando de Oliveira (previous) (diff)

comment:6 by Fernando de Oliveira, 6 years ago

Chris,

Have you built with both Qt at once? If so, how are your tests? Are you using qtchooser? (Because if this is the case, it could explain you getting perfect test results.)

Everybody,

It would be good having a solution for the tests, but I think that they should not stop us from making the modification suggested by Chris, having both Qt in one go.

comment:7 by Chris Staub, 6 years ago

First, I'd just like to point out that my original suggestion here had nothing to do with altering the book's instructions, it was just about tweaking the descriptive text.

I have managed to build Poppler with both Qt versions at once, though as I don't normally build Qt4 at all I haven't really tested anything beyond just being able to compile and install both poppler-qt libs.

I did just now try running the Poppler testsuite - it ran perfectly, with both Qt versions having been built at once. I did also test another run of the testsuite without downloading the test data as described in BLFS, and I get the same results (11 failures) as given above.

And no, I don't have qtchooser.

Last edited 6 years ago by Chris Staub (previous) (diff)

in reply to:  7 ; comment:8 by Fernando de Oliveira, 6 years ago

Replying to chris@…:

First, I'd just like to point out that my original suggestion here had nothing to do with altering the book's instructions, it was just about tweaking the descriptive text.

Yes. Unfortunately, the logical consequence is that the instructions need to be changed.

I did just now try running the Poppler testsuite - it ran perfectly, with both Qt versions having been built at once. I did also test another run of the testsuite without downloading the test data as described in BLFS, and I get the same results (11 failures) as given above.

The 11 failures are for each Qt. And with fresh test data. And reproducible.

It is important to know as many as possible ways to get both libraries built, before deciding which way to modify the book.

The difference may be essential for the tests being kept or not in the page.

comment:9 by Fernando de Oliveira, 6 years ago

With source setqt4:

checking for POPPLER_QT4... yes
checking for POPPLER_QT4_TEST... yes
checking for moc... moc
checking for Qt4 moc... moc
checking for POPPLER_QT5... yes
checking for POPPLER_QT5_TEST... yes
checking for moc... moc
checking for Qt5 moc... no
checking for moc-qt5... no
checking for Qt5 moc-qt5... checking for qtchooser... no
checking for qtchooser... ./configure: line 23437: qtchooser: command not found
not found

Without using setq4,5 using

MOCQT4=$QT4DIR/bin/moc MOCQT5=$QT5DIR/bin/moc ./configure ...

checking for POPPLER_QT4... yes
checking for POPPLER_QT4_TEST... yes
checking for moc... /opt/qt4/bin/moc
checking for Qt4 moc... /opt/qt4/bin/moc
checking for POPPLER_QT5... yes
checking for POPPLER_QT5_TEST... yes
checking for moc... /opt/qt5/bin/moc
checking for Qt5 moc... /opt/qt5/bin/moc

comment:10 by Fernando de Oliveira, 6 years ago

Without using setq4,5, it uses the first Qt in PATH (I think it is like the old days of Qt3) and gives the result of comment:9.

For those:

  qt4 wrapper:        yes
  qt5 wrapper:        no

If MOCQT4,5 are given:

  qt4 wrapper:        yes
  qt5 wrapper:        yes

in reply to:  8 ; comment:11 by Chris Staub, 6 years ago

Replying to fo:

Replying to chris@…:

First, I'd just like to point out that my original suggestion here had nothing to do with altering the book's instructions, it was just about tweaking the descriptive text.

Yes. Unfortunately, the logical consequence is that the instructions need to be changed.

No, it's not required, the text could easily be updated without having to do anything with installation commands. The page could just say that Poppler can build with both Qt libs but it just won't find both at once when using BLFS instructions.

Of course, if you would like to change the commands as well so that it does work that way, that is possible as well.

I did just now try running the Poppler testsuite - it ran perfectly, with both Qt versions having been built at once. I did also test another run of the testsuite without downloading the test data as described in BLFS, and I get the same results (11 failures) as given above.

The 11 failures are for each Qt. And with fresh test data. And reproducible.

What did you find in qt4/tests/test-suite.log and qt5/tests/test-suite.log when you got these failures? Every time I've gotten failures it was only when I had not downloaded the test suite data, and those log files indicated that every failure was because it could not find a PDF file, and was looking for that file in the same place where the downloaded testsuite data should have been.

It is important to know as many as possible ways to get both libraries built, before deciding which way to modify the book.

The difference may be essential for the tests being kept or not in the page.

by Chris Staub, 6 years ago

Attachment: test-suite.log added

Qt4 testsuite log

in reply to:  11 comment:12 by Fernando de Oliveira, 6 years ago

Replying to chris@…:

Replying to fo:

Replying to chris@…:

First, I'd just like to point out that my original suggestion here had nothing to do with altering the book's instructions, it was just about tweaking the descriptive text.

Yes. Unfortunately, the logical consequence is that the instructions need to be changed.

No, it's not required, the text could easily be updated without having to do anything with installation commands. The page could just say that Poppler can build with both Qt libs but it just won't find both at once when using BLFS instructions.

If it can be built with both, let us do that and show how.

Which implies that the instructions have to be changed.

Of course, if you would like to change the commands as well so that it does work that way, that is possible as well.

Yes, I have already demonstrated that.

I cannot understand why you do not tell us how you did it, after having raised the problem. I am waiting for this info, so we can compare the two forms and decide which one should go into the book.

But if you do not want to tell us that, I respect, just tell us, and I will use what I found to work.

I did just now try running the Poppler testsuite - it ran perfectly, with both Qt versions having been built at once. I did also test another run of the testsuite without downloading the test data as described in BLFS, and I get the same results (11 failures) as given above.

The 11 failures are for each Qt. And with fresh test data. And reproducible.

What did you find in qt4/tests/test-suite.log and qt5/tests/test-suite.log when you got these failures? Every time I've gotten failures it was only when I had not downloaded the test suite data, and those log files indicated that every failure was because it could not find a PDF file, and was looking for that file in the same place where the downloaded testsuite data should have been.

And you are right!!! Thank you very much!'''

I had the same problem, when I included the test suite instructions in the book as they are now, and had forgotten it. And forgot to check the test-suite.log for the two Qts.

The problem is the $PWD. I use in my scripts a variable CONFIGURE, defined before build, including uncompress, starts. There, PWD=/tmp, which is wrong, at least for my script. Now, I moved the definition after inside the source directory, PWD is correct, and files are found. Result is perfect!

Thanks, again!

==============================================
   poppler 0.33.0: qt4/tests/test-suite.log
==============================================

# TOTAL: 16
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2
==============================================
   poppler 0.33.0: qt5/tests/test-suite.log
==============================================

# TOTAL: 16
# PASS:  16
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

comment:13 by Fernando de Oliveira, 6 years ago

Description: modified (diff)
Resolution: fixed
Status: assignedclosed
Summary: Slight inaccuracy on Poppler pagePoppler can be compiled with support for QT4 and QT5 at once

Fixed at r16161.

Note: See TracTickets for help on using tickets.