-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
I hit a weird compile error on datafusion-macros (ref. apache/sedona-db#78 (comment)) when trying to generate staticlib with cross-compilation (use x86_64-pc-windows-msvc
toolchain and the target is x86_64-pc-windows-gnu
).
libzstd_sys-cfb03dc2082f767f.rlib(88f362f13b0528ed-huf_decompress.o) : error LNK2001: unresolved external symbol ___chkstk_ms␍
libzstd_sys-cfb03dc2082f767f.rlib(fb80479a5fb81f6a-zstd_compress.o) : error LNK2001: unresolved external symbol ___chkstk_ms␍
libzstd_sys-cfb03dc2082f767f.rlib(fb80479a5fb81f6a-hist.o) : error LNK2001: unresolved external symbol ___chkstk_ms␍
libzstd_sys-cfb03dc2082f767f.rlib(fb80479a5fb81f6a-huf_compress.o) : error LNK2001: unresolved external symbol ___chkstk_ms␍
libzstd_sys-cfb03dc2082f767f.rlib(88f362f13b0528ed-zstd_decompress_block.o) : error LNK2001: unresolved external symbol ___chkstk_ms␍
This symbol (___chkstk_ms
) is from libgcc, and it seems some compiler setting is wrong when proc-macro = true
.
I don't fully understand, but it seems it's a bit tricky to statically compile proc-macro, so it's generally a good idea for a proc-macro crate not to depend on sys crates.
Describe the solution you'd like
This isn't datafusion's fault, but this can be solved by tweaking the dependency of datafusion-macro
.
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request