Post by Stephan WittPost by Enrico ForestieriPost by Stephan WittOk, I couldn't test it on Linux with Qt 5.x. I think I know what to do here.
What's your software stack for Qt5.x on Linux?
Debian stable, if that's what you mean by software stack.
Ok, thank you.
What I mean is: I'm used to rpm based systems on Linux. I'm using RedHat or CentOS if possible.
I read that on CentOS 6.5 Qt5 is a problem. So I tried it with my Ubuntu Box and couldn't find
how to get a Qt5 developer system ready. I'm not familiar with dpkg and apt. So it needs time
to setup such a system - I thought it may save some time if I ask.
It doesn't work on my system - an Ubuntu 12.04 upgraded to 14.04 TLS.
There are compatibility problems with boost and Qt5 I cannot solve.
I think (LyX with) Qt5 on Linux is not ready for production… at least on Ubuntu 14.04 TLS.
This is what I did after Ubuntu upgrade:
$ uname -a
Linux ubuntu 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:30:01 UTC 2014 i686 i686 i686 GNU/Linux
$ cat /etc/debian_version
jessie/sid
$ cd $HOME/lyx-build
$ sudo apt-get install libqt5x11extras5-dev
# This installs many Qt5 developer packages too...
$ PATH=/usr/lib/i386-linux-gnu/qt5/bin:$PATH sh ../LyX-2.2-2.2.0dev/configure --enable-qt5
$ PATH=/usr/lib/i386-linux-gnu/qt5/bin:$PATH make
...
CXX docstring.o
In file included from /usr/include/qt5/QtCore/qiodevice.h:45:0,
from /usr/include/qt5/QtCore/qfiledevice.h:45,
from /usr/include/qt5/QtCore/qfile.h:45,
from /usr/include/qt5/QtCore/QFile:1,
from ../../../LyX-2.2-2.2.0dev/src/support/docstring.cpp:20:
/usr/include/qt5/QtCore/qglobal.h:1008:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
^
make[5]: *** [docstring.o] Fehler 1
$ rm -rf *
$ CPPFLAGS=-fPIC PATH=/usr/lib/i386-linux-gnu/qt5/bin:$PATH sh ../LyX-2.2-2.2.0dev/configure --enable-qt5
$ PATH=/usr/lib/i386-linux-gnu/qt5/bin:$PATH make
...
CXX lyxtime.o
In file included from /usr/include/c++/4.8/bits/concept_check.h:55:0,
from /usr/include/c++/4.8/bits/move.h:34,
from /usr/include/c++/4.8/bits/stl_pair.h:59,
from /usr/include/c++/4.8/bits/stl_algobase.h:64,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/string:40,
from ../../../LyX-2.2-2.2.0dev/src/support/../support/lyxtime.h:17,
from ../../../LyX-2.2-2.2.0dev/src/support/lyxtime.cpp:13:
/usr/include/c++/4.8/bits/boost_concept_check.h: In instantiation of ‘void __gnu_cxx::_RandomAccessIteratorConcept<_Tp>::__constraints() [with _Tp = QList<QVariant>::const_iterator]’:
/usr/include/c++/4.8/bits/boost_concept_check.h:59:39: required from ‘void __gnu_cxx::__function_requires() [with _Concept = __gnu_cxx::_RandomAccessIteratorConcept<QList<QVariant>::const_iterator>]’
/usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:154:7: required from ‘void std::__advance(_RandomAccessIterator&, _Distance, std::random_access_iterator_tag) [with _RandomAccessIterator = QList<QVariant>::const_iterator; _Distance = int]’
/usr/include/c++/4.8/bits/stl_iterator_base_funcs.h:177:61: required from ‘void std::advance(_InputIterator&, _Distance) [with _InputIterator = QList<QVariant>::const_iterator; _Distance = int]’
/usr/include/qt5/QtCore/qmetatype.h:933:28: required from ‘static const void* QtMetaTypePrivate::QSequentialIterableImpl::atImpl(const void*, int) [with T = QList<QVariant>]’
/usr/include/qt5/QtCore/qmetatype.h:980:34: required from ‘QtMetaTypePrivate::QSequentialIterableImpl::QSequentialIterableImpl(const T*) [with T = QList<QVariant>]’
/usr/include/qt5/QtCore/qvariant.h:711:139: required from here
/usr/include/c++/4.8/bits/boost_concept_check.h:534:34: error: no match for ‘operator+’ (operand types are ‘std::iterator_traits<QList<QVariant>::const_iterator>::difference_type {aka int}’ and ‘QList<QVariant>::const_iterator’)
__i = __i + __n; __i = __n + __i; // require addition with difference type
^
/usr/include/c++/4.8/bits/boost_concept_check.h:534:34: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/string:40,
from ../../../LyX-2.2-2.2.0dev/src/support/../support/lyxtime.h:17,
from ../../../LyX-2.2-2.2.0dev/src/support/lyxtime.cpp:13:
/usr/include/c++/4.8/bits/stl_iterator.h:902:5: note: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
^
/usr/include/c++/4.8/bits/stl_iterator.h:902:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/bits/concept_check.h:55:0,
from /usr/include/c++/4.8/bits/move.h:34,
from /usr/include/c++/4.8/bits/stl_pair.h:59,
from /usr/include/c++/4.8/bits/stl_algobase.h:64,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/string:40,
from ../../../LyX-2.2-2.2.0dev/src/support/../support/lyxtime.h:17,
from ../../../LyX-2.2-2.2.0dev/src/support/lyxtime.cpp:13:
/usr/include/c++/4.8/bits/boost_concept_check.h:534:34: note: ‘QList<QVariant>::const_iterator’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
__i = __i + __n; __i = __n + __i; // require addition with difference type
^
In file included from /usr/include/qt5/QtCore/qdatetime.h:45:0,
from /usr/include/qt5/QtCore/QDateTime:1,
from ../../../LyX-2.2-2.2.0dev/src/support/lyxtime.cpp:20:
/usr/include/qt5/QtCore/qstring.h:1143:41: note: const QString operator+(const QString&, const QByteArray&)
inline QT_ASCII_CAST_WARN const QString operator+(const QString &s, const QByteArray &ba)
^
/usr/include/qt5/QtCore/qstring.h:1143:41: note: no known conversion for argument 2 from ‘QList<QVariant>::const_iterator’ to ‘const QByteArray&’