Navigation Menu

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

qmake on Ubuntu 19.10 fails #278

Closed
dinojr opened this issue Mar 10, 2020 · 15 comments
Closed

qmake on Ubuntu 19.10 fails #278

dinojr opened this issue Mar 10, 2020 · 15 comments

Comments

@dinojr
Copy link

dinojr commented Mar 10, 2020

I've successfully managed to build the ThidParty software but the main Openboard build fails with:

make OpenBoard.pro -spec linux-g++-64
sh: 1: Syntax error: "&" unexpected
sh: 1: Syntax error: "&" unexpected
sh: 1: Syntax error: "&" unexpected

@toehold
Copy link

toehold commented Mar 17, 2020

Same for me on Ubuntu 18.04

@sarsorus
Copy link

Was the command "make" or "qmake" ? Readme suggests qmake. I just compiled and had these errors as well when using cmake, but it didn't stop the compilation process.

@dinojr
Copy link
Author

dinojr commented Mar 22, 2020

My bad. It is indeed qmake in the docs and that's what I ran:

qmake OpenBoard.pro -spec linux-g++-64
sh: 1: Syntax error: "&" unexpected
sh: 1: Syntax error: "&" unexpected
sh: 1: Syntax error: "&" unexpected

According to the docs, the next step is make, which failed too.

make
make -f Makefile.Release
make[1]: Entering directory '/home/wilk/git-repositories/OpenBoard'
make[1]: *** No rule to make target 'QtWebKit/QWebView', needed by 'build/linux/release/ui/ui_trapFlash.h'.  Stop.
make[1]: Leaving directory '/home/wilk/git-repositories/OpenBoard'
make: *** [Makefile:42: release] Error 2

I also tried running the build.sh script in release_scripts/linux which failed with the same error message about QWebView

@dinojr dinojr changed the title qmake on Ubuntu 1.10 fails qmake on Ubuntu 19.10 fails Mar 22, 2020
@kaamui
Copy link
Member

kaamui commented Mar 23, 2020

hello,

you need to go to the dev-qt5.1x branch to build with latest qt releases

@dinojr
Copy link
Author

dinojr commented Mar 23, 2020 via email

@mdeguzis
Copy link

Same on Pop!_OS 19.10

In file included from src/pdf/XPDFRenderer.h:41,
                 from src/pdf/PDFRenderer.cpp:35:
/usr/include/poppler/SplashOutputDev.h:197:5: error: ‘SplashThinLineMode’ has not been declared
  197 |     SplashThinLineMode thinLineMode = splashThinLineDefault,
      |     ^~~~~~~~~~~~~~~~~~
/usr/include/poppler/SplashOutputDev.h:197:39: error: ‘splashThinLineDefault’ was not declared in this scope
  197 |     SplashThinLineMode thinLineMode = splashThinLineDefault,
      |                                       ^~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile.Release:6067: build/linux/release/objects/PDFRenderer.o] Error 1
make[1]: Leaving directory '/home/mikeyd/github-repos/OpenBoard'
make: *** [Makefile:42: release] Error 2

@GavinSmith0123
Copy link

sh: 1: Syntax error: "&" unexpected

I get the same. Can the requirement to switch to the dev-qt5.1x branch be added to README.md?

@GavinSmith0123
Copy link

It doesn't work:

$ git status
On branch dev-qt5.1x
Your branch is up-to-date with 'origin/dev-qt5.1x'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .qmake.stash

nothing added to commit but untracked files present (use "git add" to track)
$ rm .qmake.stash 
$ qmake OpenBoard.pro -spec linux-g++-64
Info: creating stash file /home/g/extsrc/openboard/OpenBoard/.qmake.stash
sh: 1: Syntax error: "&" unexpected
Project ERROR: Unknown module(s) in QT: webkit svg script xmlpatterns uitools multimedia webkitwidgets multimediawidgets
$ 

@GavinSmith0123
Copy link

Running qmake -d OpenBoard.pro -spec linux-g++-64 |& tee qmake.log and then looking at the log file, there are the lines:

