Duplicate symbol definition

Hello members,

I need help fixing my Zig build issue. I’ve tried other solutions in the same topic, but none worked.

❯ zig build
install
└─ install producer
   └─ compile exe producer Debug native 1 errors
error: duplicate symbol definition: AES_cbc_encrypt
    note: defined by .zig-cache/o/6eaedcf4ebcc33ed93ca2dd04ea9c007/libopenssl.a(.zig-cache/o/df3bbab984bf9460b62bf0c767b540c9/cipher_aes_hw.o/)
    note: defined by .zig-cache/o/6eaedcf4ebcc33ed93ca2dd04ea9c007/libopenssl.a(.zig-cache/o/19f88c195b65b1a263c7e0407529854c/aes-x86_64.o/)

❯ zig version
0.15.1

Thanks

Looks like you have two versions of openssl in your dependency tree.
Zig uses the hash to differentiate packages, and currently doesn’t do any deduplication of dependencies.
You should update one of them to use the exact same version (hash) as the other.

2 Likes