Stream: git-wasmtime

Topic: wasmtime / issue #9126 CMake build for c-api failes to ge...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 13:41):

dev-null-undefined added the bug label to Issue #9126.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 13:41):

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

Versions and Environment

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)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 13:41):

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

Versions and Environment

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

~~~

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 13:41):

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

Versions and Environment

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)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 18:16):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 14 2024 at 18:45):

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

Versions and Environment

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: Oct 23 2024 at 20:03 UTC