Solved Version 4.6.2 make error on Porter
-
I am using Qt version 5.9 for development with no issues. Some new software I need (Pleora) in production needs, according to their installation instructions, the specific Qt version 4.6.2 to run. I downloaded it from the Qt site and now trying to configure/make. After getting past many errors, I now have one on the "Porting" project that I cannot get past:
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_CAST_TO_ASCII -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_CORE_LIB -I../../../mkspecs/linux-g++-64 -I. -I../../../include/QtCore -I../../../include/QtXml -I../../../include -I.moc/release-static -o .obj/release-static/projectporter.o projectporter.cpp
In file included from translationunit.h:48:0,
from projectporter.cpp:47:
codemodel.h: In instantiation of ‘void CodeModel::Collection<CollectedType>::add(CollectedType*) [with CollectedType = CodeModel::Type]’:
codemodel.h:296:36: required from here
codemodel.h:99:13: error: ‘insert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
{ insert(collectedItem->name(), collectedItem); }
^
codemodel.h:99:13: note: declarations in dependent base ‘QMultiHash<QByteArray, CodeModel::Type*>’ are not found by unqualified lookup
codemodel.h:99:13: note: use ‘this->insert’ instead
Makefile:2965: recipe for target '.obj/release-static/projectporter.o' failed
make[3]: *** [.obj/release-static/projectporter.o] Error 1
make[3]: Leaving directory '/usr/share/qt/qt-everywhere-opensource-src-4.6.2/tools/porting/src'
Makefile:39: recipe for target 'sub-src-make_default' failed
make[2]: *** [sub-src-make_default] Error 2
make[2]: Leaving directory '/usr/share/qt/qt-everywhere-opensource-src-4.6.2/tools/porting'
Makefile:118: recipe for target 'sub-porting-make_default-ordered' failed
make[1]: *** [sub-porting-make_default-ordered] Error 2
make[1]: Leaving directory '/usr/share/qt/qt-everywhere-opensource-src-4.6.2/tools'
Makefile:596: recipe for target 'sub-tools-make_default-ordered' failed
make: *** [sub-tools-make_default-ordered] Error 2The configure I am using is:
./configure -opensource -confirm-license -static -no-xkb -no-glib -opengl -nomake examples -nomake tests -no-javascript-jit -no-script -no-scripttools -no-webkit -no-qt3supportI am on Ubuntu 16.04 and using a clean machine with no other versions of Qt to make sure of no conflicts.
I saw a post on this forum https://forum.qt.io/topic/44618/problem-with-installing-qt-4-6-2-on-ubuntu-14-04
where the solution was to go to a higher version of Qt4. But that is not an option for me.
I think Porting is used for going from Qt3 to Qt4 and I do not need it. However, I can see no way to disable it in the configure options. Any ideas? -
Hi and welcome to devnet,
What is Pleora ?
And out of curiosity, why would using a more recent version of Qt not be an option in your case ?
-
Pleora is a Linux-based software to control a magnification camera. We use the camera/software to align our motion control stage for laser cutting. The camera company has a Windows software, but they sub to Pleora for the Linux platform.
After pulling my hair out for a bit, I did try the standard Ubuntu Qt 4 libraries, and they did work. So that answers your question. The documentation seemed to imply 4.6.2 only, but the libraries that ended up coming down from Ubuntu were 4.8. Here is the command I ran:
sudo apt-get install libqt4-dev
I did, however, give the software access to the 4.6.2 qmake because their install process used it.Thanks for your reply.
-
Additional information I forgot to post: I did find a way to remove the "Porter" tool from the 4.6.2 build and complete it successfully (although there were other problems).
After the imbedded install us untared, go into the <untar dir>/tools/tools.pro and remove the "porting " line from the SUDIRS variable. then remove the <untar dir>/tools/porting directory. Continue with the ./configure step on the build process, and porting will not be built or referenced.