mold icon indicating copy to clipboard operation
mold copied to clipboard

mold failure vs lld, ld when building libxcrypt 4.50. 4.50.1 with lto enabled

Open satmandu opened this issue 1 month ago • 2 comments

As discussed at https://github.com/besser82/libxcrypt/issues/213 and https://github.com/besser82/libxcrypt/pull/215#issuecomment-3497388021

I can confirm that building 4.5.1 with llvm 21's lld succeeds, but building with the current version of mold fails.

satmandu avatar Nov 08 '25 15:11 satmandu

I just built libxcrypt with mold and got the following warnings. Are these the cause of the build failure (along with --fatal-warnings)? If that's the case, you want to fix the warning instead of silencing them. We warn on nonexistent symbols in a version script file because otherwise it would be very hard to find typos in symbol names in a version script file.

mold: warning: ./libcrypt.map: cannot assign version `GLIBC_2.2.5` to symbol `encrypt`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `GLIBC_2.2.5` to symbol `encrypt_r`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `GLIBC_2.2.5` to symbol `fcrypt`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `GLIBC_2.2.5` to symbol `setkey`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `GLIBC_2.2.5` to symbol `setkey_r`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `XCRYPT_2.0` to symbol `crypt_gensalt_r`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `XCRYPT_2.0` to symbol `xcrypt`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `XCRYPT_2.0` to symbol `xcrypt_gensalt`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `XCRYPT_2.0` to symbol `xcrypt_gensalt_r`: symbol not found
mold: warning: ./libcrypt.map: cannot assign version `XCRYPT_2.0` to symbol `xcrypt_r`: symbol not found

rui314 avatar Nov 09 '25 06:11 rui314

Those are the errors I see, yes!

satmandu avatar Nov 09 '25 13:11 satmandu