Connexion
Ce forum permet à des personnes du monde entier de communiquer, c′est pourquoi les messages échangés sont en anglais.

Compiling under Ubuntu 18.04

  • 2 0
    Message de Kim Åke le
    Hi, I should have all dependencies installed, I get until this with make:

    I fixed by hand the underscore error in the name of the variable that was discussed in a earlier thread, and get until this with make after that:

    Is there something wrong with QT libraries?arklib -I/usr/include/alsa -I/usr/include/rtmidi -IRELEASE/.moc -IRELEASE/.ui -o RELEASE/.obj/parameter.o sf2_core/parameter.cpp pages/envelopeditor.cpp: In constructor ‘EnvelopEditor::EnvelopEditor(QWidget*)’: pages/envelopeditor.cpp:60:20: error: ‘class QImage’ has no member named ‘setPixelColor’; did you mean ‘setColor’? imageG.setPixelColor(i, j, greenColor); ^~~~~~~~~~~~~ setColor pages/envelopeditor.cpp:61:20: error: ‘class QImage’ has no member named ‘setPixelColor’; did you mean ‘setColor’? imageG.setPixelColor(16 + i, j, Qt::transparent); ^~~~~~~~~~~~~ setColor pages/envelopeditor.cpp:62:20: error: ‘class QImage’ has no member named ‘setPixelColor’; did you mean ‘setColor’? imageR.setPixelColor(i, j, redColor); ^~~~~~~~~~~~~ setColor pages/envelopeditor.cpp:63:20: error: ‘class QImage’ has no member named ‘setPixelColor’; did you mean ‘setColor’? imageR.setPixelColor(16 + i, j, Qt::transparent); ^~~~~~~~~~~~~ setColor pages/envelopeditor.cpp: In member function ‘void EnvelopEditor::addSample(EltID)’: pages/envelopeditor.cpp:316:42: error: ‘class QVector<double>’ has no member named ‘length’ if (startLoop < 0 || endLoop > dataD.length()) ^~~~~~ pages/graphicsviewenvelop.cpp: In member function ‘void GraphicsViewEnvelop::setPosX(int)’: pages/graphicsviewenvelop.cpp:166:28: error: invalid use of incomplete type ‘class QScrollBar’ if (this->_qScrollX->maximum() > 0) ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:167:57: error: invalid use of incomplete type ‘class QScrollBar’ this->_posX = (double)posX / this->_qScrollX->maximum(); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp: In member function ‘void GraphicsViewEnvelop::zoomDrag()’: pages/graphicsviewenvelop.cpp:194:18: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->blockSignals(true); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:195:18: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->setPageStep(10000. / _zoomX); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:196:18: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->setRange(0, 10000. - _qScrollX->pageStep()); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:196:50: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->setRange(0, 10000. - _qScrollX->pageStep()); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:197:18: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->setValue(_qScrollX->maximum() * _posX); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:197:38: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->setValue(_qScrollX->maximum() * _posX); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp:198:18: error: invalid use of incomplete type ‘class QScrollBar’ _qScrollX->blockSignals(false); ^~ In file included from /usr/include/qt4/QtGui/qabstractitemview.h:45:0, from /usr/include/qt4/QtGui/qtreeview.h:45, from /usr/include/qt4/QtGui/qtreewidget.h:45, from sf2_core/tree.h:28, from sf2_core/pile_sf2.h:30, from pages/graphicsviewenvelop.h:29, from pages/graphicsviewenvelop.cpp:25: /usr/include/qt4/QtGui/qabstractscrollarea.h:56:7: note: forward declaration of ‘class QScrollBar’ class QScrollBar; ^~~~~~~~~~ pages/graphicsviewenvelop.cpp: In member function ‘void GraphicsViewEnvelop::setSample(QVector<double>, int, int, int, int)’: pages/graphicsviewenvelop.cpp:322:18: error: ‘class QVector<double>’ has no member named ‘length’ if (data.length() - currentSmplPos < nbRead) ^~~~~~ pages/graphicsviewenvelop.cpp:324:38: error: ‘class QVector<double>’ has no member named ‘length’ for (int i = 0; i < data.length() - currentSmplPos; i++) ^~~~~~ pages/graphicsviewenvelop.cpp:329:31: error: ‘class QVector<double>’ has no member named ‘length’ for (int i = data.length() - currentSmplPos; i < nbRead; i++) ^~~~~~ pages/graphicsviewenvelop.cpp:334:35: error: ‘class QVector<double>’ has no member named ‘length’ currentSmplPos = data.length(); ^~~~~~ pages/graphicsviewenvelop.cpp:375:18: error: ‘class QVector<double>’ has no member named ‘length’ if (data.length() - currentSmplPos < nbRead) ^~~~~~ pages/graphicsviewenvelop.cpp:377:38: error: ‘class QVector<double>’ has no member named ‘length’ for (int i = 0; i < data.length() - currentSmplPos; i++) ^~~~~~ pages/graphicsviewenvelop.cpp:382:31: error: ‘class QVector<double>’ has no member named ‘length’ for (int i = data.length() - currentSmplPos; i < nbRead; i++) ^~~~~~ pages/graphicsviewenvelop.cpp:387:35: error: ‘class QVector<double>’ has no member named ‘length’ currentSmplPos = data.length(); ^~~~~~ pages/graphicsviewenvelop.cpp: In member function ‘void GraphicsViewEnvelop::setEnvelopStyle(int, bool, bool, bool)’: pages/graphicsviewenvelop.cpp:403:59: warning: unused parameter ‘isGlobal’ [-Wunused-parameter] void GraphicsViewEnvelop::setEnvelopStyle(int index, bool isGlobal, bool isVolume, bool isMain) ^~~~~~~~ pages/graphicsviewenvelop.cpp: In member function ‘virtual void GraphicsViewEnvelop::wheelEvent(QWheelEvent*)’: pages/graphicsviewenvelop.cpp:540:9: error: ‘qScrollX’ was not declared in this scope qScrollX->setValue(qScrollX->value() - 0.2 * event->delta()); ^~~~~~~~ pages/graphicsviewenvelop.cpp:540:9: note: suggested alternative: ‘_qScrollX’ qScrollX->setValue(qScrollX->value() - 0.2 * event->delta()); ^~~~~~~~ _qScrollX /usr/lib/x86_64-linux-gnu/qt4/bin/moc -DUSE_LOCAL_QCUSTOMPLOT -DVERSION=1.9 -DFINAL=true -D__LINUX_ALSASEQ__ -D__LITTLE_ENDIAN__ -D__UNIX_JACK__ -D__LINUX_ALSA__ -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/jack -I/usr/include/stk -Ilib/qcustomplot -Igui_divers -Iconfiguration -Ipages -Iqcustomplot -Iressources -Isf2_core -Itools -Iclavier -Isynthetiseur -Isynthetiseur/elements -Isfark -Ilib/sf3 -I. -Ilib/sfarklib -I/usr/include/alsa -I/usr/include/rtmidi -IRELEASE/.moc -IRELEASE/.ui lib/qcustomplot/qcustomplot.h -o RELEASE/.moc/moc_qcustomplot.cpp /usr/lib/x86_64-linux-gnu/qt4/bin/moc -DUSE_LOCAL_QCUSTOMPLOT -DVERSION=1.9 -DFINAL=true -D__LINUX_ALSASEQ__ -D__LITTLE_ENDIAN__ -D__UNIX_JACK__ -D__LINUX_ALSA__ -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I/usr/include/jack -I/usr/include/stk -Ilib/qcustomplot -Igui_divers -Iconfiguration -Ipages -Iqcustomplot -Iressources -Isf2_core -Itools -Iclavier -Isynthetiseur -Isynthetiseur/elements -Isfark -Ilib/sf3 -I. -Ilib/sfarklib -I/usr/include/alsa -I/usr/include/rtmidi -IRELEASE/.moc -IRELEASE/.ui mainwindow.h -o RELEASE/.moc/moc_mainwindow.cpp Makefile:1463: recipe for target 'RELEASE/.obj/envelopeditor.o' failed make: *** [RELEASE/.obj/envelopeditor.o] Error 1 make: *** Waiting for unfinished jobs.... Makefile:1457: recipe for target 'RELEASE/.obj/graphicsviewenvelop.o' failed make: *** [RELEASE/.obj/graphicsviewenvelop.o] Error 1
  • 417 0
    Message de Davy le
    Hello,
    Which version of Qt are you using? I found this thanks to Google but I'm not sure it will solve the problem
    https://forum.qt.io/topic/52299/solved-h…-in-qt-5-4-0-build/4 
  • 2 0
    Message de Kim Åke le
    It seems I have both QT4 and 5 installed. I think I had a similar problem with Synthclone, there was a command line option needed that forced to use V4 at compile time, since I think the default is V5 now on my system. I'll need to try that, I think I have it written up somewhere.

    The fix for Synthclone was: ./configure --prefix=/usr --qmake="/usr/lib/x86_64-linux-gnu/qt4/bin/qmake"

    So I ran /usr/lib/x86_64-linux-gnu/qt4/bin/qmake instead of qmake, command gave no output so I guess was OK. I tried make -j6 and hit the same errors again.
  • 4 0
    Message de John Lemcke le 1
    Hi,
    I just tried to compile from source and had similar issues.

    The source of the problem seems to be in the README file that states.

    ...
    The following libraries are required (the name may vary depending on your system):
    - qt (libqt4-dev / qt4-devel)
    ...
    So I installed libqt4-dev, and the rest of the dependencies. (BTW libjack-jack2-dev should be libjack-jackd2-dev)
    After a number of attempts to compile I realised that the errors were because the code is using Qt5 methods.
    I removed libqt4-dev and installed qtbase5-dev and also needed to install libqt5svg5-dev.
    I also needed to do a make distclean to get the correct libraries to link. I think that just removing .qmake.stash may have been enough.

    In Summary make distclean apt remove libqt4-dev apt install qtbase5-dev apt install libqt5svg5-dev qmake && make -j6 cd RELEASE ./polyphone
  • Go 4 0
    Message de GonzoB le
    Hi all.

    I'm trying to compile on Ubuntu Mate 18.04
    I installed all the prerequisites and ran
    qmake-qt4 && make

    I got all the _qscrollX errors and fixed them by putting in the underscore. Now I have this: pages/graphicsviewenvelop.cpp: In member function ‘void GraphicsViewEnvelop::setPosX(int)’: pages/graphicsviewenvelop.cpp:166:28: error: invalid use of incomplete type ‘class QScrollBar’ if (this->_qScrollX->maximum() > 0) ^~ What now?

    Gonzo
  • 417 0
    Message de Davy le
    Try to add the following line at the top of the file "graphicsviewenvelop.cpp"#include <QScrollBar>
  • Go 4 0
    Message de GonzoB le
    Thanks, Davy.

    I did that, then got this:pages/graphicsviewenvelop.cpp:323:18: error: ‘class QVector<double>’ has no member named ‘length’ if (data.length() - currentSmplPos < nbRead) ^~~~~~ This error repeats a number of times in the lines following the above. Is there some declaration missing?

    Gonzo
  • 417 0
    Message de Davy le
    It seems that this thread is already answering this issue please see
    https://www.polyphone.io/o/en/forum/supp…der-ubuntu-18-04#702
  • Go 4 0
    Message de GonzoB le
    Thanks, Davy.

    I had actually read the thread, and the other recent one on this subject, and I have tried all the suggestions. I am obviously missing something.

    I loaded Qt Creator, and it came up with the same errors.

    So now neither Swami nor Polyphone runs on the latest Ubuntu. I have no soundfont editor to use with Fluidsynth.

    Gonzo
  • 4 0
    Message de John Lemcke le
    I'm pretty sure this is a Qt4 vs. Qt5 issue. If you have a look at

    Qt 4.8 QVector docs 
    and
    Qt 5.11 QVector docs 

    you will see that the length() method was not available in Qt4.

    So it seems that you are still linking against the Qt4 libraries. Have another look at my previous post, there may be some other packages that you have installed that need to be removed, or perhaps an 'apt-get purge libqt4-dev' is needed.

    BTW: I am not a Qt expert, so there may be some Qt4/Qt5 configuration that I am missing, but what I posted earlier worked for me. YMMV

    Have Fun,
    JL
  • Go 4 0
    Message de GonzoB le
    Thanks all.

    I went back to scratch and redid all your steps John, and I had to re-create a link from /usr/bin/qtmake to the QT5 executable. Now it works. Obviously I had something left over from the original README.

    Note that you can't (well, I can't) double-click the executable from the desktop and make it run. It only works from the command line or via a launcher.

    Note also that those edits for _qscrollX, etc are not necessary.

    Thanks for all the help.

    Gonzo
  • AH 1 0
    Thanks John Lemcke, this worked for me. Just one comment: there's no need to install libqt4-dev. You can link to the correct libraries by replacing the "qmake" command with "qmake -qt=qt5"

Connectez-vous ou inscrivez-vous pour participer à la discussion.

Polyphone a besoin de vous !

Polyphone est gratuit mais il y a des coûts associés à son site web et à son développement. Un petit coup de pouce aidera beaucoup.

Faire un don
Apprenez les bases Voir le tutoriel
Haut de
page