asdf-vm / asdf-vm/asdf-ruby

Can't compile 3.1.2 on macos 13.4 (x86) due to errors in ephemeral C source/header files

Open
#353 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
734
Forks
156
Avg merge
17h 6m
Merged PRs (30d)
1

Description

I get this error:

```
building .ext/include/x86_64-darwin22/rb_mjit_min_header-3.1.2.h
error in initial header file:
/usr/local/bin/clang -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -std=gnu99 -pipe -w -S -DMJIT_HEADER -fsyntax-only -Werror=implicit-function-declaration -Werror=implicit-int -Wfatal-errors /var/folders/0c/pvfdpxnj57j770_yh56rhgf40000gn/T/20230615-97060-ey5nmg.c
In file included from /var/folders/0c/pvfdpxnj57j770_yh56rhgf40000gn/T/20230615-97060-ey5nmg.c:1:
/var/folders/0c/pvfdpxnj57j770_yh56rhgf40000gn/T/20230615-97060-gipa4a.h:4:1: fatal error: expected identifier or '('
```

But the 20230615-97060-ey5nmg.c and 20230615-97060-gipa4a.h files (whose names change on every build) are no longer there after the build fails, so I have no idea what's wrong with them, or even where they come from.

But I do see that there is an `rb_mjit_header.h` file, and for some reason its first line looks like `make` output instead of C code:

```
/usr/local/bin/clang -E -DMJIT_HEADER -P -dD -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -std=gnu99 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -I. -I.ext/include/x86_64-darwin22 -I./include -I. -I./enc/unicode/13.0.0 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT ./vm.c
#define __llvm__ 1
#define __clang__ 1
#define __clang_major__ 14
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.