Details
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
- relates to
-
PYSIDE-733 Shiboken execution fails on CentOS 7.2 with gcc 4.8.5
- Closed