Fix link warnings related to streambuf stuff

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, wasm
Domain
build-system

Research direction

Reproduce the wasm build and inspect the link steps for body.cpp.obj and ios.instantiations.cpp.o, focusing on the two streambuf symbols shown in the warnings. Use the kv_store target as a reproduction, then verify that its link completes without the function signature mismatch warnings.

Written by the indexing model from the issue text.

Description

I'm seeing the following in the build logs:

wasm-ld: warning: function signature mismatch: _ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj
>>> defined as () -> void in ../release/libfastly-thin.a(body.cpp.obj)
>>> defined as (i32, i32, i32, i32) -> void in ../wasm32-wasip1/release/libfastly_sys.a(ios.instantiations.cpp.o)
wasm-ld: warning: function signature mismatch: _ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj
>>> defined as () -> void in ../release/libfastly-thin.a(body.cpp.obj)
>>> defined as (i32, i32, i64, i32, i32) -> void in ../wasm32-wasip1/release/libfastly_sys.a(ios.instantiations.cpp.o)
[ 98%] Built target esi
[ 99%] Building CXX object test/CMakeFiles/kv_store.dir/kv_store.cpp.obj
[100%] Linking CXX executable kv_store
wasm-ld: warning: function signature mismatch: _ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj
>>> defined as () -> void in ../release/libfastly-thin.a(body.cpp.obj)
>>> defined as (i32, i32, i32, i32) -> void in ../wasm32-wasip1/release/libfastly_sys.a(ios.instantiations.cpp.o)
wasm-ld: warning: function signature mismatch: _ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj
>>> defined as () -> void in ../release/libfastly-thin.a(body.cpp.obj)
>>> defined as (i32, i32, i64, i32, i32) -> void in ../wasm32-wasip1/release/libfastly_sys.a(ios.instantiations.cpp.o)
Dominant language
C++
Stars
9
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fastly/compute-sdk-cpp

All issues in fastly/compute-sdk-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.