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

Windows: bootstrapping broken with Bazel 0.6.0 #3863

Closed
laszlocsomor opened this issue Oct 5, 2017 · 8 comments
Closed

Windows: bootstrapping broken with Bazel 0.6.0 #3863

laszlocsomor opened this issue Oct 5, 2017 · 8 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) platform: windows

Comments

@laszlocsomor
Copy link
Contributor

Boostrapping from the 0.6.0 dist archive is broken on Windows, because //src/main/native:jni.h is a generated file, included from //src/main/native/windows/*, but not part of the dist archive.

laszlocsomor@laszlocsomor0-w MSYS /c/tempdir/bazel-0.6.0-bootstrap
$ ./compile.sh
🍃  Building Bazel from scratch......**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

file-jni.cc
C:\tempdir\bazel-0.6.0-bootstrap\src\main\native\windows\file-jni.cc(24): fatal error C1083: Cannot open include file: 'src/main/native/jni.h': No such file or directory
file.cc
jni-util.cc
.\src/main/native/windows/jni-util.h(19): fatal error C1083: Cannot open include file: 'src/main/native/jni.h': No such file or directory
processes-jni.cc
C:\tempdir\bazel-0.6.0-bootstrap\src\main\native\windows\processes-jni.cc(25): fatal error C1083: Cannot open include file: 'src/main/native/jni.h': No such file or directory
util.cc
Generating Code...
@laszlocsomor
Copy link
Contributor Author

/cc @dslomov @meteorcloudy @damienmg

@laszlocsomor
Copy link
Contributor Author

laszlocsomor commented Oct 5, 2017

I'm wondering why we didn't see this on CI.

@laszlocsomor
Copy link
Contributor Author

laszlocsomor commented Oct 5, 2017

src/main/native/windows/build_windows_jni.sh is supposed to mimic the //src/main/native:jni.h genrule:

# Mimic genrule //src/main/native:copy_link_jni_md_header and //src/main/native:copy_link_jni_header
JNI_HEADERS_DIR="${VSTEMP}/src/main/native"
mkdir -p "$JNI_HEADERS_DIR"
cp -f "$JAVAINCLUDES/jni.h" "$JNI_HEADERS_DIR/"
cp -f "$JAVAINCLUDES/win32/jni_md.h" "$JNI_HEADERS_DIR/"
.

The culprit is that VSTEMP is an MSYS path under /tmp, so cl.exe in windows_jni.bat cannot use it:

@CL /O2 /EHsc /LD /Fe:"$(cygpath -a -w ${DLL})" /I "${VSTEMP}" /I . ${WINDOWS_SOURCES[*]}

@damienmg
Copy link
Contributor

damienmg commented Oct 5, 2017

Humm should we do another patch release?

Is the bootstrap test running on windows? I remember we had to turn it down waiting for a release but maybe we forgot to readd it.

@damienmg
Copy link
Contributor

damienmg commented Oct 5, 2017

/cc @jcater

@katre
Copy link
Member

katre commented Oct 5, 2017

Do we know what the fix for this is? If it's still under investigation, I'd like to release 0.6.1 to improve mac users' experience, and then we can do 0.6.2 with the fix for this when we have it.

@laszlocsomor
Copy link
Contributor Author

I'm working on a fix. There are multiple problems, I already fixed two, there's at least one more.

@laszlocsomor
Copy link
Contributor Author

aehlig pushed a commit that referenced this issue Oct 9, 2017
Also:
- check as the first thing in compile.sh that we
  can locate the GNU coreutils, and remove the
  duplicate check for the same thing on Windows
- check early in compile.sh that we can access
  python.exe

Fixes #3863

Change-Id: Ib48b405cf93eafd48e21b280bcbab4d45117c1d9
PiperOrigin-RevId: 171291435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) platform: windows
Projects
None yet
Development

No branches or pull requests

3 participants