From 0d015d57b80503b199466c8f7335e0978e3cd418 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 15 Feb 2023 09:56:44 -0600 Subject: [PATCH 1/3] Use compiler CFG files for Intel LLVM to use conda's sysroot and toolchain --- conda-recipe/build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 951e76366b..8f78567200 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -5,6 +5,11 @@ # activation scripts. export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib" +# Intel LLVM must cooperate with compiler and sysroot from conda +echo "--gcc-toolchain=$PREFIX --sysroot=$PREFIX/$HOST/sysroot -target $HOST" > icpx_for_conda.cfg +export ICPXCFG="$(pwd)/icpx_for_conda.cfg" +export ICXCFG="$(pwd)/icpx_for_conda.cfg" + if [ -e "_skbuild" ]; then ${PYTHON} setup.py clean --all fi @@ -12,11 +17,6 @@ export CMAKE_GENERATOR="Ninja" SKBUILD_ARGS="-- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx" echo "${PYTHON} setup.py install ${SKBUILD_ARGS}" -# Workaround for: -# DPC++ launched by cmake does not see components of `dpcpp_cpp_rt`, -# because conda build isolates LD_LIBRARY_PATH to only $PREFIX subfolders. -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$BUILD_PREFIX/lib - if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then # Install packages and assemble wheel package from built bits if [ "$CONDA_PY" == "36" ]; then From cf91310cbb094774718594879a3c036a7d12843c Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 15 Feb 2023 10:15:33 -0600 Subject: [PATCH 2/3] Also need C compiler, adding some debug output --- conda-recipe/build.sh | 5 +++++ conda-recipe/meta.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 8f78567200..e211691c9d 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -10,6 +10,11 @@ echo "--gcc-toolchain=$PREFIX --sysroot=$PREFIX/$HOST/sysroot -target $HOST" > i export ICPXCFG="$(pwd)/icpx_for_conda.cfg" export ICXCFG="$(pwd)/icpx_for_conda.cfg" +echo $ICPXCFG +cat $ICPXCFG +echo $ICXCFG +cat $ICXCFG + if [ -e "_skbuild" ]; then ${PYTHON} setup.py clean --all fi diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 72601ddd2f..b770b43b5e 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -12,6 +12,7 @@ build: requirements: build: + - {{ compiler('c') }} - {{ compiler('cxx') }} - {{ compiler('dpcpp') }} >=2022.1 # [not osx] host: From 885b2a3bfdfd1280b3fbd20503928f826dc31f16 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 15 Feb 2023 10:37:36 -0600 Subject: [PATCH 3/3] Using $BUILD_PREFIX over $PREFIX as this is where compiler is --- conda-recipe/build.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index e211691c9d..4520fcd607 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -6,15 +6,10 @@ export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib" # Intel LLVM must cooperate with compiler and sysroot from conda -echo "--gcc-toolchain=$PREFIX --sysroot=$PREFIX/$HOST/sysroot -target $HOST" > icpx_for_conda.cfg +echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg export ICPXCFG="$(pwd)/icpx_for_conda.cfg" export ICXCFG="$(pwd)/icpx_for_conda.cfg" -echo $ICPXCFG -cat $ICPXCFG -echo $ICXCFG -cat $ICXCFG - if [ -e "_skbuild" ]; then ${PYTHON} setup.py clean --all fi