DEBUG 1: /home/g/extsrc/openboard/OpenBoard/src/podcast/podcast.pri:61: DEPENDPATH := /usr/lib/x86_64-linux-gnu
DEBUG 1: /home/g/extsrc/openboard/OpenBoard/src/podcast/podcast.pri:63: LIBS := -lavformat -lavcodec -lswscale -lavutil -lva-x11 -lva -lxcb-shm -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lX11 -lasound -lSDL -lx264 -lpthread -
+lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopus -lmp3lame -lfreetype -lfdk-aac -lass -llzma -lbz2 -lz -ldl -lswresample -lswscale -lavutil -lm
DEBUG 1: /home/g/extsrc/openboard/OpenBoard/src/podcast/podcast.pri:70: calling built-in $$system("ffmpeg --version|& grep -oP version.*?\\K[0-9]\\.[0-9]")
sh: 1: Syntax error: "&" unexpected
DEBUG 1: /home/g/extsrc/openboard/OpenBoard/src/podcast/podcast.pri:70: FFMPEG_VERSION :=
DEBUG 1: /home/g/extsrc/openboard/OpenBoard/src/podcast/podcast.pri:71: evaluating test function "equals"

The issue appears to be the |& in the call to ffmpeg. I am guessing that this only works with bash and does not work with thesh program that is being run here.

@GavinSmith0123
Copy link

I had a long list of Qt modules that were missing:

Project ERROR: Unknown module(s) in QT: webkit svg script xmlpatterns uitools multimedia webkitwidgets multimediawidgets

On Linux Mint 19.2 (which is mostly the same as Ubuntu), I resolved most of these by installing various packages:

sudo apt-get install libqt5webkit5-dev libqt5svg5-dev libqt5xmlpatterns5 qt5-default qttools5-dev-tools qtmultimedia5-dev libqt5xmlpatterns5-dev libqt5script5 qtcreator. (I don't know which of these were necessary.)

But there is still the "script" module that I can't install. Any ideas where I would get this?

Someone else had the same problem 4 years ago: #58 (comment)

@GavinSmith0123
Copy link

I found it was sudo apt-get install qtscript5-dev. With this qmake runs successfully.

@GavinSmith0123
Copy link

After getting a lot further after making one or two changes, make runs for a long time, but breaks with the output below.

It is a pity, I was interested at looking at the source code of OpenBoard and possibly making a few changes, but building it from source is at the moment an impenetrable obstacle.

g++ -c -m64 -pipe -std=c++11 -fopenmp -O2 -std=gnu++1y -w -D_REENTRANT -fPIC -DNO_THIRD_PARTY_WARNINGS -DUBVERSION="\"1.6.1-a.1116."\" -DUBVERSION_RC=1,6,1,160,1116 -DPRE_RELEASE -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_CORE_LIB -Isrc -Isrc/web/browser -Isrc/qtsingleapplication/src -Isrc/pdf-merger -Iplugins/cffadaptor/src -isystem /usr/include/quazip5 -isystem /usr/include/poppler -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtUiTools -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimediaWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimedia -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXmlPatterns -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtScript -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibuild/linux/release/moc -isystem /usr/include/libdrm -Ibuild/linux/release/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/linux/release/objects/XPDFRenderer.o src/pdf/XPDFRenderer.cpp
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qpolygon.h:44:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qmatrix.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtransform.h:43,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qimage.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/QImage:1,
                 from src/pdf/XPDFRenderer.h:32,
                 from src/pdf/XPDFRenderer.cpp:30:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h: In instantiation of ‘void QVector<T>::defaultConstruct(T*, T*) [with T = XPDFRenderer::PdfZoomCacheData]’:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:580:41:   required from ‘void QVector<T>::reallocData(int, int, QArrayData::AllocationOptions) [with T = XPDFRenderer::PdfZoomCacheData; QArrayData::AllocationOptions = QFlags<QArrayData::AllocationOption>]’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:677:20:   required from ‘void QVector<T>::append(T&&) [with T = XPDFRenderer::PdfZoomCacheData]’
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:261:35:   required from ‘void QVector<T>::push_back(T&&) [with T = XPDFRenderer::PdfZoomCacheData]’
src/pdf/XPDFRenderer.cpp:60:78:   required from here
/usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:322:13: error: no matching function for call to ‘XPDFRenderer::PdfZoomCacheData::PdfZoomCacheData()’
             new (from++) T();
             ^~~~~~~~~~~~~~~~
In file included from src/pdf/XPDFRenderer.cpp:30:0:
src/pdf/XPDFRenderer.h:92:13: note: candidate: XPDFRenderer::PdfZoomCacheData::PdfZoomCacheData(double)
             PdfZoomCacheData(double const a_ratio) : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(a_ratio), hasToBeProcessed(false) {};
             ^~~~~~~~~~~~~~~~
src/pdf/XPDFRenderer.h:92:13: note:   candidate expects 1 argument, 0 provided
src/pdf/XPDFRenderer.h:91:16: note: candidate: XPDFRenderer::PdfZoomCacheData::PdfZoomCacheData(const XPDFRenderer::PdfZoomCacheData&)
         struct PdfZoomCacheData {
                ^~~~~~~~~~~~~~~~
src/pdf/XPDFRenderer.h:91:16: note:   candidate expects 1 argument, 0 provided
Makefile.Release:5952: recipe for target 'build/linux/release/objects/XPDFRenderer.o' failed
make[1]: *** [build/linux/release/objects/XPDFRenderer.o] Error 1
make[1]: Leaving directory '/home/g/extsrc/openboard/OpenBoard'
Makefile:40: recipe for target 'release' failed
make: *** [release] Error 2
$ 

@GavinSmith0123
Copy link

Is it possible to disable features in OpenBoard to make it easier to build? For example, could you disable pdf support, having an embedded web browser, and the feature to create podcasts? You could have a functional interactive whiteboard program without these.

@GavinSmith0123
Copy link

GavinSmith0123 commented Nov 28, 2020

The errors I posted in a previous message appear to be related to recent changes in the code which means that a constructor is missing. According to https://doc.qt.io/qt-5/containers.html#assignable-data-type:

The values stored in the various containers can be of any assignable data type. To qualify, a type must provide a copy constructor, and an assignment operator. For some operations a default constructor is also required. This covers most data types you are likely to want to store in a container, including basic types such as int and double, pointer types, and Qt data types such as QString, QDate, and QTime, but it doesn't cover QObject or any QObject subclass (QWidget, QDialog, QTimer, etc.). If you attempt to instantiate a QList, the compiler will complain that QWidget's copy constructor and assignment operators are disabled. If you want to store these kinds of objects in a container, store them as pointers, for example as QList<QWidget *>.

I am going to try building using an earlier version in git.

@GavinSmith0123
Copy link

I successfully built it with the master branch (85eb094e) - the dev-qt5.1x branch is a red herring. I just needed one change for qmake to run:

diff --git a/src/podcast/podcast.pri b/src/podcast/podcast.pri
index e96263fa..26042429 100644
--- a/src/podcast/podcast.pri
+++ b/src/podcast/podcast.pri
@@ -69,7 +69,7 @@ linux-g++* {
             -lxcb-xfixes \
             -lxcb-render -lxcb-shape -lxcb -lX11 -lasound -lSDL -lx264 -lpthread -lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopus -lmp3lame -lfreetype -lfdk-aac -lass -llzma -lbz2 -lz -ldl -lswresample -lswscale -lavutil -lm
 
-    FFMPEG_VERSION = $$system(ffmpeg --version|& grep -oP "version.*?\K[0-9]\.[0-9]")
+    FFMPEG_VERSION = $$system(ffmpeg -version | grep -oP "version.*?\K[0-9]\.[0-9]")
     equals(FFMPEG_VERSION, 2.8) {
         LIBS -= -lswresample
         LIBS += -lavresample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants