bytecodealliance / bytecodealliance/spidermonkey-wasi-embedding

Compilation Error: offset of on non-standard layout type

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
11
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I'm trying to compile a simple example using the pre-built code, but I'm stumbling over a compilation error.

Environment:
`wasi-sdk 12.0`
CXX and LD flags are taken directly from the [Fastly runtime Makefile](https://github.com/fastly/js-compute-runtime/blob/main/c-dependencies/js-compute-runtime/Makefile#L16).

```
/host/spidermonkey/include/js/HeapAPI.h:251:38: error: offset of on non-standard-layout type 'js::gc::TenuredChunkBase' [-Werror,-Winvalid-offsetof]
const size_t ChunkMarkBitmapOffset = offsetof(TenuredChunkBase, markBits);
^ ~~~~~~~~
/host/wasi-sdk-12.0/lib/clang/11.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
```

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.