Compiling Qt 5.5.1 results in error: this use of “defined” may not be portable [-Wexpansion-to-defined] Ask Question



  • Hi

    I need to compile qt-5.5 for building various applications.
    Qt provides instruction to accomplish this, hence following the steps provided here results in a make error.

    Note: I attempted searching for a solution of this make warning, but absolutely no results popup, however I cannot be the only one to experience this problem.

    System used:

    • Archlinux (Linux arch-desktop 4.9.77-1-lts #1 SMP Wed Jan 17 12:59:05 CET 2018 x86_64 GNU/Linux)
    • Qt 5.5.1
    • OpenSSL 1.0.2g
    • GCC (GCC) 7.2.1 20171224

    Steps taken:

    OS Installation:

    • During ArchLinux installation, I installed development packages with pacstrap /mnt/point/here base base-devel, see this for more info

    Post Installation:

    • Downloaded Qt 5.5.1 from here
    • Downloaded appropriate OpenSSL 1.0.2g (same found in Ubuntu distributions as this is my target platform) found here
    • Installing this OpenSSL version will break dependencies, so I extracted it to /opt/lib/openssl/, and placed the lib, bin, share folders in the root folder mentioned above.
    • extracted Qt-5.5.1
    • ran OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1
      (This sets the openssl library location to use for configuring. Then I link the openssl libraries and configure Qt-5.5.1 to install to /opt/qt-5.5.1)
    • This results in an appropriate output of abilities which Qt will have once installed, amongst which OpenSSL is found

    Finally, makeing with

    • make -j 8

    This takes a while eventually throwing the error:

    In file included from ../../include/QtCore/qlist.h:1:0,
                     from ../../include/QtCore/../../src/corelib/kernel/qobject.h:43,
                     from ../../include/QtCore/qobject.h:1,
                     from ../../include/QtCore/../../src/corelib/io/qiodevice.h:39,
                     from ../../include/QtCore/qiodevice.h:1,
                     from io/qfiledevice.h:37:
    ../../include/QtCore/../../src/corelib/tools/qlist.h:169:1: error: this use of "defined" may not be portable [-Wexpansion-to-defined]
     #if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    make[3]: *** [Makefile:2660: .obj/header_qtextcodec.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    make[3]: *** [Makefile:2436: .obj/header_qsequentialanimationgroup.o] Error 1
    make[3]: *** [Makefile:3127: .obj/header_qlibraryinfo.o] Error 1
    make[3]: *** [Makefile:1855: .obj/header_qabstractanimation.o] Error 1
    make[3]: *** [Makefile:1964: .obj/header_qanimationgroup.o] Error 1
    make[3]: *** [Makefile:2075: .obj/header_qparallelanimationgroup.o] Error 1
    make[3]: *** [Makefile:2186: .obj/header_qpauseanimation.o] Error 1
    make[3]: *** [Makefile:2573: .obj/header_qvariantanimation.o] Error 1
    make[3]: *** [Makefile:2325: .obj/header_qpropertyanimation.o] Error 1
    make[3]: *** [Makefile:3714: .obj/header_qbuffer.o] Error 1
    make[3]: *** [Makefile:3825: .obj/header_qdatastream.o] Error 1
    make[3]: *** [Makefile:4202: .obj/header_qdiriterator.o] Error 1
    make[3]: *** [Makefile:4079: .obj/header_qdir.o] Error 1
    make[3]: *** [Makefile:4313: .obj/header_qfile.o] Error 1
    make[3]: *** [Makefile:4422: .obj/header_qfiledevice.o] Error 1
    make[3]: *** [Makefile:3958: .obj/header_qdebug.o] Error 1
    make[3]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib'
    make[2]: *** [Makefile:142: sub-corelib-make_first] Error 2
    make[2]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase/src'
    make[1]: *** [Makefile:46: sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/cybex/qt-5.5/qt-everywhere-opensource-src-5.5.1/qtbase'
    make: *** [Makefile:73: module-qtbase-make_first] Error 2
    

    If you may be wondering if the fancy 'tricks' using OpenSSL may be causing the problem. No, since I tried it using my OpenSSL-1.1 install which resulted in the same issue. The older OpenSSL version is to be compatible with the older Qt version (still supported in Ubuntu systems)

    Any thoughts on what may cause the problem


  • Lifetime Qt Champion

    Hi,

    OpenSSL 1.1 support comes with Qt 5.10 so stay with 1.0.

    GCC 7.2 might not detected correctly by such an old version of Qt hence you may hit some bugs.

    You should remove the -developer-build option. It's for people developing Qt.

    By the way, why are you building Qt yourself rather than using the pre-built version ?



  • @SGaist hi, thanks for the prompt response.

    Note that this question is meant to be one of a couple of solutions to solve a particular problem.

    My problem, firstly. I have developed an application which should be compatible with version of Ubuntu 14.04 and onwards. This requires my application to be compatible with Qt 5.5.1 and OpenSSL 1.0.2g (as these are found are available in the aptitude repository).

    Newer versions of Qt will not be compatible since Qt 5.7 introduces lambdas amongst other new functions, which I had used, but sadly had to change back to be Qt 5.5.1 compatible

    Problem 1:

    My application should also be available for systems: i386 (32 bit builds) and amd64 (64 bit builds), and here is where one problem comes in (using -spec option)

    See for more details:

    When using the -spec option, one is required to call the 32bit qmake binary with a flag -spec linux-gcc++32. Adding this flag to the 64 bit binary results in a compile error.

    Researching this problem, I realized that the 64 bit binary will not be able to produce a 32 bit binary (I was hoping that it would), so I had to install a 32 bit Qt version. Since I was developing with Qt 5.5.1 as the target, and not wanting to lose my current Qt 5.9.3 installation, I proceeded with the following.

    Problem 2

    First, I attempted to install Qt-Creator 5.5.1 (to make things easier), which failed due to an OpenSSL error:

    08:25:16 ✔ cybex@arch-desktop ~ $ ./qt-opensource-linux-x64-5.5.1.run 
    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
    qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
    qt.network.ssl: QSslSocket: cannot resolve sk_new_null
    qt.network.ssl: QSslSocket: cannot resolve sk_push
    qt.network.ssl: QSslSocket: cannot resolve sk_free
    qt.network.ssl: QSslSocket: cannot resolve sk_num
    qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
    qt.network.ssl: QSslSocket: cannot resolve sk_value
    qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
    qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
    qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
    qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
    qt.network.ssl: QSslSocket: cannot resolve SSLeay
    qt.network.ssl: QSslSocket: cannot resolve SSLeay_version
    qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_num_locks
    qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
    qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
    Could not register file downloader for https protocol: QSslSocket::supportsSsl() returns false
    [36] Warning: QSslSocket: cannot call unresolved function SSLv23_client_method
    [38] Warning: QSslSocket: cannot call unresolved function sk_num
    Segmentation fault (core dumped)
    

    and secondly, manually attempting to compile this same Qt version results in error messages shown above (in original post)

    configured using: OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1

    Followed by make -j 8 resulting in error messages

    TL;DR

    • Have Qt 5.9.3 (64 bit)
    • Need Qt 5.5.1 (32 bit/64 bit) <---- causing the problems
      (need it for backwards compatibility and various architecture builds)

    Problem 1 (Build for various architectures):

    Unable to build for various architectures due to Qt need for that architecture is not installed, follows on onto problem 2

    Problem 2 (Backwards compatibility with Qt 5.5.1):

    I cannot install qt-opensource-linux-x64-5.5.1.run due to SSL not being detected on my current install, but:

    08:28:54 ✔ cybex@arch-desktop ~ $ openssl version
    OpenSSL 1.1.0g  2 Nov 2017
    

    and manually compiling Qt gives error messages shown in original post above


  • Lifetime Qt Champion

    Following your constraints (Running on Ubuntu 14.04, 64 and 32 bit) you shouldn't try to build your application with a version of gcc as recent as gcc 7.2.

    The best thing to do is to build your application on the oldest version of the platform you want to support. The simplest here would be to use virtual machines. One for each architecture or one with a multi-lib setup. That way you isolate precisely your development environment.



  • @SGaist hi.

    This question seems to be split into 2 parts now:

    1. Compiling Qt 5.5.1 on Archlinux
    2. Multilib environment (as another solution to Problem 1 & 2).

    Regarding the original Question

    @SGaist said in Compiling Qt 5.5.1 results in error: this use of “defined” may not be portable [-Wexpansion-to-defined] Ask Question:

    Hi,

    OpenSSL 1.1 support comes with Qt 5.10 so stay with 1.0.

    GCC 7.2 might not detected correctly by such an old version of Qt hence you may hit some bugs.

    You should remove the -developer-build option. It's for people developing Qt.

    By the way, why are you building Qt yourself rather than using the pre-built version ?

    I removed the -developer-build as you suggested, allowing me to proceed further in compiling that with the option enabled. However, I still ran into a problem during me compilation:

    Qt 5.5.1 Configured as follows:

    • Command

    OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1

    • Output:
    [cybex@arch-laptop qt-everywhere-opensource-src-5.5.1]$ OPENSSL_LIBS='-L/opt/lib/openssl/lib/ -lssl -lcrypto'; ./configure -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1
    + cd qtbase
    + /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -opensource -nomake examples -nomake tests -confirm-license -openssl-linked -prefix /opt/qt-5.5.1
    
    This is the Qt Open Source Edition.
    
    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.
    
    You have already accepted the terms of the Open Source license.
    
    Creating qmake...
    .....................................................................................In file included from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:77:0,
                     from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp:34:
    /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp: In member function ‘bool QFileSystemIterator::advance(QFileSystemEntry&, QFileSystemMetaData&)’:
    /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/linux-g++/../common/posix/qplatformdefs.h:144:35: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
     #define QT_READDIR_R            ::readdir_r
                                       ^
    /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp:106:17: note: in expansion of macro ‘QT_READDIR_R’
         lastError = QT_READDIR_R(dir, mt_file.data(), &dirEntry);
                     ^~~~~~~~~~~~
    In file included from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:57:0,
                     from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp:34:
    /usr/include/dirent.h:183:12: note: declared here
     extern int readdir_r (DIR *__restrict __dirp,
                ^~~~~~~~~
    /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp:106:60: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
         lastError = QT_READDIR_R(dir, mt_file.data(), &dirEntry);
                                                                ^
    In file included from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:57:0,
                     from /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/io/qfilesystemiterator_unix.cpp:34:
    /usr/include/dirent.h:183:12: note: declared here
     extern int readdir_r (DIR *__restrict __dirp,
                ^~~~~~~~~
    ...Done.
    Running configuration tests...
    
       Configure summary
    
    Build type:    linux-g++ (x86_64, CPU features: mmx sse sse2)
    Platform notes:
    
                - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
            
    Build options:
      Configuration .......... accessibility accessibility-atspi-bridge audio-backend avx avx2 c++11 clock-gettime clock-monotonic compile_examples concurrent cups dbus egl eglfs egl_x11 enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gstreamer-1.0 gtk2 gtkstyle harfbuzz iconv icu inotify ipv6ifname kms large-config largefile libinput libproxy libudev linuxfb medium-config minimal-config mremap mtdev nis opengl openssl-linked png posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports reduce_relocations release rpath shared small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-jpeg system-png system-zlib tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-evdev xlib xrender 
      Build parts ............ libs tools
      Mode ................... release
      Using sanitizer(s)...... none
      Using C++11 ............ yes
      Using gold linker....... yes
      Using new DTAGS ........ yes
      Using PCH .............. yes
      Target compiler supports:
        SSE2/SSE3/SSSE3 ...... yes/yes/yes
        SSE4.1/SSE4.2 ........ yes/yes
        AVX/AVX2 ............. yes/yes
    
    Qt modules and options:
      Qt D-Bus ............... yes (loading dbus-1 at runtime)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. yes
      QML debugging .......... yes
      Use system proxies ..... no
    
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... no
      CUPS ................... yes
      Evdev .................. yes
      FontConfig ............. yes
      FreeType ............... yes (system library)
      Glib ................... yes
      GStreamer .............. yes (1.0)
      GTK theme .............. yes
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... yes
      Image formats: 
        GIF .................. yes (plugin, using bundled copy)
        JPEG ................. yes (plugin, using system library)
        PNG .................. yes (in QtGui, using system library)
      journald ............... no
      libinput................ yes
      mtdev .................. yes (system library)
      Networking: 
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. yes
        OpenSSL .............. yes (linked to the libraries)
      NIS .................... yes
      OpenGL / OpenVG: 
        EGL .................. yes
        OpenGL ............... desktop
        OpenVG ............... no
      PCRE ................... system
      pkg-config ............. yes 
      PulseAudio ............. yes
      QPA backends: 
        DirectFB ............. no
        EGLFS ................ yes
          EGLFS i.MX6....... . no
          EGLFS KMS .......... yes
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... yes
        LinuxFB .............. yes
        XCB .................. yes (system library)
          EGL on X ........... yes
          GLX ................ yes
          MIT-SHM ............ yes
          Xcb-Xlib ........... yes
          Xcursor ............ yes (loaded at runtime)
          Xfixes ............. yes (loaded at runtime)
          Xi ................. no
          Xi2 ................ yes
          Xinerama ........... yes (loaded at runtime)
          Xrandr ............. yes (loaded at runtime)
          Xrender ............ yes
          XKB ................ yes
          XShape ............. yes
          XSync .............. yes
          XVideo ............. yes
      Session management ..... yes
      SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ no
        OCI .................. no
        ODBC ................. no
        PostgreSQL ........... no
        SQLite 2 ............. no
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. no
      tslib .................. yes
      udev ................... yes
      xkbcommon-x11........... yes (system library)
      xkbcommon-evdev......... yes
      zlib ................... yes (system library)
    
    
    NOTE: When linking against OpenSSL, you can override the default
    library names through OPENSSL_LIBS.
    For example:
        OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
    Info: creating super cache file /home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/.qmake.super
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /opt/qt-5.5.1
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    

    Compiling:

    • Command

    make -j 8

    • Output:
    //...
    
    g++ -o .obj/moc_qopengltimerquery.o .moc/moc_qopengltimerquery.cpp
    In file included from ../../include/QtCore/qcontiguouscache.h:1:0,
                     from ../../include/QtCore/../../src/corelib/io/qdebug.h:46,
                     from ../../include/QtCore/qdebug.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qgenericmatrix.h:38,
                     from ../../include/QtGui/qgenericmatrix.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qquaternion.h:37,
                     from ../../include/QtGui/qquaternion.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qmatrix4x4.h:39,
                     from ../../include/QtGui/qmatrix4x4.h:1,
                     from .moc/../opengl/qopenglshaderprogram.h:45,
                     from .moc/moc_qopenglshaderprogram.cpp:9:
    ../../include/QtCore/../../src/corelib/tools/qcontiguouscache.h:99:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
     #if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from ../../include/QtCore/qcontiguouscache.h:1:0,
                     from ../../include/QtCore/../../src/corelib/io/qdebug.h:46,
                     from ../../include/QtCore/qdebug.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qgenericmatrix.h:38,
                     from ../../include/QtGui/qgenericmatrix.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qquaternion.h:37,
                     from ../../include/QtGui/qquaternion.h:1,
                     from ../../include/QtGui/../../src/gui/math3d/qmatrix4x4.h:39,
                     from ../../include/QtGui/qmatrix4x4.h:1,
                     from ../../include/QtGui/../../src/gui/opengl/qopenglshaderprogram.h:45,
                     from ../../include/QtGui/qopenglshaderprogram.h:1,
                     from ../../include/QtGui/QOpenGLShader:1,
                     from .moc/../opengl/qopenglengineshadermanager_p.h:217,
                     from .moc/moc_qopenglengineshadermanager_p.cpp:9:
    ../../include/QtCore/../../src/corelib/tools/qcontiguouscache.h:99:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
     #if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    rm -f libQt5Gui.so.5.5.1 libQt5Gui.so libQt5Gui.so.5 libQt5Gui.so.5.5
    g++ -Wl,--no-undefined -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/opt/qt-5.5.1/lib -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/gui/QtGui.dynlist -Wl,-soname,libQt5Gui.so.5 -o libQt5Gui.so.5.5.1 .obj/qimage_ssse3.o .obj/qdrawhelper_ssse3.o .obj/qimage_sse4.o .obj/qdrawhelper_sse4.o .obj/qimagescale_sse4.o .obj/qimage_avx2.o .obj/qdrawhelper_avx2.o .obj/qimage_compat.o .obj/qaccessible.o .obj/qaccessiblecache.o .obj/qaccessibleobject.o .obj/qaccessibleplugin.o .obj/qplatformaccessibility.o .obj/qaccessiblebridge.o .obj/qgenericpluginfactory.o .obj/qgenericplugin.o .obj/qwindowsysteminterface.o .obj/qplatforminputcontextfactory.o .obj/qplatforminputcontextplugin.o .obj/qplatforminputcontext.o .obj/qplatformintegration.o .obj/qplatformdrag.o .obj/qplatformscreen.o .obj/qplatformintegrationfactory.o .obj/qplatformintegrationplugin.o .obj/qplatformtheme.o .obj/qplatformthemefactory.o .obj/qplatformthemeplugin.o .obj/qplatformwindow.o .obj/qplatformoffscreensurface.o .obj/qplatformcursor.o .obj/qplatformclipboard.o .obj/qplatformnativeinterface.o .obj/qsessionmanager.o .obj/qshapedpixmapdndwindow.o .obj/qsimpledrag.o .obj/qsurfaceformat.o .obj/qguiapplication.o .obj/qwindow.o .obj/qoffscreensurface.o .obj/qplatformsurface.o .obj/qsurface.o .obj/qclipboard.o .obj/qcursor.o .obj/qdrag.o .obj/qdnd.o .obj/qevent.o .obj/qinputmethod.o .obj/qkeysequence.o .obj/qkeymapper.o .obj/qpalette.o .obj/qguivariant.o .obj/qscreen.o .obj/qshortcutmap.o .obj/qstylehints.o .obj/qtouchdevice.o .obj/qplatformsharedgraphicscache.o .obj/qplatformdialoghelper.o .obj/qplatformservices.o .obj/qplatformsystemtrayicon.o .obj/qplatformsessionmanager.o .obj/qplatformmenu.o .obj/qpixelformat.o .obj/qpaintdevicewindow.o .obj/qrasterwindow.o .obj/qplatformgraphicsbuffer.o .obj/qplatformgraphicsbufferhelper.o .obj/qinputdevicemanager.o .obj/qplatformopenglcontext.o .obj/qopenglcontext.o .obj/qopenglwindow.o .obj/qbitmap.o .obj/qimage.o .obj/qimage_conversions.o .obj/qimageiohandler.o .obj/qimagereader.o .obj/qimagewriter.o .obj/qpaintengine_pic.o .obj/qpicture.o .obj/qpictureformatplugin.o .obj/qpixmap.o .obj/qpixmapcache.o .obj/qplatformpixmap.o .obj/qmovie.o .obj/qpixmap_raster.o .obj/qpixmap_blitter.o .obj/qnativeimage.o .obj/qimagepixmapcleanuphooks.o .obj/qicon.o .obj/qiconloader.o .obj/qiconengine.o .obj/qiconengineplugin.o .obj/qbmphandler.o .obj/qppmhandler.o .obj/qxbmhandler.o .obj/qxpmhandler.o .obj/qpnghandler.o .obj/qfont.o .obj/qfontengine.o .obj/qfontsubset.o .obj/qfontmetrics.o .obj/qfontdatabase.o .obj/qtextengine.o .obj/qtextlayout.o .obj/qtextformat.o .obj/qtextobject.o .obj/qtextoption.o .obj/qfragmentmap.o .obj/qtextdocument.o .obj/qtextdocument_p.o .obj/qtexthtmlparser.o .obj/qabstracttextdocumentlayout.o .obj/qtextdocumentlayout.o .obj/qtextcursor.o .obj/qtextdocumentfragment.o .obj/qtextimagehandler.o .obj/qtexttable.o .obj/qtextlist.o .obj/qtextdocumentwriter.o .obj/qsyntaxhighlighter.o .obj/qcssparser.o .obj/qzip.o .obj/qtextodfwriter.o .obj/qstatictext.o .obj/qrawfont.o .obj/qglyphrun.o .obj/qdistancefield.o .obj/qfontengine_qpf2.o .obj/qplatformfontdatabase.o .obj/qharfbuzzng.o .obj/qbackingstore.o .obj/qbezier.o .obj/qblendfunctions.o .obj/qblittable.o .obj/qbrush.o .obj/qcolor.o .obj/qcolor_p.o .obj/qcosmeticstroker.o .obj/qcssutil.o .obj/qdrawhelper.o .obj/qemulationpaintengine.o .obj/qgammatables.o .obj/qgrayraster.o .obj/qimagescale.o .obj/qmatrix.o .obj/qmemrotate.o .obj/qoutlinemapper.o .obj/qpagedpaintdevice.o .obj/qpagelayout.o .obj/qpagesize.o .obj/qpaintdevice.o .obj/qpaintengine.o .obj/qpaintengineex.o .obj/qpaintengine_blitter.o .obj/qpaintengine_raster.o .obj/qpainter.o .obj/qpainterpath.o .obj/qpathclipper.o .obj/qpdf.o .obj/qpdfwriter.o .obj/qpen.o .obj/qpolygon.o .obj/qrasterizer.o .obj/qregion.o .obj/qstroker.o .obj/qtextureglyphcache.o .obj/qtransform.o .obj/qplatformbackingstore.o .obj/qpathsimplifier.o .obj/qdesktopservices.o .obj/qvalidator.o .obj/qgridlayoutengine.o .obj/qabstractlayoutstyleinfo.o .obj/qlayoutpolicy.o .obj/qgenericmatrix.o .obj/qmatrix4x4.o .obj/qquaternion.o .obj/qvector2d.o .obj/qvector3d.o .obj/qvector4d.o .obj/qopengl.o .obj/qopenglfunctions.o .obj/qopenglframebufferobject.o .obj/qopenglpaintdevice.o .obj/qopenglbuffer.o .obj/qopenglshaderprogram.o .obj/qopenglgradientcache.o .obj/qopengltexturecache.o .obj/qopenglengineshadermanager.o .obj/qopengl2pexvertexarray.o .obj/qopenglpaintengine.o .obj/qopenglcustomshaderstage.o .obj/qtriangulatingstroker.o .obj/qopengltextureglyphcache.o .obj/qtriangulator.o .obj/qopenglversionfunctions.o .obj/qopenglversionfunctionsfactory.o .obj/qopenglvertexarrayobject.o .obj/qopengldebug.o .obj/qopengltextureblitter.o .obj/qopengltexture.o .obj/qopengltexturehelper.o .obj/qopenglpixeltransferoptions.o .obj/qopenglfunctions_1_0.o .obj/qopenglfunctions_1_1.o .obj/qopenglfunctions_1_2.o .obj/qopenglfunctions_1_3.o .obj/qopenglfunctions_1_4.o .obj/qopenglfunctions_1_5.o .obj/qopenglfunctions_2_0.o .obj/qopenglfunctions_2_1.o .obj/qopenglfunctions_3_0.o .obj/qopenglfunctions_3_1.o .obj/qopenglfunctions_3_2_core.o .obj/qopenglfunctions_3_3_core.o .obj/qopenglfunctions_4_0_core.o .obj/qopenglfunctions_4_1_core.o .obj/qopenglfunctions_4_2_core.o .obj/qopenglfunctions_4_3_core.o .obj/qopenglfunctions_4_4_core.o .obj/qopenglfunctions_4_5_core.o .obj/qopenglfunctions_3_2_compatibility.o .obj/qopenglfunctions_3_3_compatibility.o .obj/qopenglfunctions_4_0_compatibility.o .obj/qopenglfunctions_4_1_compatibility.o .obj/qopenglfunctions_4_2_compatibility.o .obj/qopenglfunctions_4_3_compatibility.o .obj/qopenglfunctions_4_4_compatibility.o .obj/qopenglfunctions_4_5_compatibility.o .obj/qopengltimerquery.o .obj/qguivariantanimation.o .obj/qstandarditemmodel.o .obj/qimage_sse2.o .obj/qdrawhelper_sse2.o .obj/moc_qaccessible.o .obj/moc_qaccessiblecache_p.o .obj/moc_qaccessibleplugin.o .obj/moc_qaccessiblebridge.o .obj/moc_qgenericplugin.o .obj/moc_qplatforminputcontext.o .obj/moc_qplatforminputcontextplugin_p.o .obj/moc_qplatformintegrationplugin.o .obj/moc_qplatformthemeplugin.o .obj/moc_qplatformnativeinterface.o .obj/moc_qplatformmenu.o .obj/moc_qshapedpixmapdndwindow_p.o .obj/moc_qoffscreensurface.o .obj/moc_qclipboard.o .obj/moc_qdrag.o .obj/moc_qdnd_p.o .obj/moc_qevent.o .obj/moc_qkeysequence.o .obj/moc_qkeymapper_p.o .obj/moc_qpalette.o .obj/moc_qsessionmanager.o .obj/moc_qscreen.o .obj/moc_qstylehints.o .obj/moc_qtouchdevice.o .obj/moc_qplatformsharedgraphicscache.o .obj/moc_qplatformdialoghelper.o .obj/moc_qpaintdevicewindow.o .obj/moc_qrasterwindow.o .obj/moc_qplatformgraphicsbuffer.o .obj/moc_qinputdevicemanager_p.o .obj/moc_qopenglcontext.o .obj/moc_qopenglwindow.o .obj/moc_qimageiohandler.o .obj/moc_qpictureformatplugin.o .obj/moc_qiconengineplugin.o .obj/moc_qfont.o .obj/moc_qfontdatabase.o .obj/moc_qtextformat.o .obj/moc_qtextobject.o .obj/moc_qtextdocument.o .obj/moc_qtextimagehandler_p.o .obj/moc_qtexttable.o .obj/moc_qtextlist.o .obj/moc_qbrush.o .obj/moc_qpainter.o .obj/moc_qpdfwriter.o .obj/moc_qplatformbackingstore.o .obj/moc_qvalidator.o .obj/moc_qopenglshaderprogram.o .obj/moc_qopenglengineshadermanager_p.o .obj/moc_qopengltimerquery.o  -L/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/lib -lQt5Core -lpthread -lpng -lqtharfbuzzng -lz -lGL 
    ln -s libQt5Gui.so.5.5.1 libQt5Gui.so
    ln -s libQt5Gui.so.5.5.1 libQt5Gui.so.5
    ln -s libQt5Gui.so.5.5.1 libQt5Gui.so.5.5
    rm -f ../../lib/libQt5Gui.so.5.5.1
    mv -f libQt5Gui.so.5.5.1  ../../lib/ 
    rm -f ../../lib/libQt5Gui.so
    rm -f ../../lib/libQt5Gui.so.5
    rm -f ../../lib/libQt5Gui.so.5.5
    mv -f libQt5Gui.so ../../lib/ 
    mv -f libQt5Gui.so.5 ../../lib/ 
    mv -f libQt5Gui.so.5.5 ../../lib/ 
    make[3]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src/gui'
    make[2]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase/src'
    make[1]: *** [Makefile:46: sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/cybex/qt5-5-1/qt-everywhere-opensource-src-5.5.1/qtbase'
    make: *** [Makefile:73: module-qtbase-make_first] Error 2
    

    @SGaist said in Compiling Qt 5.5.1 results in error: this use of “defined” may not be portable [-Wexpansion-to-defined] Ask Question:

    Following your constraints (Running on Ubuntu 14.04, 64 and 32 bit) you shouldn't try to build your application with a version of gcc as recent as gcc 7.2.

    The best thing to do is to build your application on the oldest version of the platform you want to support. The simplest here would be to use virtual machines. One for each architecture or one with a multi-lib setup. That way you isolate precisely your development environment.

    Any thoughts on this error, or is it due to a more recent GCC version (in my case GCC 7.2)


  • Lifetime Qt Champion

    Remove the -j 8. The error is somewhere else. These are just warnings.


Log in to reply
 

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