I am a postgraduate student in AI, and I wish to use GIMP GIMP 3.0 RC3 Released - GIMP , an open-source tool like Photoshop, as an interface to demo my school project feature about AI photo editing like segmentation, AI generation inpainting and etc.
I’m facing trouble building the source code of PyTorch. The reason I’m building PyTorch from source is that GIMP 3.0 RC3 uses MSYS2 Mingw x86_64 Python, and in that environment, it is restricted from calling pip install."
Below is the setup error, "Any help or tips would be appreciated
ng_mi@ClarenceNg MINGW64 /c/Users/ng_mi/Nus/ITSS/pytorch
# python setup.py bdist_wheel
Building wheel torch-2.7.0a0+git69301fb
-- Building version 2.7.0a0+git69301fb
cmake -GNinja -DBUILD_CAFFE2_OPS=1 -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR=Ninja -DCMAKE_INSTALL_PREFIX=C:/Users/ng_mi/Nus/ITSS/pytorch/torch -DCMAKE_PREFIX_PATH=C:/msys64/mingw64/lib/python3.12/site-packages -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DPython_EXECUTABLE=C:/msys64/mingw64/bin/python.exe -DTORCH_BUILD_VERSION=2.7.0a0+git69301fb -DUSE_CUDA=1 -DUSE_DISTRIBUTED=0 -DUSE_FBGEMM=0 -DUSE_MKL=0 -DUSE_MKLDNN=1 -DUSE_NUMPY=True -DUSE_OPENMP=1 -DUSE_ROCM=1 C:/Users/ng_mi/Nus/ITSS/pytorch
CMake Warning at CMakeLists.txt:422 (message):
TensorPipe cannot be used on Windows. Set it to OFF
CMake Warning at CMakeLists.txt:424 (message):
KleidiAI cannot be used on Windows. Set it to OFF
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Compiler does not support SVE extension. Will not build perfkernels.
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6 (found version "12.6")
-- The CUDA compiler identification is NVIDIA 12.6.20 with host compiler MSVC 19.42.34436.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - failed
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin/nvcc.exe
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin/nvcc.exe - broken
CMake Error at C:/msys64/mingw64/share/cmake/Modules/CMakeTestCUDACompiler.cmake:59 (message):
The CUDA compiler
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin/nvcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'C:/Users/ng_mi/Nus/ITSS/pytorch/build/CMakeFiles/CMakeScratch/TryCompile-nhouhq'
Run Build Command(s): C:/msys64/mingw64/bin/ninja.exe -v cmTC_3ef1b
[1/2] C:\PROGRA~1\NVIDIA~2\CUDA\v12.6\bin\nvcc.exe -forward-unknown-to-host-compiler -DLIBCUDACXX_ENABLE_SIMPLIFIED_COMPLEX_OPERATIONS -Xfatbin -compress-all -Xcompiler=" -Zi -Ob0 -Od /RTC1" "--generate-code=arch=compute_52,code=[compute_52,sm_52]" -Xcompiler=-MDd -MD -MT CMakeFiles\cmTC_3ef1b.dir\main.cu.obj -MF CMakeFiles\cmTC_3ef1b.dir\main.cu.obj.d -x cu -c C:\Users\ng_mi\Nus\ITSS\pytorch\build\CMakeFiles\CMakeScratch\TryCompile-nhouhq\main.cu -o CMakeFiles\cmTC_3ef1b.dir\main.cu.obj -Xcompiler=-FdCMakeFiles\cmTC_3ef1b.dir\,-FS
main.cu
tmpxft_0000578c_00000000-10_main.cudafe1.cpp
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_3ef1b.dir --rc=C:\msys64\mingw64\bin\windres.exe --mt="" --manifests -- C:\msys64\mingw64\bin\ld.exe /nologo CMakeFiles\cmTC_3ef1b.dir\main.cu.obj /out:cmTC_3ef1b.exe /implib:cmTC_3ef1b.lib /pdb:cmTC_3ef1b.pdb /version:0.0 /debug /INCREMENTAL cudadevrt.lib cudart_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/lib/x64" && cd ."
FAILED: cmTC_3ef1b.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\mingw64\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_3ef1b.dir --rc=C:\msys64\mingw64\bin\windres.exe --mt="" --manifests -- C:\msys64\mingw64\bin\ld.exe /nologo CMakeFiles\cmTC_3ef1b.dir\main.cu.obj /out:cmTC_3ef1b.exe /implib:cmTC_3ef1b.lib /pdb:cmTC_3ef1b.pdb /version:0.0 /debug /INCREMENTAL cudadevrt.lib cudart_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib -LIBPATH:"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/lib/x64" && cd ."
RC Pass 1: command "C:\msys64\mingw64\bin\windres.exe /fo CMakeFiles\cmTC_3ef1b.dir/manifest.res CMakeFiles\cmTC_3ef1b.dir/manifest.rc" failed (exit code 1) with the following output:
Usage: C:\msys64\mingw64\bin\windres.exe [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
C:\msys64\mingw64\bin\windres.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 pe-i386 pei-i386 elf32-i386 elf32-iamcu pdb elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
cmake/public/cuda.cmake:47 (enable_language)
cmake/Dependencies.cmake:44 (include)
CMakeLists.txt:865 (include)
-- Configuring incomplete, errors occurred!