swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-8925] error when building libdispatch: unsupported compiler
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-8925 |
| Radar | None |
| Original Reporter | @kevints |
| Type | Bug |
Environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
$ clang --version
Ubuntu clang version 3.6.0-2ubuntu1~trusty2 (tags/RELEASE_360/final) (based on LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
Additional Detail from JIRA
| Votes | 0 |
| Component/s | libdispatch |
| Labels | Bug, CMake, Linux |
| Assignee | None |
| Priority | Medium |
md5: cdb05afb8862e6d925dbe1649eb809c7
Issue Description:
On Ubuntu 14.04 the host compiler recommended to build swift can't build libdispatch. This results in the error below. Presumably we were using the freshly-built toolchain compiler to build dispatch before.
FAILED: /usr/bin/clang -DDISPATCH_USE_DTRACE=0 -DHAVE_CONFIG_H -D_GNU_SOURCE=1 -Ddispatch_EXPORTS -isystem /code/swift-corelibs-libdispatch/src/BlocksRuntime -I. -I/code/swift-corelibs-libdispatch -I/code/swift-corelibs-libdispatch/src -Isrc -I/code/swift-corelibs-libdispatch/private -fPIC -fvisibility=hidden -Werror -Wall -Wextra -Warray-bounds-pointer-arithmetic -Wassign-enum -Watomic-properties -Wcomma -Wconditional-uninitialized -Wconversion -Wcovered-switch-default -Wdate-time -Wdeprecated -Wdocumentation -Wdouble-promotion -Wduplicate-enum -Wexpansion-to-defined -Wfloat-equal -Widiomatic-parentheses -Winfinite-recursion -Wmissing-prototypes -Wnewline-eof -Wnullable-to-nonnull-conversion -Wobjc-interface-ivars -Wover-aligned -Wpacked -Wpointer-arith -Wselector -Wshadow -Wshorten-64-to-32 -Wsign-conversion -Wstatic-in-inline -Wsuper-class-method-mismatch -Wswitch-enum -Wunguarded-availability -Wunreachable-code -Wunused -Wno-unknown-warning-option -Wno-trigraphs -Wno-four-char-constants -Wno-disabled-macro-expansion -Wno-pedantic -Wno-bad-function-cast -Wno-c++-compat -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-cast-align -Wno-cast-qual -Wno-documentation-unknown-command -Wno-format-nonliteral -Wno-missing-variable-declarations -Wno-old-style-cast -Wno-padded -Wno-reserved-id-macro -Wno-shift-sign-overflow -Wno-undef -Wno-unreachable-code-aggressive -Wno-unused-macros -Wno-used-but-marked-unused -Wno-vla -Wno-error=assign-enum -fno-exceptions -isystem /usr/include/bsd -DLIBBSD_OVERLAY -fblocks -momit-leaf-frame-pointer -pthread -std=gnu11 -MMD -MT src/CMakeFiles/dispatch.dir/init.c.o -MF src/CMakeFiles/dispatch.dir/init.c.o.d -o src/CMakeFiles/dispatch.dir/init.c.o -c /code/swift-corelibs-libdispatch/src/init.c
In file included from /code/swift-corelibs-libdispatch/src/init.c:26:
In file included from /code/swift-corelibs-libdispatch/src/internal.h:646:
/code/swift-corelibs-libdispatch/src/shims.h:241:2: error: unsupported compiler
#error unsupported compiler
^
1 error generated.
ninja: build stopped: subcommand failed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/shims.h around line 241, where the unsupported compiler error is emitted, and trace the compiler check from the failing build command through src/init.c and src/internal.h. Reproduce the libdispatch build with Ubuntu 14.04 and clang 3.6; done means the project builds successfully with that environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, linux, ubuntu
- Domain
- build-system, compilers, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100