Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1012

cent OS/conda forge: fatal error: 'type_traits' file not found

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.12.4
    • None
    • Shiboken
    • None
    • Linux/X11
    • f4d1a606a0fe5f15ea89779ca3f1bbb9673c2cc6 (pyside/pyside-setup/5.12), dc9f73708 (tqtc/lts-5.15)

    Description

      On the conda-forge Linux image shiboken fails to add the gcc include dirs and compiling pyside fails with:

      fatal error: 'type_traits' file not found

       

      Looking at compilersupport.cpp, we are using centos 6.10 with a custom clang 8.0.0, so the logic centos|redhat>=7,<8 is not verified and checkProductVersion returns false, so needsGppInternalHeaders returns false:

      // Append the c++ include paths since Clang is unable to find <list> etc
       // on RHEL 7 with g++ 6.3 or CentOS 7.2.
       // A fix for this has been added to Clang 5.0, so, the code can be removed
       // once Clang 5.0 is the minimum version.
       if (needsGppInternalHeaders()) {
       const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("g++"));
       for (const HeaderPath &h : gppPaths) {
       if (h.path.contains("c++"))
       headerPaths.append(h);
       }
       }

      Maybe that logic isnt tied to the os nor clang version ?

       

       

      But that's not the only problem; if I force needsGppInternalHeaders to return true.

      Then it fails on another unfound header: features.h, this c header is not found because of the h.path.contains("c++") filter, so I had to use:

       if (h.path.contains("c++") || h.path.contains("sysroot"))

       

      Another problem is the name of the compiler, it defaults to "g+" but we're using a custom g+ 7.3.0 named x86_64-conda_cos6-linux-gnu-c++,

      so I used an env var:

      QString cxx = QString::fromLocal8Bit(qgetenv("CXX"));
       if (cxx.isEmpty()) cxx = QStringLiteral("g++");

      One could also use CMAKE_C_COMPILER, maybe that's even better.
       
       
      One last problem is the os name comparison that must use lowercase conversion, as productType returns "CentOS":
       

      const QString &productType = QSysInfo::productType().toLower();
      if (productType == QLatin1String("rhel"))
       return LinuxDistribution::RedHat;
      if (productType == QLatin1String("centos"))
        return LinuxDistribution::CentOs;
      

       

       

       

       

       

      Attachments

        Issue Links

          For Gerrit Dashboard: PYSIDE-1012
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              jschueller Julien Schueller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes