Skip to content

rules_foreign_cc 0.15.1 error #1455

@MiyamuraMiyako

Description

@MiyamuraMiyako

When replace
bazel_dep(name = "rules_foreign_cc", version = "0.14.0")
to
bazel_dep(name = "rules_foreign_cc", version = "0.15.1"), will produce below error:

rules_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____

Bazel external C/C++ Rules. Building library 'pkgconfig_tool_msvc_build_'

Environment:______________
BUILD_SCRIPT=bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build__foreign_cc/build_script.sh
EXT_BUILD_ROOT=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main
BUILD_LOG=bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build__foreign_cc/Make.log
PWD=/c/users/ur/_bazel_ur/ft3oqy7j/execroot/_main
VSLANG=1033
MSYS_NO_PATHCONV=1
HOME=/home/ur
BUILD_WRAPPER_SCRIPT=bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build__foreign_cc/wrapper_build_script.sh
EXT_BUILD_DEPS=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build_.ext_build_deps
SYSTEMROOT=C:\WINDOWS
TERM=xterm-256color
TEMP=C:\Users\ur\AppData\Local\Temp
BUILD_TMPDIR=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build_.build_tmpdir
INCLUDE=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_src;C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\include;C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
SHLVL=2
RUNFILES_MANIFEST_ONLY=1
MSYS2_ARG_CONV_EXCL=*
INSTALLDIR=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/bazel-out/x64_windows-opt-exec-ST-9a407f9186b5/bin/external/rules_foreign_cc+/toolchains/private/pkgconfig_tool_msvc_build_
TMP=C:\Users\ur\AppData\Local\Temp
PATH=/C/users/ur/_bazel_ur/ft3oqy7j/execroot/_main:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64:/usr/bin:/bin:/c/WINDOWS:/c/WINDOWS/System32:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files/Microsoft/jdk-11.0.16.101-hotspot/bin:/c/Program Files/Microsoft/jdk-17.0.4.101-hotspot/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files/Microsoft SQL Server/150/Tools/Binn:/d/dapr/paddle/swigwin-4.1.1:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files/Process Lasso:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program Files (x86)/gs/gs10.00.0/bin:/c/Program Files/gs/gs10.00.0/bin:/c/Program Files/Go/bin:/c/code/depot_tools:/c/FPC/3.2.2/bin/i386-Win32:/c/Program Files/nodejs:/c/Program Files/WireGuard:/c/Program Files/Git/cmd:/c/Program Files/CMake/bin:/c/Program Files/Meson:/c/Program Files/Microsoft SQL Server/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files/dotnet:/c/Users/ur/AppData/Local/Programs/Python/Python312/Scripts:/c/Users/ur/AppData/Local/Programs/Python/Python312:/c/Users/ur/AppData/Local/Programs/Python/Python310/Scripts:/c/Users/ur/AppData/Local/Programs/Python/Python310:/c/Users/ur/AppData/Local/Programs/Python/Python311/Scripts:/c/Users/ur/AppData/Local/Programs/Python/Python311:/c/Users/ur/AppData/Local/Microsoft/WindowsApps:/c/Users/ur/.dotnet/tools:/c/Users/ur/AppData/Local/Programs/Fiddler:/c/Users/ur/.dotnet/tools:/c/Users/ur/go/bin:/d/D/Go/energy/upx:/d/D/Go/energy/7za:/c/Users/ur/AppData/Roaming/npm:/c/Program Files/OpenSSL-Win64/bin:/d/D/C/bazel:/c/Users/ur/AppData/Local/Microsoft/WindowsApps:/c/Users/ur/AppData/Local/Programs/Ollama:/c/Users/ur/AppData/Local/Programs/Microsoft VS Code/bin:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/VC/VCPackages:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/C/Program Files/Microsoft Visual Studio/18/Insiders/MSBuild/Current/bin/Roslyn:/C/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools:/C/Program Files/Microsoft Visual Studio/18/Insiders/Team Tools/DiagnosticsHub/Collector:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console:/C/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0//x64:/C/Program Files (x86)/Windows Kits/10/bin//x64:/C/Program Files/Microsoft Visual Studio/18/Insiders//MSBuild/Current/Bin/amd64:/C/Windows/Microsoft.NET/Framework64/v4.0.30319:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/Tools/:/:/C/WINDOWS/system32:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/VC/Linux/bin/ConnectionManagerExe:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/vcpkg:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/VC/VCPackages:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/C/Program Files/Microsoft Visual Studio/18/Insiders/MSBuild/Current/bin/Roslyn:/C/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools:/C/Program Files/Microsoft Visual Studio/18/Insiders/Team Tools/DiagnosticsHub/Collector:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console:/C/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0//x64:/C/Program Files (x86)/Windows Kits/10/bin//x64:/C/Program Files/Microsoft Visual Studio/18/Insiders//MSBuild/Current/Bin/amd64:/C/Windows/Microsoft.NET/Framework64/v4.0.30319:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/Tools/:/:/C/WINDOWS/system32:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja:/C/Program Files/Microsoft Visual Studio/18/Insiders/Common7/IDE/VC/Linux/bin/ConnectionManagerExe:/C/Program Files/Microsoft Visual Studio/18/Insiders/VC/vcpkg
WINDIR=C:\WINDOWS
LIB=C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\18\Insiders\VC\Tools\MSVC\14.50.35717\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\um\x64
SYSTEMDRIVE=C:
_=/usr/bin/env
__________________________
Can not copy C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/nmake.exe
+ ARFLAGS='-nologo -MACHINE:X64 -ignore:4221'
+ AR_FLAGS='-nologo -MACHINE:X64 -ignore:4221'
+ ASFLAGS='-nologo -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -bigobj -Zm500 -EHsc -wd4351 -wd4291 -wd4250 -wd4996 -D_WIN32_WINNT=0x0601'
+ CFLAGS='-nologo -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -bigobj -Zm500 -EHsc -wd4351 -wd4291 -wd4250 -wd4996 -D_WIN32_WINNT=0x0601 -showIncludes -MD -O2 -Oy- -DNDEBUG -wd4117 -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -Gy -Gw -Zc:inline'
+ CXXFLAGS='-nologo -std:c++17 -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -bigobj -Zm500 -EHsc -wd4351 -wd4291 -wd4250 -wd4996 -D_WIN32_WINNT=0x0601 -showIncludes -MD -O2 -Oy- -DNDEBUG -wd4117 -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -Gy -Gw -Zc:inline'
+ LDFLAGS='-nologo -SUBSYSTEM:CONSOLE -MACHINE:X64 -DEFAULTLIB:msvcrt.lib -OPT:ICF -OPT:REF -LIBPATH:C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_runtime/bin -LIBPATH:C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+gettext_runtime/bin'
+ AR='"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/lib.exe"'
+ CC='"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/cl.exe"'
+ CXX='"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/cl.exe"'
+ LD='"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/link.exe"'
+ RANLIB=:
+ CPPFLAGS='-IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_dev/include/glib-2.0/gio -IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_dev/include/glib-2.0 -IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_dev/include/glib-2.0/glib -IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_dev/include/glib-2.0/gobject -IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/rules_foreign_cc++tools+glib_src'
+ nmake.exe -f Makefile.vc CFG=release GLIB_PREFIX=C:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_dev PREFIX=INSTALLDIR115

Microsoft (R) Program Maintenance Utility Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

已复制         1 个文件。
	"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/cl.exe" /MD /O2 /GL /W3 /Zi /FImsvc_recommended_pragmas.h /I.		 /IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_dev\include\glib-2.0					 /IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_dev\lib\glib-2.0\include				 /DHAVE_CONFIG_H				 /DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"\""	 /DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"\"" /Forelease\x64\pkg-config\ /c @C:\Users\ur\AppData\Local\Temp\nm10A9.tmp
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl .\pkg.c .\parse.c .\rpmvercmp.c .\main.c 

pkg.c
.\pkg.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directory
parse.c
.\parse.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directory
rpmvercmp.c
.\rpmvercmp.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directory
main.c
.\main.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directory
NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual Studio/18/Insiders/VC/Tools/MSVC/14.50.35717/bin/HostX64/x64/cl.exe" /MD /O2 /GL /W3 /Zi /FImsvc_recommended_pragmas.h /I.		 /IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_dev\include\glib-2.0					 /IC:/users/ur/_bazel_ur/ft3oqy7j/execroot/_main/external/glib_dev\lib\glib-2.0\include				 /DHAVE_CONFIG_H				 /DPKG_CONFIG_SYSTEM_INCLUDE_PATH="\"\""	 /DPKG_CONFIG_SYSTEM_LIBRARY_PATH="\"\"" /Forelease\x64\pkg-config\ /c @C:\Users\ur\AppData\Local\Temp\nm10A9.tmp' : return code '0x2'
Stop.
_____ END BUILD LOGS _____

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions