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

duplicate symbol definition: _malloc_printf #97

Open
serjflint opened this issue Jul 24, 2024 · 3 comments
Open

duplicate symbol definition: _malloc_printf #97

serjflint opened this issue Jul 24, 2024 · 3 comments

Comments

@serjflint
Copy link

serjflint commented Jul 24, 2024

Hello! Thank you for the great library.

I am cross-compiling ruff 0.5.3 on Ubuntu 20.04 against x86_64-apple-darwin target using cargo-zigbuild. Other targets are fine, but for this one I got an error like this:

  = note: error: duplicate symbol definition: _malloc_printf
              note: defined by /opt/zig/lib/libc/darwin/libSystem.tbd
              note: defined by /tmp/rustcmNzciC/libtikv_jemalloc_sys-d0b27344258bf71e.rlib(malloc_io.pic.o)
          

error: could not compile `ruff` (bin "ruff") due to 1 previous error

Full trace here https://gist.github.com/serjflint/2e67f06207383c3fbddf97798dd103f8

Last time I was building ruff 0.3.4 (with tikv-jemallocator = { version = "0.5.0" }) about 4 months ago and it was working.
My Mac OS SDK is about 1 year old.

Do you have an idea how to better solve this issue?
I found a similar one #81 and created one for zig ziglang/zig#20694

@BusyJay
Copy link
Member

BusyJay commented Jul 24, 2024

Can you also attach the build log of tikv-jemallocator? It should be in target/debug/build/tikv-jemalloc-sys-{hash}/output.

@BusyJay
Copy link
Member

BusyJay commented Jul 24, 2024

Perhaps you can also try to build with zig 0.13.0 and tikv-jemalloc 0.5.0. I'm not familiar with Zig, it's possible a new release zig brings new symbols in libSystem.tbd.

@serjflint
Copy link
Author

Thank you. I will try doing both locally during the week.

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

No branches or pull requests

2 participants