Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Attempting to deal with QTBUG-41361
Qt 6.11 is out! See what's new in the release blog

Attempting to deal with QTBUG-41361

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 2.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RobM
    wrote on last edited by
    #1

    Here is a link to the bug I believe I am dealing with:

    I believe this because during the installation of qt-everywhere-opensource-src-4.8.6 I received a few errors during the make process. Specifically, near the end:

    In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h:84,
                     from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:24,
                     from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
    ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: ‘std::tr1’ has not been declared
         template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
                                                                         ^~~
    ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:74: error: expected ‘{’ before ‘has_trivial_constructor’
         template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~
    ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:68: error: ‘std::tr1’ has not been declared
         template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
                                                                        ^~~
    ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:73: error: expected ‘{’ before ‘has_trivial_destructor’
         template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
                                                                             ^~~~~~~~~~~~~~~~~~~~~~
    
    

    Then at the very end of the make process I received:

    Makefile:1624: recipe for target 'obj/release/pcre_exec.o' failed
    make[1]: *** [obj/release/pcre_exec.o] Error 1
    make[1]: Leaving directory '/tmp/qt-everywhere-opensource-src-4.8.6/src/script'
    Makefile:525: recipe for target 'sub-script-make_default-ordered' failed
    make: *** [sub-script-make_default-ordered] Error 2
    

    I believe the reported bug was for DOS but I am working with Ubuntu 16.04 so I changed: mkspecs\win32-g++\qmake.conf too mkspecs\linux-g++-64\qmake.conf and implemented the proposed solution adding ```
    QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98

    
    So I am wondering if my best bet is to downgrade from gcc 8.x to 4.7 or is there a different way of going about getting around these errors?
    JKSHJ 1 Reply Last reply
    0
    • R RobM

      Here is a link to the bug I believe I am dealing with:

      I believe this because during the installation of qt-everywhere-opensource-src-4.8.6 I received a few errors during the make process. Specifically, near the end:

      In file included from ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h:84,
                       from ../3rdparty/javascriptcore/JavaScriptCore/wtf/Vector.h:24,
                       from ../3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_exec.cpp:50:
      ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: ‘std::tr1’ has not been declared
           template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
                                                                           ^~~
      ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:74: error: expected ‘{’ before ‘has_trivial_constructor’
           template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~
      ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:68: error: ‘std::tr1’ has not been declared
           template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
                                                                          ^~~
      ../3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:73: error: expected ‘{’ before ‘has_trivial_destructor’
           template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
                                                                               ^~~~~~~~~~~~~~~~~~~~~~
      
      

      Then at the very end of the make process I received:

      Makefile:1624: recipe for target 'obj/release/pcre_exec.o' failed
      make[1]: *** [obj/release/pcre_exec.o] Error 1
      make[1]: Leaving directory '/tmp/qt-everywhere-opensource-src-4.8.6/src/script'
      Makefile:525: recipe for target 'sub-script-make_default-ordered' failed
      make: *** [sub-script-make_default-ordered] Error 2
      

      I believe the reported bug was for DOS but I am working with Ubuntu 16.04 so I changed: mkspecs\win32-g++\qmake.conf too mkspecs\linux-g++-64\qmake.conf and implemented the proposed solution adding ```
      QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++98

      
      So I am wondering if my best bet is to downgrade from gcc 8.x to 4.7 or is there a different way of going about getting around these errors?
      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi @RobM, std::tr1 is the "preview version" of C++11. After C++11 was released in 2011, compilers stopped supporting std::tr1 by default.

      Anyway, since you are building Qt yourself on a modern system with GCC 8, may I ask why you want to install Qt 4.8.6? Qt 4 reached end-of-life in December 2015, and is strongly discouraged for new projects. We are currently at Qt 5.11.1: https://www.qt.io/download

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      R 1 Reply Last reply
      5
      • JKSHJ JKSH

        Hi @RobM, std::tr1 is the "preview version" of C++11. After C++11 was released in 2011, compilers stopped supporting std::tr1 by default.

        Anyway, since you are building Qt yourself on a modern system with GCC 8, may I ask why you want to install Qt 4.8.6? Qt 4 reached end-of-life in December 2015, and is strongly discouraged for new projects. We are currently at Qt 5.11.1: https://www.qt.io/download

        R Offline
        R Offline
        RobM
        wrote on last edited by RobM
        #3

        @JKSH Yes, I am working with one of our legacy builds. There are some open PR's that I would like to address. However, I have been running into complications with the build process. I do not believe that the GUI would work without considerable alteration to the code with the newest version of Qt. I was hoping to find a way to get everything working without having to temporarily downgrade my version of gcc to 4.7. At this point it seems that downgrading might be my only option.

        Should I attempt to run gcc4.7 side by side with 8.1? I am not sure if downgrading gcc is really an option. Online you find mixed reviews. Some people saying its a terrible idea others saying its a snap.

        JKSHJ 1 Reply Last reply
        0
        • R Offline
          R Offline
          RobM
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            What distribution are you running ?

            AFAIK, most of them still ships Qt 4 and likely Qt 4.8.7 which is the latest version available for the Qt 4 series.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • R RobM

              @JKSH Yes, I am working with one of our legacy builds. There are some open PR's that I would like to address. However, I have been running into complications with the build process. I do not believe that the GUI would work without considerable alteration to the code with the newest version of Qt. I was hoping to find a way to get everything working without having to temporarily downgrade my version of gcc to 4.7. At this point it seems that downgrading might be my only option.

              Should I attempt to run gcc4.7 side by side with 8.1? I am not sure if downgrading gcc is really an option. Online you find mixed reviews. Some people saying its a terrible idea others saying its a snap.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              @RobM said in Attempting to deal with QTBUG-41361:

              Should I attempt to run gcc4.7 side by side with 8.1?

              I haven't tried this before so I can't say, sorry.

              @SGaist said in Attempting to deal with QTBUG-41361:

              AFAIK, most of them still ships Qt 4 and likely Qt 4.8.7 which is the latest version available for the Qt 4 series.

              +1 this would be best, if available.

              Otherwise, how did you go with -std=gnu++98? If it works, you can use it.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved