Hi,
More build issues. I am also having a build issue with qt5 but I will submit a separate ticket for that. Here is what I am getting with building against qt4:
g++ -c -pipe -m64 -O2 -fPIC -O2 -D_REENTRANT -Wall -W -DPHONON -DPREFIX=\"/usr\" -DHUNSPELL_STATIC -D_QCODE_EDIT_BUILD_ -DQNFA_BUILD -DQUAZIP_STATIC -DHAS_POPPLER_24 -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt/mkspecs/linux-g++ -I. -I/usr/lib64/qt/include/QtUiTools -I/usr/lib64/qt/include/QtCore -I/usr/lib64/qt/include/QtNetwork -I/usr/lib64/qt/include/QtGui -I/usr/lib64/qt/include/QtXml -I/usr/lib64/qt/include/QtSvg -I/usr/lib64/qt/include/QtScript -I/usr/lib64/qt/include/phonon -I/usr/lib64/qt/include -I/usr/include/KDE -Iqtsingleapplication -Iqcodeedit/lib -Iqcodeedit/lib/document -Iqcodeedit/lib/widgets -Iqcodeedit/lib/qnfa -Iquazip/quazip -Ipdfviewer -I/usr/include/poppler/qt4 -I/usr/include/poppler -I/usr/lib64/qt/include/phonon_compat -I.moc -I.ui -o .obj/PDFDocument.o pdfviewer/PDFDocument.cpp
pdfviewer/PDFDocument.cpp: In member function 'void PDFWidget::annotationClicked(QSharedPointer<poppler::annotation>, int)':
pdfviewer/PDFDocument.cpp:865:81: error: cannot dynamic_cast 'annotation' (of type 'class QSharedPointer<poppler::annotation>') to type 'class Poppler::MovieAnnotation*' (source is not a pointer)
movie = new PDFMovie(this, dynamic_cast<poppler::movieannotation *="">(annotation), page);
^
pdfviewer/PDFDocument.cpp: In member function 'void PDFDocument::search(const QString&, bool, bool, bool, bool)':
pdfviewer/PDFDocument.cpp:3267:80: warning: 'bool Poppler::Page::search(const QString&, QRectF&, Poppler::Page::SearchDirection, Poppler::Page::SearchMode, Poppler::Page::Rotation) const' is deprecated (declared at /usr/include/poppler/qt4/poppler-qt4.h:603) [-Wdeprecated-declarations]
if (page->search(searchText, lastSearchResult.selRect, searchDir, searchMode)) {
^
make: *** [.obj/PDFDocument.o] Error 1</poppler::movieannotation></poppler::annotation></poppler::annotation>
Thank you again.
Regards,
Fred
you have actiavted "phonon" ?
No, I didn't intend to. Just what qmake did or something like that. I am using the texstudio.SlackBuild from slackbuilds.org
I corrected the SlackBuild. There was a reference to PHONON=true in the section that sets flags for qt4. I am waiting for the build to complete. It looks like it works though.
When I build against qt5 though I get a segmentation fault. with the following back trace from gdb:
gdb texstudio
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/texstudio...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/texstudio
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.3600.4-gdb.py", line 9, in <module>
from gobject import register
File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
import gdb.backtrace
ImportError: No module named backtrace
[New Thread 0x7fffe93f2700 (LWP 11068)]
[New Thread 0x7fffe0d79700 (LWP 11069)]</module></module>
Program received signal SIGSEGV, Segmentation fault.
0x000000000070c627 in ManhattanStyle::event(QEvent*) ()
(gdb) bt
0 0x000000000070c627 in ManhattanStyle::event(QEvent*) ()
1 0x00007ffff6a3cd4c in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib64/libQt5Widgets.so.5
2 0x00007ffff6a413ea in QApplication::notify(QObject, QEvent) () from /usr/lib64/libQt5Widgets.so.5
3 0x00007ffff50d36d5 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib64/libQt5Core.so.5
4 0x00007ffff5106bae in QObject::setProperty(char const*, QVariant const&) () from /usr/lib64/libQt5Core.so.5
5 0x000000000071095f in ManhattanStyle::ManhattanStyle(QString const&) ()
6 0x000000000064780d in ConfigManager::setInterfaceStyle() ()
7 0x000000000066cd44 in ConfigManager::readSettings(bool) ()
8 0x0000000000589828 in Texstudio::readSettings(bool) ()
9 0x000000000058b50e in Texstudio::Texstudio(QWidget, QFlags<qt::windowtype>, QSplashScreen</qt::windowtype>) ()
10 0x0000000000527aac in TexstudioApp::init(QStringList&) ()
11 0x0000000000522139 in main ()
(gdb)
Different issue but thought I'd mention it anyway. Thank you for your help. It is very much appreciated.
Regards,
Fred
Texstudio built against qt4 and is running without issue so far. The enabling of PHONON was the problem. I corrected the flags in the SlackBuild for qt4.
Thanks again!
Regards,
Fred
please open another report for qt5 issue, otherwise it is difficult to find it again later on
@Tim,@Benito: do you want to fix the phonon build ?
As I'm mostly building on windows for which we've never provided phonon support, I'm not intending to work on it.
Anyway, is there really a need for phonon support? The only application I can think of are presentations with embedded videos. But I've rarely seen them in real life. And still one could use an external viewer in this case. Likely, you won't need to watch the video while working on the document.
I'm running into the same issue. Texstudio is failing to build with qt4 and PHONON=true. Is there a fix for this?
--Larry
don't build it with PHONON=true ?
So you won't support PHONON anymore?
Tried to fix is: hg 6220 (5f9e814ad8f2)
However, this is untested because I currently don't have a build environment including phonon.
Thanks Tim. I'm trying to build it now.
Fred
Hi Tim,
Tried to build with your changes. I received the following warnings/errors:
g++ -c -pipe -m64 -O2 -fPIC -std=c++11 -O2 -D_REENTRANT -Wall -W -DPHONON -DPREFIX=\"/usr\" -DHUNSPELL_STATIC -D_QCODE_EDIT_BUILD_ -DQNFA_BUILD -DQUAZIP_STATIC -DHAS_POPPLER_24 -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt/mkspecs/linux-g++ -I. -I/usr/lib64/qt/include/QtUiTools -I/usr/lib64/qt/include/QtCore -I/usr/lib64/qt/include/QtNetwork -I/usr/lib64/qt/include/QtGui -I/usr/lib64/qt/include/QtXml -I/usr/lib64/qt/include/QtSvg -I/usr/lib64/qt/include/QtScript -I/usr/lib64/qt/include/phonon -I/usr/lib64/qt/include -I/usr/include/KDE -Iqtsingleapplication -Iqcodeedit/lib -Iqcodeedit/lib/document -Iqcodeedit/lib/widgets -Iqcodeedit/lib/qnfa -Iquazip/quazip -Ipdfviewer -I/usr/include/poppler/qt4 -I/usr/include/poppler -I/usr/lib64/qt/include/phonon_compat -I.moc -I.ui -o .obj/PDFDocument.o pdfviewer/PDFDocument.cpp
pdfviewer/PDFDocument.cpp: In member function 'void PDFDocument::search(const QString&, bool, bool, bool, bool)':
pdfviewer/PDFDocument.cpp:3267:80: warning: 'bool Poppler::Page::search(const QString&, QRectF&, Poppler::Page::SearchDirection, Poppler::Page::SearchMode, Poppler::Page::Rotation) const' is deprecated (declared at /usr/include/poppler/qt4/poppler-qt4.h:603) [-Wdeprecated-declarations]
if (page->search(searchText, lastSearchResult.selRect, searchDir, searchMode)) {
^
In file included from /usr/lib64/qt/include/QtCore/qsharedpointer.h:50:0,
from /usr/lib64/qt/include/QtGui/qpixmap.h:49,
from /usr/lib64/qt/include/QtGui/qbrush.h:53,
from /usr/lib64/qt/include/QtGui/qpalette.h:47,
from /usr/lib64/qt/include/QtGui/qwidget.h:50,
from /usr/lib64/qt/include/QtGui/qabstractspinbox.h:45,
from /usr/lib64/qt/include/QtGui/qstyleoption.h:46,
from /usr/lib64/qt/include/QtGui/qabstractitemdelegate.h:46,
from /usr/lib64/qt/include/QtGui/QAbstractItemDelegate:1,
from ./mostQtHeaders.h:14,
from pdfviewer/PDFDocument.h:28,
from pdfviewer/PDFDocument.cpp:24:
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h: In instantiation of 'QtSharedPointer::ExternalRefCount<t>::ExternalRefCount(const QtSharedPointer::ExternalRefCount<x>&) [with X = QSharedPointer<poppler::movieannotation>; T = Poppler::MovieAnnotation]</poppler::movieannotation>':
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:495:76: required from 'QSharedPointer<t>::QSharedPointer(const QSharedPointer<x>&) [with X = QSharedPointer<poppler::movieannotation>; T = Poppler::MovieAnnotation]</poppler::movieannotation>'
pdfviewer/PDFDocument.cpp:865:116: required from here
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:399:101: error: no matching function for call to 'QtSharedPointer::Basic<poppler::movieannotation>::Basic(QtSharedPointer::Basic<qsharedpointer\<poppler::movieannotation> >::Type const&)'
inline ExternalRefCount(const ExternalRefCount<x> &other) : Basic<t>(other.value), d(other.d)
^
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:399:101: note: candidates are:
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:159:16: note: QtSharedPointer::Basic<t>::Basic(Qt::Initialization) [with T = Poppler::MovieAnnotation]
inline Basic(Qt::Initialization) { }
^
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:159:16: note: no known conversion for argument 1 from 'QtSharedPointer::Basic<qsharedpointer\<poppler::movieannotation> >::Type</qsharedpointer\<poppler::movieannotation></t></t></x> const {aka QSharedPointer<poppler::movieannotation> const}' to 'Qt::Initialization'
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:158:16: note: QtSharedPointer::Basic<t>::Basic(T</t>) [with T = Poppler::MovieAnnotation]
inline Basic(T ptr = 0) : value(ptr) { }
^
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:158:16: note: no known conversion for argument 1 from 'QtSharedPointer::Basic<qsharedpointer\<poppler::movieannotation> >::Type</qsharedpointer\<poppler::movieannotation> const {aka QSharedPointer<poppler::movieannotation> const}' to 'Poppler::MovieAnnotation'
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:131:11: note: constexpr QtSharedPointer::Basic<poppler::movieannotation>::Basic(const QtSharedPointer::Basic<poppler::movieannotation>&)
class Basic
^
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:131:11: note: no known conversion for argument 1 from 'QtSharedPointer::Basic<qsharedpointer\<poppler::movieannotation> >::Type const {aka QSharedPointer<poppler::movieannotation></poppler::movieannotation> const}' to 'const QtSharedPointer::Basic<poppler::movieannotation>&'
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:131:11: note: constexpr QtSharedPointer::Basic<poppler::movieannotation>::Basic(QtSharedPointer::Basic<poppler::movieannotation>&&)
/usr/lib64/qt/include/QtCore/qsharedpointer_impl.h:131:11: note: no known conversion for argument 1 from 'QtSharedPointer::Basic<qsharedpointer\<poppler::movieannotation> >::Type const {aka QSharedPointer<poppler::movieannotation></poppler::movieannotation> const}' to 'QtSharedPointer::Basic<poppler::movieannotation>&&'
make: *** [.obj/PDFDocument.o] Error 1
Thank you again for your help.</poppler::movieannotation></qsharedpointer\<poppler::movieannotation></poppler::movieannotation></poppler::movieannotation></poppler::movieannotation></qsharedpointer\<poppler::movieannotation></poppler::movieannotation></poppler::movieannotation></poppler::movieannotation></poppler::movieannotation></qsharedpointer\<poppler::movieannotation></poppler::movieannotation></x></t></x></t>
Regards,
Fred
Since I don't have time to setup a qt4 build environment for phonon, all I can offer is trying to fix your build errors one at a time. Sorry that it's a bit cumbersome, but it's currently the only way to do something about this at all.
Please try again with hg 6221 (5903721d443a)
Tim,
I pulled from hg and built texstudio successfully with PHONON=true in the SlackBuild script. Thank you for your help. I have to test with something like the knitr tex examples to see if the animation works as I don't have any documents of my own that use the animation features.
Regards,
Fred