conda-forge / pyside2-feedstock

A conda-smithy repository for pyside2.
BSD 3-Clause "New" or "Revised" License
17 stars 19 forks source link

Build time compiler is stored in shiboken2 binary #130

Closed hmaarrfk closed 1 year ago

hmaarrfk commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

shiboken2 seems to store the build time compiler as the "forced default".

This makes it impossible to override the compiler as would be needed for cross compilation.

#if defined(Q_CC_CLANG) || defined(Q_CC_GNU)
static QString compilerFromCMake(const QString &defaultCompiler)
{
// Added !defined(Q_OS_DARWIN) due to PYSIDE-1032
#  if defined(CMAKE_CXX_COMPILER) && !defined(Q_OS_DARWIN)
    Q_UNUSED(defaultCompiler)
    return QString::fromLocal8Bit(CMAKE_CXX_COMPILER);
#  else
    return defaultCompiler;
#  endif
}
#endif // Q_CC_CLANG, Q_CC_GNU

sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp

Installed packages

.

Environment info

.
hmaarrfk commented 2 years ago

In the 5.15.5 build

$ grep -R "/home/conda/feedstock_root/build_artifacts/pyside2_1657204180233/_build_env/bin/x86_64-conda-linux-gnu-c++" ~/mambaforge/pkgs/pyside2-5.15.5-py39hbfe2af7_1
grep: /home/mark/mambaforge/pkgs/pyside2-5.15.5-py39hbfe2af7_1/bin/shiboken2: binary file matches

And in the 5.15.6 build

$ grep -R /home/conda/feedstock_root/build_artifacts/pyside2_1662903640412/_build_env/bin/x86_64-conda-linux-gnu-c++ ~/mambaforge/pkgs/pyside2-5.15.6-py39hbfe2af7_0
grep: /home/mark/mambaforge/pkgs/pyside2-5.15.6-py39hbfe2af7_0/bin/shiboken2: binary file matches
hmaarrfk commented 2 years ago

https://bugreports.qt.io/browse/PYSIDE-2057