Skip to content

nuttx: Add missing pthread.h header#2009

Merged
wenyongh merged 1 commit intobytecodealliance:mainfrom
gustavonihei:bugfix/nuttx_pthread_header
Mar 7, 2023
Merged

nuttx: Add missing pthread.h header#2009
wenyongh merged 1 commit intobytecodealliance:mainfrom
gustavonihei:bugfix/nuttx_pthread_header

Conversation

@gustavonihei
Copy link
Copy Markdown
Contributor

This PR intends to add the missing pthread.h header to the NuttX build to fix the following build error:

In file included from wamr/core/shared/utils/../platform/include/platform_common.h:13,
                 from wamr/core/shared/utils/bh_platform.h:9,
                 from wamr/core/iwasm/aot/aot_runtime.h:9,
                 from wamr/core/iwasm/aot/aot_loader.c:6:
wamr/core/shared/platform/nuttx/platform_internal.h:39:9: error: unknown type name 'pthread_t'
 typedef pthread_t korp_tid;
         ^~~~~~~~~
wamr/core/shared/platform/nuttx/platform_internal.h:40:9: error: unknown type name 'pthread_mutex_t'
 typedef pthread_mutex_t korp_mutex;
         ^~~~~~~~~~~~~~~
wamr/core/shared/platform/nuttx/platform_internal.h:41:9: error: unknown type name 'pthread_cond_t'
 typedef pthread_cond_t korp_cond;
         ^~~~~~~~~~~~~~
wamr/core/shared/platform/nuttx/platform_internal.h:42:9: error: unknown type name 'pthread_t'
 typedef pthread_t korp_thread;
         ^~~~~~~~~
In file included from wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.h:18,
                 from wamr/core/iwasm/aot/../common/wasm_runtime_common.h:18,
                 from wamr/core/iwasm/aot/aot_runtime.h:10,
                 from wamr/core/iwasm/aot/aot_loader.c:6:
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:52:5: error: unknown type name 'pthread_mutex_t'
     pthread_mutex_t object;
     ^~~~~~~~~~~~~~~
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:87:5: error: unknown type name 'pthread_rwlock_t'
     pthread_rwlock_t object;
     ^~~~~~~~~~~~~~~~
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:123:5: error: unknown type name 'pthread_cond_t'
     pthread_cond_t object;
     ^~~~~~~~~~~~~~
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h: In function 'cond_init_monotonic':
wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:135:5: error: unknown type name 'pthread_condattr_t'
     pthread_condattr_t attr;
     ^~~~~~~~~~~~~~~~~~
make[3]: *** [/home/nihei/Projects/NuttX/apps/Application.mk:157: aot_loader.c.home.nihei.Projects.NuttX.apps.interpreters.wamr.o] Error 1

@gustavonihei
Copy link
Copy Markdown
Contributor Author

@no1wudi CI build for NuttX seems to be broken after apache/nuttx-apps#1609 got merged.

@no1wudi
Copy link
Copy Markdown
Collaborator

no1wudi commented Mar 7, 2023

@no1wudi CI build for NuttX seems to be broken after apache/nuttx-apps#1609 got merged.

I'll submit a fix today.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
@gustavonihei gustavonihei force-pushed the bugfix/nuttx_pthread_header branch from a2ec41c to 2c31a61 Compare March 7, 2023 12:01
@wenyongh wenyongh merged commit 6a3ae68 into bytecodealliance:main Mar 7, 2023
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants