[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

qt 2.3 installation problem



Hi

I'm trying to build and install qt2.3 on my system. So far I'm not able to
compile basic qt programs after I installed qt2.3

I have a mandrake 7.2 system (gcc 2.95-2 , inscluding libstdc++ and g++).

I downloaded the binary RPMs for KDE 2.1.1/Mandrake 7.2 from a KDE mirror.

It generally installed fine (including libqt2-2.3.0-2mdk) . However,
mandrake have forgot to supply libqt2-devel , and also forgot to supply
the qt2 SRPM. I could not use binary packages from Mandrake 8.0 , as they
use rpm 4.0, glibc 2.2, and a host of other libraries of more advanced
version (and I really don't feel like wrecking up my system just to
compile qt programs)

So I downloaded the Mandrake qt2 source rpm of mandrake 8.0
(qt2-2.3.0-3mdk) and tried rebuilding it. 

I had to slightly modify the spec file to make it work. I also built it
with zlib, libpng and libmng from my system, and not as the qt builtins.

However, I am currently not able to compile a simple QT program. The
following sample is an autoconf test from some kde program that I want to
use:

[tzafrir@canada1 kdict-0.5]$ cat test.cpp
//#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qapp.h>
#include <qobjcoll.h>
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <qiconview.h>
#if ! (QT_VERSION >= 220)
#error 1
#endif

int main() {
    QStringList *t = new QStringList();
    QIconView iv(0);
    iv.setWordWrapIconText(false);
    QString s;
    s.setLatin1("Elvis is alive", 14);
    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
    return 0;
}

(I have remmed-out confdefs.h . It seems to work just the same without it)

I try to run the test command:

g++ -o test -O2 -DNDEBUG -fno-exceptions -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long -fno-builtin -I/usr/lib/qt2/include -I/usr/X11R6/include -L/usr/lib/qt2/lib -L/usr/X11R6/lib test.cpp -lqt -lpng -lz -lm -ljpeg -lXext -lX11 -lSM -lICE
test.cpp: In function `int main()':
test.cpp:20: warning: unused variable `int magnolia'
test.cpp:15: warning: unused variable `class QStringList * t'
/tmp/cc8oO2RJ.o(.rodata+0xd4): undefined reference to `QDropEvent type_info node'
/tmp/cc8oO2RJ.o(.rodata+0x208): undefined reference to `QPixmap type_info node'
collect2: ld returned 1 exit status

(./configure is run with the parameter --with-qt-dir

I have tried replacing -L/usr/lib/qt2/lib with
-L/home/tzafrir/RPM/BUILD/qt-2.3.0/lib , where qt was built. . Still no
change. So I don't think that this is a problem with the install script of
the rpm.

/usr/lib/qt2/lib is:
-rw-r--r--    1 root     root      7709984 Aug  8 17:25 libqt-mt.a
lrwxrwxrwx    1 root     root           17 May 24 01:48 libqt-mt.so.2 -> libqt-mt.so.2.3.0*
lrwxrwxrwx    1 root     root           17 May 24 01:48 libqt-mt.so.2.2 -> libqt-mt.so.2.3.0*
-rwxr-xr-x    1 root     root      4863124 Aug  8 17:25 libqt-mt.so.2.3.0*
-rw-r--r--    1 root     root      7686704 Aug  8 17:25 libqt.a
lrwxrwxrwx    1 root     root           14 Aug  8 14:37 libqt.so -> libqt.so.2.3.0*
lrwxrwxrwx    1 root     root           14 May 24 01:48 libqt.so.2.2 -> libqt.so.2.3.0*
-rwxr-xr-x    1 root     root      4848532 Aug  8 17:25 libqt.so.2.3.0*
-rw-r--r--    1 root     root        26862 Aug  8 17:25 libqutil.a
lrwxrwxrwx    1 root     root           17 May 24 01:48 libqutil.so.1 -> libqutil.so.1.0.0*
lrwxrwxrwx    1 root     root           17 May 24 01:48 libqutil.so.1.0 -> libqutil.so.1.0.0*
-rwxr-xr-x    1 root     root        22420 Aug  8 17:25 libqutil.so.1.0.0*

qt desingner that was built with the qt package runs just fine.

A web/news search shows some other occourances of the same error message,
soe with suspiciously-similar circumstances, but I could find no lead as
to where the problem might be.

Any ideas?

(BTW: google is in another failed attempt for a hebrew user interface. If
that bothers you, you can use the link for "google in english" from its
main page: http://www.google.com/en . This link sets your google
preferences cookie to display an enoglish interface, no matter what
language is your browser) 

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il