Details
Description
When I install pyside2 with
python setup.py --qmake=$(which qmake) --build-tests --ignore-git --jobs=8 install
I run into
qt.shiboken: (shiboken) CLANG builtins includes directory: /work/logiciels/rh7/llvm/6.0.1/lib/clang/6.0.1/include
(minimal) clang_parseTranslationUnit2(0x0, cmd[7]=-isystem/work/logiciels/rh7/llvm/6.0.1/lib/clang/6.0.1/include -fPIC -fno-exceptions -Wno-constant-logical-operand -std=c++14 -I/work/scratch/logiciels/sources/pyside2/pyside-setup/sources/shiboken2/tests/libminimal /tmp/global_J46778.hpp)
(shiboken) clang_parseTranslationUnit2(0x0, cmd[6]=-isystem/work/logiciels/rh7/llvm/6.0.1/lib/clang/6.0.1/include -fPIC -fno-exceptions -Wno-constant-logical-operand -std=c++14 /tmp/nothing_J46774.hpp)
Detecting inconsistencies in typesystem... [OK]
qt.shiboken: (shiboken) No C++ classes found!
/work/scratch/logiciels/sources/pyside2/pyside-setup/sources/shiboken2/tests/libminimal/listuser.h:32:10: fatal error: 'list' file not found
This relates to the fact clang in installed in a non standard directory, and that its default standard library is libc++. The installation procedure can be found there.
$ echo | clang++ -Wp,-v -x c++ - -fsyntax-only clang -cc1 version 6.0.1 based upon LLVM 6.0.1 default target x86_64-unknown-linux-gnu ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /work/logiciels/rh7/llvm/6.0.1/bin/../include/c++/v1 /usr/local/include /work/logiciels/rh7/llvm/6.0.1/lib/clang/6.0.1/include /usr/include End of search list.
Note that I could proceed with the compilation thanks to a very dirty hack
diff --git i/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp w/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp index 6554548..6f82fbd 100644 --- i/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp +++ w/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp @@ -178,6 +178,13 @@ QByteArrayList emulatedCompilerOptions() result.append(QByteArrayLiteral("-isystem")); result.append(clangBuiltinIncludesDir); } + const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("clang++")); + for (const HeaderPath &h : gppPaths) \{ + // if (h.path.contains("c++")) + // result.append(QByteArrayLiteral("-isystem")); + // result.append(h.path); + headerPaths.append(h); + } // Append the c++ include paths since Clang is unable to find <list> etc // on RHEL 7.4 with g++ 6.3. 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. @@ -194,7 +201,7 @@ QByteArrayList emulatedCompilerOptions() detectVulkan(&headerPaths); std::transform(headerPaths.cbegin(), headerPaths.cend(), std::back_inserter(result), [](const HeaderPath &p) \{ - return HeaderPath::includeOption(p, true); + return HeaderPath::includeOption(p, false); }); return result; }
Attachments
Issue Links
- relates to
-
PYSIDE-693 Fix shiboken executable to work
- Closed
-
PYSIDE-513 PySide2 with Qt 5.9 fails to build with pyside-setup.py due to error: definition of builtin function
- Closed
-
PYSIDE-1012 cent OS/conda forge: fatal error: 'type_traits' file not found
- Closed
For Gerrit Dashboard: PYSIDE-733 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
234146,4 | shiboken: Provide g++ internal headers for CentOS, too | 5.11 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
263251,3 | shiboken: Provide g++ internal headers for CentOS, too | 5.9 | pyside/pyside-setup | Status: ABANDONED | 0 | 0 |