Opened 2 years ago

Last modified 21 months ago

#64155 assigned defect

bazel: builds failing for macOS 10.12 through 10.15

Reported by: mascguy (Christopher Nielsen) Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: cjones051073 (Chris Jones)
Port: bazel

Description

This port has been failing to build on 10.12 through 10.15, since May 2021.

The latest failures are the following:

ERROR: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_bazel/bazel/work/bazel-4.2.2-dist/third_party/zlib/BUILD:25:19: Compiling third_party/zlib/inffast.c failed: undeclared inclusion(s) in rule '//third_party/zlib:zlib_checked_in':
this rule is missing dependency declarations for the following files included by 'third_party/zlib/inffast.c':
  '/opt/local/libexec/llvm-13/lib/clang/13.0.0/include/stddef.h'
  '/opt/local/libexec/llvm-13/lib/clang/13.0.0/include/__stddef_max_align_t.h'
  '/opt/local/libexec/llvm-13/lib/clang/13.0.0/include/limits.h'
  '/opt/local/libexec/llvm-13/lib/clang/13.0.0/include/stdarg.h'
  '/opt/local/libexec/llvm-13/lib/clang/13.0.0/include/stdint.h'

https://ports.macports.org/port/bazel/builds/

Change History (8)

comment:1 Changed 2 years ago by cjones051073 (Chris Jones)

Yeah, I am aware. Unfortunately I no longer have access to < macOS12 at the moment, so was just hoping this update might just help...

bazel is a painful build to work on, but if anyone with these older OSes wants to look please do ?

note though, any port using bazel uses one of the older pinned version ports, so this isn't affecting other builds yet.

comment:2 in reply to:  1 Changed 2 years ago by mascguy (Christopher Nielsen)

Replying to cjones051073:

Yeah, I am aware. Unfortunately I no longer have access to < macOS12 at the moment, so was just hoping this update might just help...

I'm happy to help, but will need some hints/direction as to what might need to change. Thoughts?

comment:3 Changed 2 years ago by cjones051073 (Chris Jones)

Getting the bazel build to use a non-Xcode compiler has always been a huge headache. Honestly, I have seen these sorts of errors before but don't really have good suggestions as to exactly what needs to be done to help. The place to start is where in the Portfiles it detects its using macports clang, and attempts to use the BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 option...

comment:4 Changed 2 years ago by cjones051073 (Chris Jones)

Actually, now I look again I recall that path isn't used as it didn't work last time I tried...

bazel internally builds (yes, builds, its c++) its own wrapper around the compiler used. So to get it to use a macports compiler I had to patch this. see

https://github.com/macports/macports-ports/blob/f724e39a14363cc10482135c2410310f2644b07d/devel/bazel/Portfile#L259

as perhaps a better place to start.

but, I warn you again, this is really a rabbit hole of Alice in Wonderland proportions...

comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: cjones051073 added
Owner: changed from cjones051073 to mascguy

comment:6 Changed 22 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Owner: changed from mascguy to essandess

Reassigning to Steve, since he's working on fixing bazel per PR:

15397 - py-tensorflow, bazel: Bugfixes and Updates

comment:7 Changed 22 months ago by essandess (Steve Smith)

I don't have access to any of these older macOS versions, am skeptical that upstream even support such builds (see https://trac.macports.org/ticket/64442#comment:9, https://lists.macports.org/pipermail/macports-dev/2022-July/044443.html), and do not have any time resources to support this issue.

I suggest adding this known failure to the Portfile and moving on.

comment:8 Changed 21 months ago by mascguy (Christopher Nielsen)

Cc: mascguy removed
Note: See TracTickets for help on using tickets.