Opened 4 months ago

Last modified 2 months ago

#65598 assigned defect

clang-devel @20220731 fails to build with clang-11 as bootstrap compiler

Reported by: kencu (Ken) Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: catap (Kirill A. Korinsky)
Port: clang-devel

Description

eg

https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/107817/steps/install-port/logs/stdio

however, on 10.14 at least, it does build through to completion with clang-14.

Just checking to see what the actual floor might be for the build compiler. Probably will just need a shift in fallback compilers to fix some older systems.

There are other errors in older systems due to undefined defines that will likely be fixed by legacysupport I would think.

Change History (8)

comment:1 Changed 4 months ago by kencu (Ken)

clean sweep on 10.14 with clang-14 as the bootstrap compiler:

$ port -v installed | grep devel
  clang-devel @20220731-02b3a358_0+analyzer+libstdcxx (active) requested_variants='' platform='darwin 18' archs='x86_64' date='2022-08-02T10:23:09-0700'
  flang-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 18' archs='x86_64' date='2022-08-02T14:20:13-0700'
  lldb-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 18' archs='x86_64' date='2022-08-02T21:42:30-0700'
  llvm-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 18' archs='x86_64' date='2022-08-02T09:05:25-0700'
  mlir-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 18' archs='x86_64' date='2022-08-02T11:57:09-0700'

comment:2 Changed 4 months ago by kencu (Ken)

clang-13 is good. Trying to bootstrap with clang-12 now.

For systems prior to 10.14, we have this error (at least):

In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-devel/clang-devel/work/llvm-project-02b3a358926e7bbcac9226cbecbfc3067c2ad61b/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_internal_defs.h:15:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-devel/clang-devel/work/llvm-project-02b3a358926e7bbcac9226cbecbfc3067c2ad61b/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_platform.h:93:7: error: 'TARGET_OS_DRIVERKIT' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
#  if TARGET_OS_DRIVERKIT
      ^

and that one is best handled by adding it to legacysupport and making sure legacysupport is used when building on 10.13.

comment:4 Changed 4 months ago by kencu (Ken)

clang-12 fails, so clang-13 is the floor.

Which goes along with what llvm/clang/libcxx announced last year, that they would verify to build only with the last two compiler versions released.

comment:5 Changed 4 months ago by kencu (Ken)

with some minor modifications to legacysupport, builds on 10.13 to:

$ port -v installed | grep devel
  clang-devel @20220731-02b3a358_0+analyzer+libstdcxx (active) requested_variants='' platform='darwin 17' archs='x86_64' date='2022-08-04T10:07:11-0700'
  flang-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 17' archs='x86_64' date='2022-08-04T14:54:48-0700'
  lldb-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 17' archs='x86_64' date='2022-08-04T23:16:35-0700'
  llvm-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 17' archs='x86_64' date='2022-08-04T08:16:50-0700'
  mlir-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 17' archs='x86_64' date='2022-08-04T12:24:11-0700'

comment:6 Changed 4 months ago by kencu (Ken)

10.12 looks OK too, but lldb-devel won't build there (easily):

$ port -v installed | grep devel
  clang-devel @20220731-02b3a358_0+analyzer+libstdcxx (active) requested_variants='' platform='darwin 16' archs='x86_64' date='2022-08-05T19:41:17-0700'
  flang-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 16' archs='x86_64' date='2022-08-06T01:12:34-0700'
  legacy-support-devel @20220805_0 (active) requested_variants='' platform='darwin 16' archs='x86_64' date='2022-08-05T18:02:43-0700'
  llvm-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 16' archs='x86_64' date='2022-08-05T18:07:48-0700'
  mlir-devel @20220731-02b3a358_0 (active) requested_variants='' platform='darwin 16' archs='x86_64' date='2022-08-05T22:14:06-0700'

it requires the (minor) new changes to legacy-support, so a new release of that would be needed before pushing the llvm-devel update.

comment:7 Changed 3 months ago by kencu (Ken)

Cc: catap added

catap adding you so you can see all the fixes and work done already here.

comment:8 Changed 2 months ago by Ken <21211439+kencu@…>

In da7610fe261238f7252ebe1c2b983400fb8fd674/macports-ports (master):

clang-15: needs newer fallback compilers

see: #65598

Note: See TracTickets for help on using tickets.