Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-11-2015, 08:01 AM
|
#1
|
Member
Registered: Mar 2005
Posts: 288
Rep:
|
Compilling pyqt3 on Kubuntu Trusty error
Hello forum,
I am trying to compile pyqt3 (18v3.18.15 tarball) in Kubuntu 14.4 (Trusty) but I keep getting an error message shown below:
Code:
sip/qt/qimage.sip: In function ‘const char** PyQt_qt_ListToArray(PyObject*)’:
sip/qt/qimage.sip:535:13: error: ‘ANY’ was not declared in this scope
sip/qt/qimage.sip:535:18: error: expected primary-expression before ‘)’ token
sip/qt/qobject.sip: At global scope:
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_number’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_mapping’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_sequence’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_buffer’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::ht_name’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::ht_slots’ [-Wmissing-field-initializers]
qt/sipqtcmodule.cpp:12287:1: warning: narrowing conversion of ‘PYQT_VERSION’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
make[1]: *** [sipqtcmodule.o] Error 1
make[1]: Leaving directory `/home/roy/Downloads/PPyQt-x11-gpl-3.18.1/qt'
make: *** [all] Error 2
I already have QT3 (v 3.3.8b) installed and I have tried several versions of SIP. And I have tried several versions of python (2.6 and 2.7) but I keep getting the same error message regardless of which version I use, so it makes me believe my problem is not a version mis-match. Kubuntu uses pyqt4 and qt4 which are not what I need.
The reason I am trying to install these older programs is because I have an old app called hdpvrassistant that was written with these older programs about 4 years ago. Hdpvrassistant will not compile with the version of Kubuntu I presently have using APT. The Kubuntu package manager does not have these older programs such as qt3, pyqt3, sip in their repositories so that is why I'm using tarballs of older versions.
It may be important to note that I had to add "#include <stddef.h and #include <stdlib.h>" to every .cpp file while compiling QT3 since Kubuntu has a newer version of libc than what the programs were written for but adding these two entries to pyqt3 does not prevent the error above. They worked for qt3 but not for pyqt3.
So it seems to me I may need to add other entries similar to "#include <stddef.h and #include <stdlib.h>" to pyqt3 to get it to compile but I do not know which entries to add other than the two I already tried.
Would it help if I used a lower version of gcc perhaps?
I am hoping some of you can lead and guide me or give me a hint as to what to do to get pyqt3 to compile.
Thanks abundently,
Roy
Last edited by rrrssssss; 02-11-2015 at 03:38 PM.
|
|
|
02-11-2015, 11:09 AM
|
#2
|
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524
|
Since you are compiling old pyqt3 which won't be knowing about latest gcc supported C++11 which gcc is defaulting so it produces error.
You may have to run g++ with options -std=c++98 or -std=c++03. Usually we set CXXFLAGS environment varaible while running ./configure.
I don't know how pyqt3 is configure or built. If you give build steps details it may help.
Also setting -Wno-narrowing -Wno-missing-field-initializers to CXXFLAGS or passing it to g++ may help, because they are causing that error.
|
|
|
02-11-2015, 03:24 PM
|
#3
|
Member
Registered: Mar 2005
Posts: 288
Original Poster
Rep:
|
Hello Veerain,
Thanks for taking an interest in my problem.
The way I install pyqt3 is to run "configure.py" instead of "configure, since there is no "configure", using the line below, while in the pyqt3 directory:
Code:
/usr/local/bin/python2.6 configure.py -w
The "w" switch is for debugging info.
The code below consists of the resuslts of running "configure.py" and below it is the results of running "make". I ommited much of the depreciation warning to keep the file from being too long. Running "configure.py" invokes my version of python also, as you can see on the first line.
Code:
roy@roy-kubuntu:~/Downloads/PyQt-x11-gpl-3.18.1$ /usr/local/bin/python2.6 configure.py -w
This is the GPL version of PyQt 3.18.1 (licensed under the GNU General Public
License) for Python 2.6.9 on linux3.
Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
Do you accept the terms of the license? yes
qextscintillaglobal.h could not be found in /usr/local/qt/include and so the
qtext module will not be built. If QScintilla is installed then use the -n
argument to explicitly specify the correct directory.
Checking to see if the qtcanvas module should be built...
Checking to see if the qtnetwork module should be built...
Checking to see if the qttable module should be built...
Checking to see if the qtxml module should be built...
Checking to see if the qtgl module should be built...
/usr/bin/ld: cannot find -lXmu
collect2: error: ld returned 1 exit status
Checking to see if the qtui module should be built...
Checking to see if the qtsql module should be built...
Checking to see if the QAssistantClient class is available...
Creating features file...
Checking to see if the QCDEStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QCDEStyle’
new QCDEStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QCDEStyle’
Checking to see if the QInterlaceStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QInterlaceStyle’
new QInterlaceStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QInterlaceStyle’
Checking to see if the QMotifStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QMotifStyle’
new QMotifStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QMotifStyle’
Checking to see if the QMotifPlusStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QMotifPlusStyle’
new QMotifPlusStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QMotifPlusStyle’
Checking to see if the QPlatinumStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QPlatinumStyle’
new QPlatinumStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QPlatinumStyle’
Checking to see if the QSGIStyle class is built in...
cfgtest.cpp: In function ‘int main(int, char**)’:
cfgtest.cpp:5:9: error: expected type-specifier before ‘QSGIStyle’
new QSGIStyle();
^
cfgtest.cpp:5:9: error: expected ‘;’ before ‘QSGIStyle’
Checking to see if the QWindowsStyle class is built in...
Qt v3.3.8 free edition is being used.
SIP 4.14.7 is being used.
These PyQt modules will be built: qt qtcanvas qtnetwork qttable qtxml qtui
qtsql.
Support for these Qt classes has been disabled: QCDEStyle QInterlaceStyle
QMotifStyle QMotifPlusStyle QPlatinumStyle QSGIStyle.
The PyQt modules will be installed in /usr/local/lib/python2.6/site-packages.
The PyQt .sip files will be installed in /usr/local/share/sip.
The Qt header files are in /usr/local/qt/include.
The qt Qt library is in /usr/local/qt/lib.
pyuic will be installed in /usr/local/bin.
pylupdate will be installed in /usr/local/bin.
Generating the C++ source for the qt module...
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qt module...
Generating the C++ source for the qtui module...
sip: Deprecation warning: sip/qtui/qtuimod.sip:24: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qtui module...
Generating the C++ source for the qtcanvas module...
sip: Deprecation warning: sip/qtcanvas/qtcanvasmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qtcanvas module...
Generating the C++ source for the qtnetwork module...
sip: Deprecation warning: sip/qtnetwork/qtnetworkmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qtnetwork module...
Generating the C++ source for the qtsql module...
sip: Deprecation warning: sip/qtsql/qtsqlmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:48: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:49: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qtsql module...
Generating the C++ source for the qttable module...
sip: Deprecation warning: sip/qttable/qttablemod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:48: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:49: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
Creating the Makefile for the qttable module...
Generating the C++ source for the qtxml module...
sip: Deprecation warning: sip/qtxml/qtxmlmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/qtmod.sip:23: %Module version number should be specified using the 'version' argument
sip: Deprecation warning: sip/qt/copying.sip:45: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:46: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/pyqt-gpl.sip:1: %License annotations are deprecated, use arguments instead
sip: Deprecation warning: sip/qt/copying.sip:47: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
sip: Deprecation warning: sip/qt/copying.sip:48: %OptionalInclude is deprecated, use %Include and the 'optional' argument instead
%Makefile is deprecated
Creating the Makefile for the qtxml module...
Creating top level Makefile...
Creating pyuic Makefile...
Creating pylupdate Makefile...
Creating pyqtconfig.py...
roy@roy-kubuntu:~/Downloads/PyQt-x11-gpl-3.18.1$ make
make[1]: Entering directory `/home/roy/Downloads/PyQt-x11-gpl-3.18.1/qt'
g++ -c -pipe -fPIC -O2 -Wall -W -DNDEBUG -DQT_NO_DEBUG -I. -I/usr/local/include/python2.6 -I/usr/local/qt/mkspecs/default -I/usr/local/qt/include -I/usr/X11R6/include -o sipqtcmodule.o sipqtcmodule.cpp
In file included from sip/qt/qimage.sip:139:0:
/usr/local/qt/include/qimage.h: In member function ‘bool QImageTextKeyLang::operator<(const QImageTextKeyLang&) const’:
/usr/local/qt/include/qimage.h:62:45: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
{ return key < other.key || key==other.key && lang < other.lang; }
^
sip/qt/qimage.sip: In function ‘const char** PyQt_qt_ListToArray(PyObject*)’:
sip/qt/qimage.sip:535:13: error: ‘ANY’ was not declared in this scope
sip/qt/qimage.sip:535:18: error: expected primary-expression before ‘)’ token
sip/qt/qobject.sip: At global scope:
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_number’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_mapping’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_sequence’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::as_buffer’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::ht_name’ [-Wmissing-field-initializers]
sip/qt/qobject.sip:1256:1: warning: missing initializer for member ‘_heaptypeobject::ht_slots’ [-Wmissing-field-initializers]
qt/sipqtcmodule.cpp:12287:1: warning: narrowing conversion of ‘PYQT_VERSION’ from ‘unsigned int’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
make[1]: *** [sipqtcmodule.o] Error 1
make[1]: Leaving directory `/home/roy/Downloads/PyQt-x11-gpl-3.18.1/qt'
make: *** [all] Error 2
roy@roy-kubuntu:~/Downloads/PyQt-x11-gpl-3.18.1$
I don't know much about configuring gcc and/or c++ or even programming. I am still learning.
I'm hoping you can shed more light on this for me.
Regards,
Roy
|
|
|
02-11-2015, 05:21 PM
|
#4
|
Member
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792
|
Roy,
A caveat: I'm a C++/Qt user.
The link that you posted in an earlier thread ( link), does not have a form.ui file or form.py file generated by pyuic. I found a form.py file here.
The changes required to make this app run with PyQt4 are relatively minor. I am attaching patch files for main.py and form.py.
Executing main.py, I get the form up and all of the buttons seem to work but I don't have a Hauppage device to test.
HTH
|
|
|
02-11-2015, 06:28 PM
|
#5
|
Member
Registered: Mar 2005
Posts: 288
Original Poster
Rep:
|
Thank you norobro !
It worked fine with my hardware. I did have to comment out the "qt" line in the config.py file that did not have a patch (below).
Code:
# -*- coding: utf-8 -*-
import os.path
import commands
import main
#from qt import *
To me you are very smart to be able to program like that and make patches. I am not there yet.
So, thanks again for your time and trouble, but if you're like me, it was all fun.
Best regards,
Roy
|
|
|
02-11-2015, 07:13 PM
|
#6
|
Member
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792
|
You're welcome. I'm glad it worked!
I migrated from Qt3 to Qt4 years ago so rather than smarts, it's experience. As I'm sure you noticed the changes were in syntax not logic.
Regarding patches, check out the diff manual page. The command to generate a patch file: diff -u old.file new.file > patch.file
Norm
Last edited by norobro; 02-11-2015 at 07:17 PM.
Reason: typo
|
|
|
All times are GMT -5. The time now is 03:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|