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

Homebrew recipe cannot build bazel 0.2.2. #1177

Closed
damienmg opened this issue Apr 22, 2016 · 5 comments
Closed

Homebrew recipe cannot build bazel 0.2.2. #1177

damienmg opened this issue Apr 22, 2016 · 5 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) type: bug
Milestone

Comments

@damienmg
Copy link
Contributor

A bugfix was missing on C++ auto-configuration so I created a patch release 0.2.2b but it still fails with:

(cd /var/folders/00/22p3h000h01000cxqpysvccm008_rf/T/bazel.6Y6kHBko/out/bazel20160422-61745-1emlgk4 &&   exec env -     PATH=/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/bin:/usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin     TMPDIR=/var/folders/00/22p3h000h01000cxqpysvccm008_rf/T/   external/local_config_cc/osx_cc_wrapper.sh --env=std -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.o' -MD -MF bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.d -fPIC --env=std -c src/main/cpp/blaze_abrupt_exit.cc -o bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.o)
clang: The build tool has reset ENV; --env=std required.
@damienmg damienmg added type: bug P0 This is an emergency and more important than other current work. (Assignee required) category: release / binary labels Apr 22, 2016
@damienmg damienmg self-assigned this Apr 22, 2016
@damienmg
Copy link
Contributor Author

Ok so I have a formula that build a slightly different version of Bazel 0.2.2b rc1. The change is being pushed currently so I will be able to emit a new rc for 0.2.2b tonight.

@damienmg damienmg reopened this Apr 22, 2016
@damienmg
Copy link
Contributor Author

./scripts/release/release.sh create 0.2.2b 759bbfe 1250fda ba8700e 386f242 97e5ab0 a20352e 0b26f44 3e4e416 aa3dbd3 810d60a

damienmg added a commit that referenced this issue Apr 22, 2016
On some target platform gcc invokes external tools during compilation, see #1152. Also support absolute path when looking for gcc.

This needs to be cherry-picked to fix #1177.

--
MOS_MIGRATED_REVID=120581887
@damienmg
Copy link
Contributor Author

Ok now preparing the homebrew change.

@damienmg damienmg added this to the 0.3 milestone Apr 28, 2016
bazel-io pushed a commit that referenced this issue May 4, 2016
Use a wrapper script on all platform to ship the environment to
the C++ compiler. This should enable building with Homebrew special
setup and will likely reduce the number of hard corner cases to
solve.

Should unblock #1177.

--
Change-Id: I36f09edaf131f65c730bdd626ce521478ff587c7
Reviewed-on: https://bazel-review.googlesource.com/3560
MOS_MIGRATED_REVID=121462120
bazel-io pushed a commit that referenced this issue May 4, 2016
*** Reason for rollback ***

Broke ci.bazel.io

See #1231.

*** Original change description ***


Ship the environment fixed at configure time to the C++ compiler

Use a wrapper script on all platform to ship the environment to
the C++ compiler. This should enable building with Homebrew special
setup and will likely reduce the number of hard corner cases to
solve.

Should unblock #1177.

--
MOS_MIGRATED_REVID=121468271
bazel-io pushed a commit that referenced this issue May 4, 2016
*** Reason for rollback ***

Rollforward with fixes:
  - Quote single-quote in the environment exports
  - Exclude the following environment variables: _ and dotted names
  - Add the wrapper to the dependency of the crosstool chain so it gets shipped to the sandbox.

Hopefully after that we can cut a new release and have a homebrew package again #1177.

*** Original change description ***

Automated [] rollback of commit f1f24fc.

*** Reason for rollback ***

Broke ci.bazel.io

See #1231.

*** Original change description ***


Ship the environment fixed at configure time to the C++ compiler

Use a wrapper script on all platform to ship the environment to
the C++ compiler. This should enable building with Homebrew special
setup and will likely reduce the number of hard corner cases to
solve.

Should...

***

--
MOS_MIGRATED_REVID=121497195
@damienmg damienmg added P1 I'll work on this now. (Assignee required) and removed P0 This is an emergency and more important than other current work. (Assignee required) Release blocker labels May 6, 2016
@damienmg
Copy link
Contributor Author

damienmg commented May 6, 2016

87a5858 fixed incompatibilities with Homebrew, this bug will be closed when pushing the next release.

bazel-io pushed a commit that referenced this issue May 6, 2016
*** Reason for rollback ***

The sandbox fix did not fix. More work is needed.

Fixes #1239

*** Original change description ***

Automated [] rollback of commit b4549fe.

*** Reason for rollback ***

Rollforward with fixes:
  - Quote single-quote in the environment exports
  - Exclude the following environment variables: _ and dotted names
  - Add the wrapper to the dependency of the crosstool chain so it gets shipped to the sandbox.

Hopefully after that we can cut a new release and have a homebrew package again #1177.

*** Original change description ***

Automated [] rollback of commit f1f24fc.

*** Reason...

***

--
MOS_MIGRATED_REVID=121665313
@damienmg
Copy link
Contributor Author

This is fixed, next release will be in homebrew \o/

mzeren-vmw added a commit to mzeren-vmw/bazel that referenced this issue Oct 11, 2018
- Putting -B/usr/bin on the link line breaks use of custom C/C++
  toolchain since support binaries such as ld, as, etc., will
  incorrectly "leak" to the build machine.

- Fixes issue bazelbuild#5634

It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

And that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

Also this may have "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done: local build of envoy on older host using non-host
crosscompiler. Build fails without the fix and succeeds with the fix.
mzeren-vmw added a commit to mzeren-vmw/bazel that referenced this issue Oct 11, 2018
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes issue bazelbuild#5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

This may have also "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
mzeren-vmw added a commit to mzeren-vmw/bazel that referenced this issue Oct 11, 2018
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes bazelbuild#5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

This may have also "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
mzeren-vmw added a commit to mzeren-vmw/bazel that referenced this issue Oct 11, 2018
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes bazelbuild#5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

This may have also "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
mzeren-vmw added a commit to mzeren-vmw/bazel that referenced this issue Oct 11, 2018
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes bazelbuild#5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

This may have also "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
bazel-io pushed a commit that referenced this issue Oct 16, 2018
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes #5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. #1152.

This may have also "fixed" the hombrew builds for
#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test

Closes #6360.

PiperOrigin-RevId: 217338797
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) type: bug
Projects
None yet
Development

No branches or pull requests

1 participant