Linux Qt installation - useful environment variables



  • Hi all,

    I am trying to install qt-everywhere-opensource-src-4.7.3 on a Linux X86_64 platform. I have all X stuff (X11, Xi, Xrender, ...) installed under nonstandard path. I usually export CFLAGS, CPPFLAGS, LDFLAGS before running configure script and it usually works but not in this case; for example:

    Xinerama auto-detection... ()
    g++ -c -m64 -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++-64 -I. -I/usr/X11R6/include -o xinerama.o xinerama.cpp
    xinerama.cpp:43:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
    compilation terminated.
    make: *** [xinerama.o] Error 1
    Xinerama disabled.

    Does Qt only accept X-stuff installed under standard path? Here is my Xinerama installation:

    $ pwd ; ls -R Xinerama
    /usr/local/gcc/4.5.2
    Xinerama:
    1.1.1

    Xinerama/1.1.1:
    include lib share

    Xinerama/1.1.1/include:
    X11

    Xinerama/1.1.1/include/X11:
    extensions

    Xinerama/1.1.1/include/X11/extensions:
    panoramiXext.h Xinerama.h

    Xinerama/1.1.1/lib:
    libXinerama.a libXinerama.la libXinerama.so libXinerama.so.1 libXinerama.so.1.0.0 pkgconfig

    Xinerama/1.1.1/lib/pkgconfig:
    xinerama.pc

    Xinerama/1.1.1/share:
    man

    Xinerama/1.1.1/share/man:
    man3

    Xinerama/1.1.1/share/man/man3:
    Xinerama.3 XineramaIsActive.3 XineramaQueryExtension.3 XineramaQueryScreens.3 XineramaQueryVersion.3

    As I said I added the include folder to CFLAGS but it doesn't work. If I open config.tests/x11/xinerama/Makefile i can read:

    CC = gcc
    CXX = g++
    DEFINES =
    CFLAGS = -m64 -pipe -O2 -Wall -W $(DEFINES)
    CXXFLAGS = -m64 -pipe -O2 -Wall -W $(DEFINES)
    INCPATH = -I../../../mkspecs/linux-g++-64 -I. -I/usr/X11R6/include
    LINK = g++
    LFLAGS = -m64 -Wl,-O1
    LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 -lXinerama -lXext -lX11 -lm
    AR = ar cqs
    RANLIB =
    QMAKE = /usr/local/src/software_scientifico/qt-everywhere-opensource-src-4.7.3/bin/qmake
    TAR = tar -cf
    COMPRESS = gzip -9f
    COPY = cp -f
    SED = sed
    COPY_FILE = $(COPY)
    COPY_DIR = $(COPY) -r
    STRIP = strip
    INSTALL_FILE = install -m 644 -p
    INSTALL_DIR = $(COPY_DIR)
    INSTALL_PROGRAM = install -m 755 -p
    DEL_FILE = rm -f
    SYMLINK = ln -f -s
    DEL_DIR = rmdir
    MOVE = mv -f
    CHK_DIR_EXISTS= test -d
    MKDIR = mkdir -p

    Do I need to change CFLAGS here? Is it enough to accomplish make step too? Do I need to do the same for each library not found?

    Installing everything under standard path is not possible.

    Thanks for your help!


  • Moderators

    Which build system are you using?



  • I am not sure I understand the question. Anyway:

    I am running Kubuntu Lucid X86_64

    $ uname -a
    Linux ajax 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux

    gcc --version
    gcc (GCC) 4.5.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


  • Moderators

    What do you want to build? I assume Qt, but your post does imply that you actually want to build Xinerama...

    Which build system are you using to build (if it is not Qt that you want to build)? Which configure flags are you using (if it is Qt)?



  • I am sorry, it must be my English which is not very good.

    I am trying to build Qt. I downloaded qt-everywhere-opensource-src-4.7.3.tar.gz and I read a page similar to http://doc.qt.nokia.com/4.7/requirements-x11.html in the doc folder. As you can see there are different libraries among which Xinerama. I installed all the libraries in the list of requirements. After that I run the configure script (./configure -v --prefix=$GLOBAL_PREFIX/qt/$QT_VERSION
    -opensource) for Qt and i received:

    Build type: linux-g++-64
    Architecture: x86_64
    Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
    

    qmake vars .......... cat: .qmake.vars: No such file or directory
    qmake switches .........
    Build .................. libs tools examples demos docs translations
    Configuration .......... release shared dll largefile stl precompile_header mmx 3dnow sse sse2 sse3 ssse3 sse4_1 sse4_2 avx minimal-config small-config medium-config large-config full-config qt3support accessibility opengl reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png system-freetype system-zlib nis cups iconv x11sm xshape xsync xrender mitshm fontconfig xkb alsa xmlpatterns multimedia audio-backend svg script scripttools declarative release
    Debug .................. no
    Qt 3 compatibility ..... yes
    QtDBus module .......... no
    QtConcurrent code ...... yes
    QtGui module ........... yes
    QtScript module ........ yes
    QtScriptTools module ... yes
    QtXmlPatterns module ... yes
    Phonon module .......... no
    Multimedia module ...... auto
    SVG module ............. yes
    WebKit module .......... yes
    JavaScriptCore JIT ..... To be decided by JavaScriptCore
    Declarative module ..... yes
    Declarative debugging ...yes
    Support for S60 ........ no
    Symbian DEF files ...... no
    STL support ............ yes
    PCH support ............ yes
    MMX/3DNOW/SSE/SSE2/SSE3. yes/yes/yes/yes/yes
    SSSE3/SSE4.1/SSE4.2..... yes/yes/yes
    AVX..................... yes
    Graphics System ........ default
    IPv6 support ........... yes
    IPv6 ifname support .... yes
    getaddrinfo support .... yes
    getifaddrs support ..... yes
    Accessibility .......... yes
    NIS support ............ yes
    CUPS support ........... yes
    Iconv support .......... yes
    Glib support ........... no
    GStreamer support ...... no
    PulseAudio support ..... no
    Large File support ..... yes
    GIF support ............ plugin
    TIFF support ........... plugin (qt)
    JPEG support ........... plugin (system)
    PNG support ............ yes (system)
    MNG support ............ plugin (qt)
    zlib support ........... system
    Session management ..... yes
    OpenGL support ......... yes (Desktop OpenGL)
    OpenVG support ......... no
    NAS sound support ...... no
    XShape support ......... yes
    XVideo support ......... no
    XSync support .......... yes
    Xinerama support ....... no
    Xcursor support ........ no
    Xfixes support ......... runtime
    Xrandr support ......... no
    Xrender support ........ yes
    Xi support ............. no
    MIT-SHM support ........ yes
    FontConfig support ..... yes
    XKB Support ............ yes
    immodule support ....... yes
    GTK theme support ...... no
    SQLite support ......... plugin (qt)
    OpenSSL support ........ no
    Alsa support ........... yes
    ICD support ............ no

    As you can see I have no support for Xinerama (I don't know exactly the consequences) although I installed it. I also have no support for other packages i installed; Xinerama is just an example.

    If i check the configure output I can see:

    Xinerama auto-detection… ()
    g++ -c -m64 -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++-64 -I. -I/usr/X11R6/include -o xinerama.o xinerama.cpp
    xinerama.cpp:43:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
    compilation terminated.
    make: *** [xinerama.o] Error 1
    Xinerama disabled.

    That's strange since I set CFLAGS and CPPFLAGS ( -I/usr/local/gcc/4.5.2//Xinerama/1.1.1/include). So I checked config.tests/x11/xinerama/Makefile and I have found Qt configuration test does not use my CFLAGS; it only search into /usr/X11R6/include.

    Is there an environment variable or configure option to make qt installation process aware of dependency libraries installed in non-standard path?

    cheers


Log in to reply
 

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