Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix build.rs errors on win7 targets #447

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

OmerCheri
Copy link
Contributor

When trying to compile on the x86_64-win7-windows-msvc target, we're getting the following error:
It seems that the missing string "pc" is causing the build script to think we're building for Unix.

warning: blake3@1.4.1: The C compiler "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" does not support -mavx512f and -mavx512vl.
warning: blake3@1.4.1: cl : Command line warning D9002 : ignoring unknown option '-std=c11'
warning: blake3@1.4.1: cl : Command line warning D9024 : unrecognized source file type 'c/blake3_sse2_x86-64_unix.S', object file assumed
warning: blake3@1.4.1: cl : Command line warning D9027 : source file 'c/blake3_sse2_x86-64_unix.S' ignored
CFLAGS = None
running: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" "-nologo" "-MT" "-O1" "-Z7" "-Brepro" "-W4" "-std=c11" "-FoC:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_sse2_x86-64_unix.o" "-c" "c/blake3_sse2_x86-64_unix.S"
cargo:warning=cl : Command line warning D9002 : ignoring unknown option '-std=c11'

cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'c/blake3_sse2_x86-64_unix.S', object file assumed

cargo:warning=cl : Command line warning D9027 : source file 'c/blake3_sse2_x86-64_unix.S' ignored

cl : Command line warning D9021 : no action performed
exit code: 0
running: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" "-nologo" "-MT" "-O1" "-Z7" "-Brepro" "-W4" "-std=c11" "-FoC:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_sse41_x86-64_unix.o" "-c" "c/blake3_sse41_x86-64_unix.S"
cargo:warning=cl : Command line warning D9002 : ignoring unknown option '-std=c11'

cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'c/blake3_sse41_x86-64_unix.S', object file assumed

cargo:warning=cl : Command line warning D9027 : source file 'c/blake3_sse41_x86-64_unix.S' ignored

cl : Command line warning D9021 : no action performed
exit code: 0
running: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" "-nologo" "-MT" "-O1" "-Z7" "-Brepro" "-W4" "-std=c11" "-FoC:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_avx2_x86-64_unix.o" "-c" "c/blake3_avx2_x86-64_unix.S"
cargo:warning=cl : Command line warning D9002 : ignoring unknown option '-std=c11'

cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'c/blake3_avx2_x86-64_unix.S', object file assumed

cargo:warning=cl : Command line warning D9027 : source file 'c/blake3_avx2_x86-64_unix.S' ignored

cl : Command line warning D9021 : no action performed
exit code: 0
cargo:rerun-if-env-changed=AR_x86_64-win7-windows-msvc
AR_x86_64-win7-windows-msvc = None
cargo:rerun-if-env-changed=AR_x86_64_win7_windows_msvc
AR_x86_64_win7_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_x86_64-win7-windows-msvc
ARFLAGS_x86_64-win7-windows-msvc = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_win7_windows_msvc
ARFLAGS_x86_64_win7_windows_msvc = None
cargo:rerun-if-env-changed=TARGET_ARFLAGS
TARGET_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
running: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\lib.exe" "-out:C:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\libblake3_sse2_sse41_avx2_assembly.a" "-nologo" "C:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_sse2_x86-64_unix.o" "C:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_sse41_x86-64_unix.o" "C:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c/blake3_avx2_x86-64_unix.o"
LINK : fatal error LNK1181: cannot open input file 'C:\Users\ContainerAdministrator\AppData\Local\Temp\66ea281f-7371-429e-8787-507757fb1b83\x86_64-win7-windows-msvc\release\build\blake3-15c154c91f03ef71\out\c\blake3_sse2_x86-64_unix.o'
exit code: 1181

--- stderr

@oconnor663
Copy link
Member

Interesting, I'd never noticed that the Windows 7 targets were formatted differently. This seems like a reasonable fix. Looks like it needs an & though, could you fix that?

@OmerCheri
Copy link
Contributor Author

@oconnor663 fixed, thanks for the quick reply BTW.

@oconnor663
Copy link
Member

lgtm!

@oconnor663 oconnor663 merged commit 41b5c02 into BLAKE3-team:master Feb 13, 2025
51 checks passed
@oconnor663
Copy link
Member

Do you need this released sooner rather than later?

@OmerCheri
Copy link
Contributor Author

Yes, I would appriciate if this change is released sooner rather than later.

oconnor663 added a commit that referenced this pull request Feb 17, 2025
Changes since 1.5.5:
- Add Hash::from_slice. (#448)
- Fix a build error on Windows 7 targets. (#447)
oconnor663 added a commit that referenced this pull request Feb 17, 2025
Changes since 1.5.5:
- Add Hash::from_slice. (#448)
- Fix a build error on Windows 7 targets. (#447)
@oconnor663
Copy link
Member

Published as part of v1.6.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants