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
For Gerrit Dashboard: PYSIDE-1012 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
263330,7 | Fix build on centOS/conda forge | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
388333,6 | shiboken: Add missing g++ includes for g++ 11.3 | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
444622,2 | shiboken: Add missing g++ includes for g++ 11.3 | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
444625,2 | shiboken: Add missing g++ includes for g++ 11.3 | tqtc/lts-6.2 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
444626,3 | shiboken: Add missing g++ includes for g++ 11.3 | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |