[kde-linux] KDE4 + Qt4 compilation problems

Alexey Chernov 4ernov at gmail.com
Sat Jan 12 19:15:28 UTC 2008


Hello!

I'm experiencing serious problems with KDE4 installation. I was really
looking forward to building it and now it's finally released, but I
can't build it.

I built a fresh system using Linux From Scratch book. My architecture
is x86_64-unknown-linux-gnu. I built both 32 and 64 bit toolchains,
but most of libraries (including Xorg etc.) are 64 bit.

The versions of tools in toolchain are: Binutils 2.18, GCC 4.2.2
and Glibc 2.7. X.org is 7.3.

I tried to build KDE4 from source code using "Getting Started" guide
on kde.org. Before KDE4 release I prepared and built Qt 4.3.3 Open
Source Edition. It compiled ok. But when I started to build kdelibs
I received error message from CMake:

"CMake Error: Qt compiled without support for -fvisibility=hidden.
This will break plugins and linking of some applications.
Please fix your Qt installation.
-- Configuring done"

Then I tried to rebuild Qt with CXXFLAGS="-fvisibility=hidden", but it
failed while linking /bin/uic3 target with thousands of errors like
this (not a complete log):

"Entering directory `/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3'
g++ -m64 -fno-exceptions -Wl,-rpath,/usr/lib64 -Wl,-rpath,/usr/lib64 -o ../../../bin/uic3 .obj/release-shared/customwidgetsinfo.o .obj/release-shared/databaseinfo.o .obj/release-shared/driver.o .obj/release-shared/treewalker.o .obj/release-shared/ui4.o .obj/release-shared/uic.o .obj/release-shared/validator.o .obj/release-shared/cppextractimages.o .obj/release-shared/cppwritedeclaration.o .obj/release-shared/cppwriteicondata.o .obj/release-shared/cppwriteicondeclaration.o .obj/release-shared/cppwriteiconinitialization.o .obj/release-shared/cppwriteincludes.o .obj/release-shared/cppwriteinitialization.o .obj/release-shared/main.o .obj/release-shared/ui3reader.o .obj/release-shared/parser.o .obj/release-shared/domtool.o .obj/release-shared/object.o .obj/release-shared/subclassing.o .obj/release-shared/form.o .obj/release-shared/converter.o .obj/release-shared/widgetinfo.o .obj/release-shared/embed.o .obj/release-shared/qt3to4.o .obj/release-shared/deps.o    -L/usr/src/apps/qt-x11-opensource-src-4.3.3/lib -lQt3Support -L/usr/src/apps/qt-x11-opensource-src-4.3.3/lib -lQtSql -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -L/usr/X11R6/lib64 -pthread -pthread -pthread -pthread -lQtNetwork -pthread -pthread -pthread -pthread -pthread -pthread -lQtXml -pthread -pthread -lQtGui -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
.obj/release-shared/ui4.o: In function `DomChar::write(QDomDocument&, QString const&) const':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5628: undefined reference to `QDomDocument::createElement(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5630: undefined reference to `QDomElement::QDomElement()'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5639: undefined reference to `QDomDocument::createTextNode(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5639: undefined reference to `QDomNode::appendChild(QDomNode const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5639: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `~QDomCharacterData':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../../../include/QtXml/../../src/xml/qdom.h:409: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `~QDomElement':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../../../include/QtXml/../../src/xml/qdom.h:469: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `DomChar::write(QDomDocument&, QString const&) const':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5633: undefined reference to `QDomDocument::createElement(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5633: undefined reference to `QDomElement::operator=(QDomElement const&)'
.obj/release-shared/ui4.o: In function `~QDomElement':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../../../include/QtXml/../../src/xml/qdom.h:469: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `DomChar::write(QDomDocument&, QString const&) const':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5634: undefined reference to `QDomDocument::createTextNode(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5634: undefined reference to `QDomNode::appendChild(QDomNode const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5634: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `~QDomCharacterData':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../../../include/QtXml/../../src/xml/qdom.h:409: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `DomChar::write(QDomDocument&, QString const&) const':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5635: undefined reference to `QDomNode::appendChild(QDomNode const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:5635: undefined reference to `QDomNode::~QDomNode()'
.obj/release-shared/ui4.o: In function `DomConnectionHint::write(QDomDocument&, QString const&) const':
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:6881: undefined reference to `QDomDocument::createElement(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:6883: undefined reference to `QDomElement::QDomElement()'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:6901: undefined reference to `QDomDocument::createTextNode(QString const&)'
/usr/src/apps/qt-x11-opensource-src-4.3.3/src/tools/uic3/../uic/ui4.cpp:6901: undefined reference to `QDomNode::appendChild(QDomNode const&)'
....
"

I tried to find some solution using Google, search Qt and KDE
forums but it seems that nobody experienced such a problem.
I post some messages on the forums but there was no answer yet.

I also search KDE mailing lists and find some information about
"-fvisibility=hidden" on kde-buildsystem list. It's written that the
problem is with x86_64 architecture and visibility flag. But I found no
instructions how to fix the problem there.

So I decided to send e-mail to this list. I'm so upset and really
don't know, how to solve this problem... Please, help me with it. If
it is possible... Thank you in advance!

P.S. Thank you all very, very much for KDE4. Though I can't try it
now, but... it rocks!!

Alexey Chernov




More information about the kde-linux mailing list