Problem installing Qt4 on Ubuntu
-
wrote on 6 Aug 2017, 08:40 last edited by
Hi all,
I'm trying to install Qt4 on my Ubuntu 17.04 32-bit, but I'm stuck. When I try to compile it I get the following two errors several times:
~$ make -j8 && make install
.
.
.error: cannot bind bitfield ‘existingTransition->QTJSC::Structure::m_attributesInPrevious’ to ‘unsigned int&’
add(StructureTransitionTableHash::Key(RefPtrUString::Rep(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious);.
.
.error: call of overloaded ‘swap(std::pair<std::pair<QTWTF::RefPtrQTJSC::UStringImpl, unsigned int>, std::pair<QTJSC::Structure*, QTJSC::Structure*> >&, std::pair<std::pair<QTWTF::RefPtrQTJSC::UStringImpl, unsigned int>, std::pair<QTJSC::Structure*, QTJSC::Structure*> >&)’ is ambiguous
template<typename T> struct Mover<T, true> { static void move(T& from, T& to) { swap(from, to); } };and in the end I get this:
Makefile:3610: recipe for target 'obj/release/JSObjectRef.o' failed
make[1]: *** [obj/release/JSObjectRef.o] Error 1
make[1]: Leaving directory '/home/lucio/qt/qt-everywhere-opensource-src-4.8.6/src/script'
Makefile:565: recipe for target 'sub-script-make_default-ordered' failed
make: *** [sub-script-make_default-ordered] Error 2I get practically the same errors with both Qt 4.8.6 and Qt 4.8.7 (I necessarily need Qt4 and not Qt5 since the first is the one recommended to work with Geant4, which is what I need).
My compiler is:
~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.3.0-12ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-i386/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-i386 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-i386 --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)Thanks in advance for any help!
-
Hi and welcome to devnet,
Before digging into that problem, why not use the development packages of the Qt 4 version provided by your distribution ?
-
wrote on 7 Aug 2017, 13:25 last edited by
Hi, and thanks for your reply;
I was actually missing a couple of the packages found here, so I installed them. The same problem keeps appearing though.
I'm sorry if I misunderstood what you said, I'm rather new to Linux and have very little experience :)
-
What I was suggesting is to use your distribution provided Qt rather than build it yourself.
Any particular reason to build Qt yourself ?
-
wrote on 8 Aug 2017, 13:45 last edited by
The reason is I'm following a guide given to me by the PhD student working with me, and I didn't consider other ways to do it; I don't know if there's any particular reason why he told me to build Qt4 myself, but I would like to diverge from the guide the least possible (installing Qt4 is just but a small part of what I have to do and it is preparatory to some of the subsequent steps).
Anyway, may I ask you a real quick "how to" of the method you suggested? I'd really appreciated that.
-
apt-get install libqt4-dev
And it should already be the latest from the Qt 4 series. So unless your student had a need for a special configuration option, you should be good to go with your distribution's provided Qt.
-
wrote on 9 Aug 2017, 17:53 last edited by
Alright, so i found out that the guide I am following has been written some time ago for yum-based machines, that's why apt-get use wasn't mentioned.
Now all works fine! Thank you very much! -
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
-
wrote on 15 Apr 2019, 10:27 last edited by
Hii, @Zippo_Inc
I have same problem ..please tell me how solved it -
Hii, @Zippo_Inc
I have same problem ..please tell me how solved it@vaibs In your other thread you already was told to simply install Qt 4.8.7 provided by Ubuntu! Why don't you do so?
Qt 4.8.7 is 100% compatible to 4.8.1 (the last number in the version number is simply an indicator for bug fix releases).
https://forum.qt.io/topic/101744/can-we-install-qt-4-8-1-in-ubuntu-18-04