Problem building static 32bit library on 64bit ubuntu



  • Hi,

    i am trying to build static 32 bit qt library on 64 bit ubuntu but the build fails with:

    @
    g++ -c -m32 -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_OPENGL_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_FREETYPE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++-32 -I. -I../../include/QtCore -I../../include/QtGui -I../../include -I../../include/QtOpenGL -I.rcc/release-static -I../3rdparty/harfbuzz/src -I/usr/X11R6/include -I/usr/X11R6/include -I.moc/release-static -o .obj/release-static/qgl_x11.o qgl_x11.cpp
    qgl_x11.cpp:1067: error: variable or field ‘qgl_use_font’ declared void
    qgl_x11.cpp:1067: error: ‘QFontEngineFT’ was not declared in this scope
    qgl_x11.cpp:1067: error: ‘engine’ was not declared in this scope
    qgl_x11.cpp:1067: error: expected primary-expression before ‘int’
    qgl_x11.cpp:1067: error: expected primary-expression before ‘int’
    qgl_x11.cpp:1067: error: expected primary-expression before ‘int’
    make[1]: *** [.obj/release-static/qgl_x11.o] Error 1
    make[1]: Leaving directory `/opt/qt4-sdk-2010.05/qt/src/opengl'
    make: *** [sub-opengl-make_default-ordered] Error 2
    @

    i configured it with:

    @
    ./configure -static -release -optimized-qmake -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg --prefix=/opt/qt4-static-32b -platform linux-g++-32 -nomake demos -nomake examples -confirm-license
    @

    Can anybody give me some clues ? :)



  • I assume that you have to have 32bit versions of Qt dependencies installed on your system along with 64bit versions.



  • Well yes, but i guess this error is confusing me...
    It complains that QFontEngineFT is not declared, but i see this include at the beginning of the file:
    @#include <private/qfontengine_ft_p.h>@
    (QFontEngineFT is declared in this header file)

    @
    qt$ find . -name qfontengine_ft_p.h
    ./include/QtGui/private/qfontengine_ft_p.h
    ./src/gui/text/qfontengine_ft_p.h
    @

    You can see -I../../include/QtGui in the g++ command so i suppose it finds this header file:
    @ ./include/QtGui/private/qfontengine_ft_p.h @
    which in turn contains only one line:
    @#include "../../../src/gui/text/qfontengine_ft_p.h"@

    No idea what's going on :(



  • Ok, src/gui/text/qfontengine_ft_p.h holds the definition of QFontEngineFT. But if you look inside it, then you will see that is is wrapped with

    @#ifndef QT_NO_FREETYPE@

    So, it looks like QT_NO_FREETYPE is defined and as a result the definition of class is just thrown away. I guess some options cause this behaviour. But at this point I don't know which one of them may be guilty.



  • I have just looked through the configure script and come up with an idea: try to specify a "-freetype" option when configuring. It is not documented when running

    @./configure --help@

    But according to configure's source, it is supported.



  • Ok cool, will try it.



  • Old post!

    I'm in same position. I have explicitly declared -system-freetype flag. Though compile terminates with same error.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.