Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol __floatsitf __multf3 __addtf3 __trunctfdf2 __multi3 ... #264

Closed
zapashcanon opened this issue May 6, 2024 · 2 comments · Fixed by #269
Closed

undefined symbol __floatsitf __multf3 __addtf3 __trunctfdf2 __multi3 ... #264

zapashcanon opened this issue May 6, 2024 · 2 comments · Fixed by #269

Comments

@zapashcanon
Copy link
Member

zapashcanon commented May 6, 2024

(this need #263 to be reproducible, otherwise it fails with other errors IIRC)

$ owi c sv-benchmarks/c/busybox-1.22.0/printf-3.i
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __floatsitf
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __addtf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __floatsitf
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __addtf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __floatsitf
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __multf3
wasm-ld: error: [...]/.config/opam/5.1.0/share/owi/binc/libc.wasm: undefined symbol: __trunctfdf2
$ owi c sv-benchmarks/c/hardware-verification-bv/btor2c-lazyMod.mul6.c
owi-out/btor2c-lazyMod.mul6.c:30:41: warning: shift count >= width of type [-Wshift-count-overflow]
  const SORT_5 mask_SORT_5 = (SORT_5)-1 >> (sizeof(SORT_5) * 8 - 64);
                                        ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
owi-out/btor2c-lazyMod.mul6.c:31:39: warning: shift count >= width of type [-Wshift-count-overflow]
  const SORT_5 msb_SORT_5 = (SORT_5)1 << (64 - 1);
                                      ^  ~~~~~~~~
owi-out/btor2c-lazyMod.mul6.c:49:25: warning: implicit conversion from 'long long' to 'SORT_5' (aka 'unsigned long') changes value from 9223372036854775807 to 4294967295 [-Wconstant-conversion]
  const SORT_5 var_64 = 9223372036854775807;
               ~~~~~~   ^~~~~~~~~~~~~~~~~~~
3 warnings generated.
wasm-ld: error: owi-out/btor2c-lazyMod.mul6.o: undefined symbol: __multi3
wasm-ld: error: owi-out/btor2c-lazyMod.mul6.o: undefined symbol: __multi3
run ['/usr/bin/wasm-ld' '-z' 'stack-size=8388608' '--export=_start' '-o'
     'owi-out/a.out.wasm' 'owi-out/btor2c-lazyMod.mul6.o'
     '[...]/owi/binc/libc.wasm']: exited with 1
@zapashcanon zapashcanon changed the title undefined symbol __floatsitf __multf3 __addtf3 __trunctfdf2 undefined symbol __floatsitf __multf3 __addtf3 __trunctfdf2 __multi3 ... May 7, 2024
@zapashcanon
Copy link
Member Author

zapashcanon commented May 7, 2024

I found this issue. It makes me feel like we should stop calling all the tools (clang, llc, wasm-ld, opt, lld...) and simply rely on clang driving all of them.

I asked @filipeom if there was a particular reason for calling all these tools independently and there's none, it was mostly coming from an old Makefile. I made a tentative PR at #265, I managed to use it on simple files (examples/c/poly.c for instance) with success, but not yet with files using malloc.

@krtab
Copy link
Collaborator

krtab commented May 7, 2024

Interesting, this should also close #257 which stems from a similar issue.

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 a pull request may close this issue.

2 participants