dev-null-undefined added the bug label to Issue #9126.
dev-null-undefined opened issue #9126:
Error that you get:
error: unterminated #ifndef 1 | /** * \file wasmtime/conf.h * * \brief Build-time defines for how the C API was built. */#ifndef WASMTIME_CONF_H#define WASMTIME_CONF_H// WASMTIME_FEATURE_LIST#define WASMTIME_FEATURE_PROFILING#define WASMTIME_FEATURE_WAT#define WASMTIME_FEATURE_CACHE#define WASMTIME_FEATURE_PARALLEL_COMPILATION#define WASMTIME_FEATURE_WASI#define WASMTIME_FEATURE_LOGGING/* #undef WASMTIME_FEATURE_DISABLE_LOGGING */#define WASMTIME_FEATURE_COREDUMP#define WASMTIME_FEATURE_ADDR2LINE#define WASMTIME_FEATURE_DEMANGLE#define WASMTIME_FEATURE_THREADS#define WASMTIME_FEATURE_GC#define WASMTIME_FEATURE_ASYNC#define WASMTIME_FEATURE_CRANELIFT#define WASMTIME_FEATURE_WINCH// ... if you add a line above this be sure to change the other locations// marked WASMTIME_FEATURE_LIST#if defined(WASMTIME_FEATURE_CRANELIFT) || defined(WASMTIME_FEATURE_WINCH)#define WASMTIME_FEATURE_COMPILER#endif#endif // WASMTIME_CONF_H | In file included from /usr/include/wasmtime/linker.h:11, from /usr/include/wasmtime.h:193,
Steps to Reproduce
- Follow the steps to build wasmtime from source https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/README.md
- Check the
target/c-api/include/wasmtime/conf.h
see that there are missing new lines- Try to compile anything with the c-api
Versions and Environment
- Use cmake version 3.18.4 (for example from a docker container)
FROM debian:bullseye ARG RELEASE RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends --no-install-suggests -y \ build-essential \ cmake \ git \ curl && \ apt-get clean && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Wasmtime version or commit: v23.0.2
Operating system: NixOs, but running in dockercontainer debian:bullseye
Architecture: x86_64
Extra Info
Managed to fix the issue by changing https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/cmake/install-headers.cmake#L14
- file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}") + file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}" NEWLINE_STYLE LF)
dev-null-undefined edited issue #9126:
Error that you get:
error: unterminated #ifndef 1 | /** * \file wasmtime/conf.h * * \brief Build-time defines for how the C API was built. */#ifndef WASMTIME_CONF_H#define WASMTIME_CONF_H// WASMTIME_FEATURE_LIST#define WASMTIME_FEATURE_PROFILING#define WASMTIME_FEATURE_WAT#define WASMTIME_FEATURE_CACHE#define WASMTIME_FEATURE_PARALLEL_COMPILATION#define WASMTIME_FEATURE_WASI#define WASMTIME_FEATURE_LOGGING/* #undef WASMTIME_FEATURE_DISABLE_LOGGING */#define WASMTIME_FEATURE_COREDUMP#define WASMTIME_FEATURE_ADDR2LINE#define WASMTIME_FEATURE_DEMANGLE#define WASMTIME_FEATURE_THREADS#define WASMTIME_FEATURE_GC#define WASMTIME_FEATURE_ASYNC#define WASMTIME_FEATURE_CRANELIFT#define WASMTIME_FEATURE_WINCH// ... if you add a line above this be sure to change the other locations// marked WASMTIME_FEATURE_LIST#if defined(WASMTIME_FEATURE_CRANELIFT) || defined(WASMTIME_FEATURE_WINCH)#define WASMTIME_FEATURE_COMPILER#endif#endif // WASMTIME_CONF_H | In file included from /usr/include/wasmtime/linker.h:11, from /usr/include/wasmtime.h:193,
Steps to Reproduce
- Follow the steps to build wasmtime from source https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/README.md
- Check the
target/c-api/include/wasmtime/conf.h
see that there are missing new lines- Try to compile anything with the c-api
Versions and Environment
- Use cmake version 3.18.4 (for example from a docker container)
FROM debian:bullseye ARG RELEASE RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends --no-install-suggests -y \ build-essential \ cmake \ git \ curl && \ apt-get clean && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Wasmtime version or commit: v23.0.2
Operating system: NixOs, but running in dockercontainer debian:bullseye
Architecture: x86_64
Extra Info
Managed to fix the issue by changing https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/cmake/install-headers.cmake#L14
- file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}") + file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}" NEWLINE_STYLE LF)
```[tasklist]
Tasks
~~~
dev-null-undefined edited issue #9126:
Error that you get:
error: unterminated #ifndef 1 | /** * \file wasmtime/conf.h * * \brief Build-time defines for how the C API was built. */#ifndef WASMTIME_CONF_H#define WASMTIME_CONF_H// WASMTIME_FEATURE_LIST#define WASMTIME_FEATURE_PROFILING#define WASMTIME_FEATURE_WAT#define WASMTIME_FEATURE_CACHE#define WASMTIME_FEATURE_PARALLEL_COMPILATION#define WASMTIME_FEATURE_WASI#define WASMTIME_FEATURE_LOGGING/* #undef WASMTIME_FEATURE_DISABLE_LOGGING */#define WASMTIME_FEATURE_COREDUMP#define WASMTIME_FEATURE_ADDR2LINE#define WASMTIME_FEATURE_DEMANGLE#define WASMTIME_FEATURE_THREADS#define WASMTIME_FEATURE_GC#define WASMTIME_FEATURE_ASYNC#define WASMTIME_FEATURE_CRANELIFT#define WASMTIME_FEATURE_WINCH// ... if you add a line above this be sure to change the other locations// marked WASMTIME_FEATURE_LIST#if defined(WASMTIME_FEATURE_CRANELIFT) || defined(WASMTIME_FEATURE_WINCH)#define WASMTIME_FEATURE_COMPILER#endif#endif // WASMTIME_CONF_H | In file included from /usr/include/wasmtime/linker.h:11, from /usr/include/wasmtime.h:193,
Steps to Reproduce
- Follow the steps to build wasmtime from source https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/README.md
- Check the
target/c-api/include/wasmtime/conf.h
see that there are missing new lines- Try to compile anything with the c-api
Versions and Environment
- Use cmake version 3.18.4 (for example from a docker container)
FROM debian:bullseye ARG RELEASE RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends --no-install-suggests -y \ build-essential \ cmake \ git \ curl && \ apt-get clean && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Wasmtime version or commit: v23.0.2
Operating system: NixOs, but running in dockercontainer debian:bullseye
Architecture: x86_64
Extra Info
Managed to fix the issue by changing https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/cmake/install-headers.cmake#L14
- file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}") + file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}" NEWLINE_STYLE LF)
alexcrichton commented on issue #9126:
Thanks for the report! Looks like this is due to an older CMake version and should be fixed in https://github.com/bytecodealliance/wasmtime/pull/9131
alexcrichton closed issue #9126:
Error that you get:
error: unterminated #ifndef 1 | /** * \file wasmtime/conf.h * * \brief Build-time defines for how the C API was built. */#ifndef WASMTIME_CONF_H#define WASMTIME_CONF_H// WASMTIME_FEATURE_LIST#define WASMTIME_FEATURE_PROFILING#define WASMTIME_FEATURE_WAT#define WASMTIME_FEATURE_CACHE#define WASMTIME_FEATURE_PARALLEL_COMPILATION#define WASMTIME_FEATURE_WASI#define WASMTIME_FEATURE_LOGGING/* #undef WASMTIME_FEATURE_DISABLE_LOGGING */#define WASMTIME_FEATURE_COREDUMP#define WASMTIME_FEATURE_ADDR2LINE#define WASMTIME_FEATURE_DEMANGLE#define WASMTIME_FEATURE_THREADS#define WASMTIME_FEATURE_GC#define WASMTIME_FEATURE_ASYNC#define WASMTIME_FEATURE_CRANELIFT#define WASMTIME_FEATURE_WINCH// ... if you add a line above this be sure to change the other locations// marked WASMTIME_FEATURE_LIST#if defined(WASMTIME_FEATURE_CRANELIFT) || defined(WASMTIME_FEATURE_WINCH)#define WASMTIME_FEATURE_COMPILER#endif#endif // WASMTIME_CONF_H | In file included from /usr/include/wasmtime/linker.h:11, from /usr/include/wasmtime.h:193,
Steps to Reproduce
- Follow the steps to build wasmtime from source https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/README.md
- Check the
target/c-api/include/wasmtime/conf.h
see that there are missing new lines- Try to compile anything with the c-api
Versions and Environment
- Use cmake version 3.18.4 (for example from a docker container)
FROM debian:bullseye ARG RELEASE RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends --no-install-suggests -y \ build-essential \ cmake \ git \ curl && \ apt-get clean && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Wasmtime version or commit: v23.0.2
Operating system: NixOs, but running in dockercontainer debian:bullseye
Architecture: x86_64
Extra Info
Managed to fix the issue by changing https://github.com/bytecodealliance/wasmtime/blob/main/crates/c-api/cmake/install-headers.cmake#L14
- file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}") + file(CONFIGURE OUTPUT "${dst}/wasmtime/conf.h" CONTENT "${conf_h}" NEWLINE_STYLE LF)
Last updated: Nov 22 2024 at 16:03 UTC