kornelski / mozjpeg-sys

Rust bindings for mozjpeg
https://lib.rs/crates/mozjpeg-sys
Other
33 stars 17 forks source link

aarch64-pc-windows-msvc platform 'vendor/simd/arm/aarch64/jsimd_neon.S' ignored #40

Closed MiniOcean404 closed 3 months ago

MiniOcean404 commented 3 months ago

I compiled the aarch64-pc-windows-msvc platform in github action, but it prompted an error. I read the code and solved it myself for a long time. I hope you can help me

Error Info

warning: mozjpeg-sys@2.2.0: cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release warning: mozjpeg-sys@2.2.0: cl : Command line warning D9002 : ignoring unknown option '-xassembler-with-cpp' warning: mozjpeg-sys@2.2.0: cl : Command line warning D9024 : unrecognized source file type 'vendor/simd/arm/aarch64/jsimd_neon.S', object file assumed warning: mozjpeg-sys@2.2.0: cl : Command line warning D9027 : source file 'vendor/simd/arm/aarch64/jsimd_neon.S' ignored

error: failed to run custom build command for mozjpeg-sys v2.2.0

Caused by: process didn't exit successfully: D:\a\image-compress\image-compress\packages\../target\debug\build\mozjpeg-sys-d00be5408f95ed42\build-script-build (exit code: 1) --- stdout cargo:rerun-if-changed=C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\mozjpeg-sys-2.2.0\vendor cargo:include=D:\a\image-compress\image-compress\packages../target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out\include;C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\mozjpeg-sys-2.2.0\vendor cargo:lib_version=62 cargo:rerun-if-env-changed=SOURCE_DATE_EPOCH OUT_DIR = Some(D:\a\image-compress\image-compress\packages../target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out) TARGET = Some(aarch64-pc-windows-msvc) OPT_LEVEL = Some(0) HOST = Some(x86_64-pc-windows-msvc) cargo:rerun-if-env-changed=VCINSTALLDIR VCINSTALLDIR = None cargo:rerun-if-env-changed=VSCMD_ARG_VCVARS_SPECTRE VSCMD_ARG_VCVARS_SPECTRE = None cargo:rerun-if-env-changed=WindowsSdkDir WindowsSdkDir = None cargo:rerun-if-env-changed=WindowsSDKVersion WindowsSDKVersion = None cargo:rerun-if-env-changed=LIB LIB = None cargo:rerun-if-env-changed=PATH PATH = Some(D:\a\image-compress\image-compress\packages../target\debug\deps;D:\a\image-compress\image-compress\packages../target\debug;C:\Users\runneradmin.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;D:\a\image-compress\image-compress\packages\node_modules.bin;C:\Users\runneradmin\AppData\Local\node\corepack\v1\pnpm\9.6.0\dist\node-gyp-bin;D:\a\image-compress\image-compress\node_modules.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\runneradmin\bin;C:\Program Files\Git\usr\local\cargo\bin;C:\hostedtoolcache\windows\node\20.15.1\x64;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.15.7\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.12\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.7\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.422-5\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\docker-compose;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin.dotnet\tools;C:\Users\runneradmin.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps) cargo:rerun-if-env-changed=INCLUDE INCLUDE = None cargo:rerun-if-env-changed=CC_aarch64-pc-windows-msvc CC_aarch64-pc-windows-msvc = None cargo:rerun-if-env-changed=CC_aarch64_pc_windows_msvc CC_aarch64_pc_windows_msvc = None cargo:rerun-if-env-changed=TARGET_CC TARGET_CC = None cargo:rerun-if-env-changed=CC CC = None cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None CARGO_CFG_TARGET_FEATURE = Some(neon) DEBUG = Some(true) cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc CFLAGS_aarch64-pc-windows-msvc = None cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc CFLAGS_aarch64_pc_windows_msvc = None cargo:rerun-if-env-changed=TARGET_CFLAGS TARGET_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None OUT_DIR = Some(D:\a\image-compress\image-compress\packages../target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out) cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None CARGO_CFG_TARGET_FEATURE = Some(neon) cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc CFLAGS_aarch64-pc-windows-msvc = None cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc CFLAGS_aarch64_pc_windows_msvc = None cargo:rerun-if-env-changed=TARGET_CFLAGS TARGET_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:warning=cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release cargo:warning=cl : Command line warning D9002 : ignoring unknown option '-xassembler-with-cpp' cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'vendor/simd/arm/aarch64/jsimd_neon.S', object file assumed cargo:warning=cl : Command line warning D9027 : source file 'vendor/simd/arm/aarch64/jsimd_neon.S' ignored cl : Command line warning D9021 : no action performed cargo:rerun-if-env-changed=AR_aarch64-pc-windows-msvc AR_aarch64-pc-windows-msvc = None cargo:rerun-if-env-changed=AR_aarch64_pc_windows_msvc AR_aarch64_pc_windows_msvc = None cargo:rerun-if-env-changed=TARGET_AR TARGET_AR = None cargo:rerun-if-env-changed=AR AR = None cargo:rerun-if-env-changed=ARFLAGS_aarch64-pc-windows-msvc ARFLAGS_aarch64-pc-windows-msvc = None cargo:rerun-if-env-changed=ARFLAGS_aarch64_pc_windows_msvc ARFLAGS_aarch64_pc_windows_msvc = None cargo:rerun-if-env-changed=TARGET_ARFLAGS TARGET_ARFLAGS = None cargo:rerun-if-env-changed=ARFLAGS ARFLAGS = None LINK : fatal error LNK1181: cannot open input file 'D:\a\image-compress\image-compress\packages..\target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out\1f8650361932f206-jsimd_neon.o'

--- stderr

error occurred: Command "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\bin\HostX64\arm64\lib.exe" "-out:D:\a\image-compress\image-compress\packages\../target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out\libmozjpegsimd62.a" "-nologo" "D:\a\image-compress\image-compress\packages\../target\aarch64-pc-windows-msvc\debug\build\mozjpeg-sys-c3f7412671d4fbc6\out\1f8650361932f206-jsimd_neon.o" with args lib.exe did not execute successfully (status code exit code: 1181).

warning: build failed, waiting for other jobs to finish... Internal Error: Build failed with exit code 101 at ChildProcess. (file:///D:/a/image-compress/image-compress/nodemodules/.pnpm/@napi-rs+cli@3.0.0-alpha.62@emnapi+runtime@1.2.0/node_modules/@napi-rs/cli/dist/api/build.js:184:28) at Object.onceWrapper (node:events:634:26) at ChildProcess.emit (node:events:531:35) at ChildProcess._handle.onexit (node:internal/child_process:294:12)  ELIFECYCLE  Command failed with exit code 1. Error: Process completed with exit code 1.

kornelski commented 3 months ago

Try 2.2.1. I've disabled SIMD on ARM+MSVC, since the assembly files are for a GNU compiler. It might still work for windows GNU targets.

MiniOcean404 commented 3 months ago

Thank you very much, it works successfully.