PDA

View Full Version : Error during installation



Pembar
1st July 2009, 16:55
Hello guys,

I'm having problems installing QT onto a Ubuntu 8.04 system 64-bit system. I downloaded the .bin file from the official website and followed the instructions to install the open source version.

I then typed the following:

sudo su

<password>

./configure

./make

-------------------------

Configure runs fine, make runs fine for a while, until it gets to "styles/qgtkstyle.cpp", it keeps saying things like different variables are not declared in this scope or something is not a member of QGtk.

Does anyone have any idea how to solve this? Thanks.

Lykurg
1st July 2009, 18:44
Maybe an exact error message would be better, but I guess you have to install the gtk development files (e.g. libgtk2.0-dev).

Pembar
2nd July 2009, 09:23
Just managed to copy it over, error message as below. It doesn't end there, there are a lot more lines, but basically saying that certain variables cannot be found.



/opt/qtsdk-2009.02/qt# make
cd src/tools/bootstrap/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/tools/bootstrap'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/tools/bootstrap'
cd src/tools/moc/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/tools/moc'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/tools/moc'
cd src/tools/rcc/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/tools/rcc'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/tools/rcc'
cd src/tools/uic/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/tools/uic'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/tools/uic'
cd src/corelib/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/corelib'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/corelib'
cd src/xml/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/xml'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/xml'
cd src/network/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/network'
make[1]: Nothing to be done for `first'.
make[1]: Leaving directory `/opt/qtsdk-2009.02/qt/src/network'
cd src/gui/ && make -f Makefile
make[1]: Entering directory `/opt/qtsdk-2009.02/qt/src/gui'
g++ -c -include .pch/release-shared/QtGui -m64 -pipe -g -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_RASTER_IMAGEENGINE -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-64 -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/X11R6/include -I.uic/release-shared -o .obj/release-shared/qgtkstyle.o styles/qgtkstyle.cpp
In file included from styles/qgtkpainter_p.h:59,
from styles/qgtkstyle.cpp:72:
styles/gtksymbols_p.h:60:21: error: gtk/gtk.h: No such file or directory
In file included from styles/qgtkpainter_p.h:59,
from styles/qgtkstyle.cpp:72:
styles/gtksymbols_p.h:79: error: ‘GError’ has not been declared
styles/gtksymbols_p.h:82: error: expected initializer before ‘*’ token
styles/gtksymbols_p.h:83: error: expected initializer before ‘*’ token
styles/gtksymbols_p.h:84: error: typedef ‘Ptr_gtk_widget_destroy’ is initialized (use __typeof__ instead)
styles/gtksymbols_p.h:84: error: ‘GtkWidget’ was not declared in this scope
styles/gtksymbols_p.h:84: error: expected primary-expression before ‘)’ token
styles/gtksymbols_p.h:85: error: typedef ‘Ptr_gtk_widget_realize’ is initialized (use __typeof__ instead)
styles/gtksymbols_p.h:85: error: ‘GtkWidget’ was not declared in this scope
styles/gtksymbols_p.h:85: error: expected primary-expression before ‘)’ token
styles/gtksymbols_p.h:86: error: typedef ‘Ptr_gtk_widget_set_default_directionâ€℠¢ is initialized (use __typeof__ instead)
styles/gtksymbols_p.h:86: error: ‘GtkTextDirection’ was not declared in this scope
styles/gtksymbols_p.h:87: error: typedef ‘Ptr_gtk_widget_modify_color’ is initialized (use __typeof__ instead)
styles/gtksymbols_p.h:87: error: ‘GtkWidget’ was not declared in this scope
styles/gtksymbols_p.h:87: error: ‘widget’ was not declared in this scope
styles/gtksymbols_p.h:87: error: ‘GtkStateType’ was not declared in this scope
styles/gtksymbols_p.h:87: error: expected primary-expression before ‘const’
styles/gtksymbols_p.h:88: error: expected initializer before ‘*’ token
styles/gtksymbols_p.h:89: error: expected initializer before ‘*’ token
styles/gtksymbols_p.h:90: error: expected initializer before ‘*’ token



I've tried installing libgtk2.0-dev already, no difference.

Lykurg
2nd July 2009, 11:27
Ok, what do you get for following commands:

locate gtk.h
and
pkg-config --cflags --libs gtk+-2.0
?

Lajon
15th July 2009, 15:17
I've got the same problem

for command
pkg-config --cflags --libs gtk+-2.0
got:

-D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

but for command
locate gtk.h
got nothing (only gallery-gtk.html file)

Does anybodny know how to resolve this issue ?

jpn
15th July 2009, 22:27
You can skip the QGtkStyle with "configure -no-gtkstyle" (the configure script should've excluded it since it cannot be compiled, though) or you can try installing "libgtk-dev".