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

scrooge_scala_library action: mapped_file_unix.cc is used on Windows instead of mapped_file_windows.cc #1443

Open
crazyjat opened this issue Nov 7, 2022 · 5 comments

Comments

@crazyjat
Copy link

crazyjat commented Nov 7, 2022

I get the following error when doing a very simple thrift to scala conversion on Windows 11 using Bazel.

load("@io_bazel_rules_scala//thrift:thrift.bzl", "thrift_library")
load("@io_bazel_rules_scala//twitter_scrooge:twitter_scrooge.bzl", "scrooge_scala_library")

thrift_library(
    name = "thrift",
    srcs = ["src/main/thrift/service.thrift"],
)

scrooge_scala_library(
    name = "scrooge",
    visibility = ["//visibility:public"],
    deps = [":thrift"],
    
)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /Iexternal/io_bazel_rules_scala /Ibazel-out/x64_windows-opt-exec-2B5CBBC6/bin/external/io_bazel_rules_scala /Iexternal/io_bazel_rules_scala/third_party/java_tools/zlib /Ibazel-out/x64_windows-opt-exec-2B5CBBC6/bin/external/io_bazel_rules_scala/third_party/java_tools/zlib /DBLAZE_OPENSOURCE /showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" /Gy /Gw /Fobazel-out/x64_windows-opt-exec-2B5CBBC6/bin/external/io_bazel_rules_scala/third_party/java_tools/ijar/_objs/zip/mapped_file_unix.obj /c external/io_bazel_rules_scala/third_party/java_tools/ijar/mapped_file_unix.cc
# Configuration: 55c4fcb618a586250024768c71735afe314543d708df4f56da250242043cfbc2
# Execution platform: @local_config_platform//:host
external/io_bazel_rules_scala/third_party/java_tools/ijar/mapped_file_unix.cc(18): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
@crazyjat
Copy link
Author

crazyjat commented Nov 8, 2022

I have found that the above example fails to compile on Windows and have found no work around.

@crazyjat
Copy link
Author

crazyjat commented Nov 8, 2022

Another example error:

external/io_bazel_rules_scala/third_party/java_tools/src/main/cpp/util/file_posix.cc(17): fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory

@simuons
Copy link
Collaborator

simuons commented Nov 9, 2022

Hi @crazyjat I'm sorry to say that but windows isn't really supported. We are targeting linux and mac at the moment. For windows support we would accept contributions.

@crazyjat
Copy link
Author

crazyjat commented Nov 9, 2022

How incredibly frustrating that you don’t support the most widely used operating system in the world. This is my biggest problem with bazel so far, shitty support.

@crt-31
Copy link
Contributor

crt-31 commented May 11, 2023

@crazyjat, I was looking at this... is it still an issue for you? If so, what version of rules_scala and bazel are you using? And what's in your thrift file?

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

No branches or pull requests

3 participants