Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

build error on windows: xargs: command not found #8

Open
romanholidaypancakes opened this issue Mar 26, 2023 · 3 comments
Open

build error on windows: xargs: command not found #8

romanholidaypancakes opened this issue Mar 26, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@romanholidaypancakes
Copy link

bazel build -c opt //vxsig:vxsig
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository com_google_binexport instantiated at:
  D:/test/vxsig/WORKSPACE:50:13: in <toplevel>
Repository rule http_archive defined at:
  C:/users/user123456/_bazel_admin/4uuzjk7y/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
ERROR: An error occurred during the fetch of repository 'com_google_binexport':
   Traceback (most recent call last):
        File "C:/users/user123456/_bazel_admin/4uuzjk7y/external/bazel_tools/tools/build_defs/repo/http.bzl", line 143, column 10, in _http_archive_impl
                patch(ctx, auth = auth)
        File "C:/users/user123456/_bazel_admin/4uuzjk7y/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 193, column 21, in patch
                fail("Error applying patch command %s:\n%s%s" %
Error in fail: Error applying patch command find . -path ./third_party -prune -o \( -name '*.cc' -o -name '*.h' \) -print0 |xargs -0 -P8 -n1 sed -i.bak 's,^\(#include "\)third_party/\(absl\),\1\2,g':
FIND: ������ʽ����ȷ
/usr/bin/bash: line 1: xargs: command not found
ERROR: D:/test/vxsig/WORKSPACE:50:13: fetching http_archive rule //external:com_google_binexport: Traceback (most recent call last):
        File "C:/users/user123456/_bazel_admin/4uuzjk7y/external/bazel_tools/tools/build_defs/repo/http.bzl", line 143, column 10, in _http_archive_impl
                patch(ctx, auth = auth)
        File "C:/users/user123456/_bazel_admin/4uuzjk7y/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 193, column 21, in patch
                fail("Error applying patch command %s:\n%s%s" %
Error in fail: Error applying patch command find . -path ./third_party -prune -o \( -name '*.cc' -o -name '*.h' \) -print0 |xargs -0 -P8 -n1 sed -i.bak 's,^\(#include "\)third_party/\(absl\),\1\2,g':
FIND: ������ʽ����ȷ
/usr/bin/bash: line 1: xargs: command not found
ERROR: D:/test/vxsig/vxsig/BUILD.bazel:438:10: //vxsig:vxsig depends on @com_google_binexport//:filesystem in repository @com_google_binexport which failed to fetch. no such package '@com_google_binexport//': Error applying patch command find . -path ./third_party -prune -o \( -name '*.cc' -o -name '*.h' \) -print0 |xargs -0 -P8 -n1 sed -i.bak 's,^\(#include "\)third_party/\(absl\),\1\2,g':
FIND: ������ʽ����ȷ
/usr/bin/bash: line 1: xargs: command not found
ERROR: Analysis of target '//vxsig:vxsig' failed; build aborted: Analysis failed
INFO: Elapsed time: 35.611s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (37 packages loaded, 124 targets configured)
@cblichmann
Copy link
Member

Hi there!
Thanks for the report. I should've included a section on supported OSes in the README. While the code does work on Windows when built with a manually created Visual Studio project, I never updated the Bazel build files for VxSig for that.
You could try and replace the patch commands in the WORKSPACE file with something more appropriate on Windows (a Powershell script maybe?). I'm not yet sure how to fix this and not break the Linux build.

@cblichmann cblichmann added the enhancement New feature or request label Mar 27, 2023
@romanholidaypancakes
Copy link
Author

maybe it is more appropriate to provide vs project files in windows

cblichmann added a commit that referenced this issue Feb 13, 2024
@cblichmann
Copy link
Member

Bummer, still no compilation on Windows, because the protobuf Bazel build is broken in 23.1:

ERROR: C:/users/win11-devel/_bazel_win11-devel/lnjrh73z/external/protobuf~23.1/src/google/protobuf/compiler/csharp/BUILD.bazel:22:11: Compiling src/google/protobuf/compiler/csharp/csharp_enum.cc [for tool] failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target @@protobuf~23.1//src/google/protobuf/compiler/csharp:csharp) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\cl.exe ... (remaining 1 argument skipped)
bazel-out/x64_windows-opt-exec-ST-13d3ddad9198/bin/external/protobuf~23.1/src/google/protobuf/compiler/csharp/_virtual_includes/csharp\google/protobuf/compiler/csharp/csharp_enum.h(37): fatal error C1083: Cannot open include file: 'google/protobuf/compiler/csharp/csharp_source_generator_base.h': No such file or directory
Target //vxsig:vxsig failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 176.753s, Critical Path: 17.42s
INFO: 203 processes: 6 internal, 197 local.
ERROR: Build did NOT complete successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants