Skip to content

Local build issue. Windows lib environment variable information does not propagate throughout the build/cmake process. It fails in the compiler tests. #491

Open
@scouzi1966

Description

@scouzi1966

Describe the issue

Hi. Has anyone try compiling Intel Extension for pytorch locally? https://github.com/intel/intel-extension-for-pytorch. I've followed instructions, setup Visual Studio 2022 and OneAPI. The main issue I have is that the linking process doesn't find the basic Windows libraries (they are on my system) and I do start the build batch with the 'lib' environment variable having the location of those. For example the kernel32.lib etc. It seems that the information of the 'lib' env gets lost along the cmake process of the build. Documentation states that the Intel compiler/linker does not need specifc -L directives when 'lib' contains them.

Activity

jingxu10

jingxu10 commented on Jan 26, 2024

@jingxu10
Contributor

@ashokei @min-jean-cho compilation issue on windows.

linlinz1

linlinz1 commented on Mar 18, 2024

@linlinz1

Any solution about this issue? Same problem when I try to build from source on Windows.

Aaronearlerichardson

Aaronearlerichardson commented on Mar 4, 2025

@Aaronearlerichardson

Tried Compiling on windows 11 with Intel Arc graphics. Followed instructions here: https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.5.10%2Bxpu&os=windows&package=source

Building wheel torch-2.5.0a0+gita8d6afb
-- The CXX compiler identification is IntelLLVM 2024.1.4 with GNU-like command-line
-- The C compiler identification is IntelLLVM 2024.1.4 with MSVC-like command-line
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe - broken
CMake Error at C:/Users/Jakda/miniconda3/Lib/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler

"C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icpx.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/Jakda/git/ipex_bundle/pytorch/build/CMakeFiles/CMakeScratch/TryCompile-9qlarw

Run Build Command(s):C:/Users/Jakda/miniconda3/Library/bin/ninja.exe -v cmTC_7fdac && [1/2] C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\icpx.exe  /nologo /TP   /DWIN32 /D_WINDOWS /GR /EHsc  /Zi /Ob0 /Od /RTC1 -MDd -QMD -QMT CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj -QMF CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj.d /FoCMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj /FdCMakeFiles\cmTC_7fdac.dir\ -c C:\Users\Jakda\git\ipex_bundle\pytorch\build\CMakeFiles\CMakeScratch\TryCompile-9qlarw\testCXXCompiler.cxx
FAILED: CMakeFiles/cmTC_7fdac.dir/testCXXCompiler.cxx.obj 
C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\icpx.exe  /nologo /TP   /DWIN32 /D_WINDOWS /GR /EHsc  /Zi /Ob0 /Od /RTC1 -MDd -QMD -QMT CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj -QMF CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj.d /FoCMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj /FdCMakeFiles\cmTC_7fdac.dir\ -c C:\Users\Jakda\git\ipex_bundle\pytorch\build\CMakeFiles\CMakeScratch\TryCompile-9qlarw\testCXXCompiler.cxx
icpx: error: unknown argument: '-nologo'

icpx: error: unknown argument: '-EHsc'

icpx: error: unknown argument: '-Zi'

icpx: error: unknown argument: '-MDd'

icpx: error: unknown argument: '-QMD'

icpx: error: unknown argument: '-QMT'

icpx: error: unknown argument: '-QMF'

icpx: error: no such file or directory: 'CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj' 

icpx: error: no such file or directory: 'CMakeFiles\cmTC_7fdac.dir\testCXXCompiler.cxx.obj.d'

icpx: error: no input files

ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:26 (project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jingxu10@linlinz1@Aaronearlerichardson@scouzi1966

        Issue actions

          Local build issue. Windows lib environment variable information does not propagate throughout the build/cmake process. It fails in the compiler tests. · Issue #491 · intel/intel-extension-for-pytorch