Open
Description
I configured my WSL instance with pointers to libraries inside the CUDA toolkit installation from Windows host.
With the default options and the appropriate cross compile config file, using the Linux nvcc
(which is cross-compile capable), the build is successful:
meson setup build libvmaf --cross-file mingw-w64-cross.txt --buildtype release --default-library static --prefix ~/vmaf_win/built
DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by "pkg-config"
The Meson build system
Version: 1.7.0
Source dir: /home/[redacted]/vmaf_win/vmaf/libvmaf
Build dir: /home/[redacted]/vmaf_win/vmaf/build
Build type: cross build
Project name: libvmaf
Project version: 3.0.0
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 13.0.0 "x86_64-w64-mingw32-gcc (GCC) 13-win32")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.41.90.20240122
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 13.0.0 "x86_64-w64-mingw32-g++ (GCC) 13-win32")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.41.90.20240122
C compiler for the build machine: cc (gcc 10.5.0 "cc (Ubuntu 10.5.0-4ubuntu2) 10.5.0")
C linker for the build machine: cc ld.bfd 2.42
C++ compiler for the build machine: c++ (gcc 10.5.0 "c++ (Ubuntu 10.5.0-4ubuntu2) 10.5.0")
C++ linker for the build machine: c++ ld.bfd 2.42
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Check usable header "stdatomic.h" : YES
Configuring version.h using configuration
Program nasm found: YES (/usr/bin/nasm)
Configuring config.asm using configuration
Program xxd found: YES (/usr/bin/xxd)
Configuring config.h using configuration
Run-time dependency threads found: YES
Library m found: YES
Found pkg-config: YES (/usr/bin/x86_64-w64-mingw32-pkg-config) 1.8.1
Checking for function "strsep" : NO
Program doxygen found: YES (/usr/bin/doxygen)
Configuring Doxyfile using configuration
Build targets in project: 32
libvmaf 3.0.0
User defined options
Cross files : mingw-w64-cross.txt
buildtype : release
default_library: static
prefix : /home/[redacted]/vmaf_win/built
Found ninja-1.11.1.git.kitware.jobserver-1 at /home/[redacted]/vmaf-venv/bin/ninja
But when enabling CUDA inside libvmaf/meson_options.txt
(setting value from false
to true
):
option('enable_cuda',
type: 'boolean',
value: true,
description: 'Enable CUDA support')
The build fails:
meson setup build libvmaf --cross-file mingw-w64-cross.txt --buildtype release --default-library static --prefix ~/vmaf_win/built
DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by "pkg-config"
The Meson build system
Version: 1.7.0
Source dir: /home/[redacted]/vmaf_win/vmaf/libvmaf
Build dir: /home/[redacted]/vmaf_win/vmaf/build
Build type: cross build
Project name: libvmaf
Project version: 3.0.0
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 13.0.0 "x86_64-w64-mingw32-gcc (GCC) 13-win32")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.41.90.20240122
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 13.0.0 "x86_64-w64-mingw32-g++ (GCC) 13-win32")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.41.90.20240122
C compiler for the build machine: cc (gcc 10.5.0 "cc (Ubuntu 10.5.0-4ubuntu2) 10.5.0")
C linker for the build machine: cc ld.bfd 2.42
C++ compiler for the build machine: c++ (gcc 10.5.0 "c++ (Ubuntu 10.5.0-4ubuntu2) 10.5.0")
C++ linker for the build machine: c++ ld.bfd 2.42
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Check usable header "stdatomic.h" : YES
Configuring version.h using configuration
Program nasm found: YES (/usr/bin/nasm)
Configuring config.asm using configuration
Program xxd found: YES (/usr/bin/xxd)
Run-time dependency CUDA (modules: cudart_static) found: YES 12.8 (/usr/local/cuda-11.2/v12.8)
libvmaf/src/meson.build:168: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
Compiler for language cuda for the build machine not found.
libvmaf/src/meson.build:168:4: ERROR: Compiler /usr/local/cuda/bin/nvcc cannot compile programs.
Content of the mingw-w64-cross.txt
cross-compile file used in the meson
syntax:
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-gcc-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
cmake = 'x86_64-w64-mingw32-cmake'
cuda = '/usr/local/cuda/bin/nvcc'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[built-in options]
c_args = ['-I~/vmaf_win/vmaf/libvmaf/include/libvmaf', '-I/usr/local/cuda-11.2/v12.8/include']
cpp_args = ['-I~/vmaf_win/vmaf/libvmaf/include/libvmaf', '-I/usr/local/cuda-11.2/v12.8/include']
c_link_args = ['-L~/vmaf_win/vmaf/libvmaf/build/src', '-L/usr/local/cuda-11.2/v12.8/lib/x64', '-lcudart_static']
cpp_link_args = ['-L~/vmaf_win/vmaf/libvmaf/build/src', '-L/usr/local/cuda-11.2/v12.8/lib/x64', '-lcudart_static']
prefix = '/usr/x86_64-w64-mingw32'
I attached the the full meson-log.txt
file (275KB).
Reminder: the build succeeds when CUDA is disabled (default) but fails when enabled
Metadata
Metadata
Assignees
Labels
No labels
Activity