39aldo39 / libdecsync

Other
28 stars 5 forks source link

Need to work with libcrypt.so.2 #14

Open renyuneyun opened 2 years ago

renyuneyun commented 2 years ago

I'm on archlinux, and decsync used to work without issues. But a recently update makes libcrypt.so.1 no longer exist. I guess this is because of libxcrypt (recently compiled on 2022-02-02). Checking the files in libxcrypt, I find libcrypt.so.2, but no libcrypt.so..1.

I'm not familiar with libxcrypt, so I don't know if these two versions are compatible or not. But the version bump may imply that they don't.

Maybe it's worth updating libdecsync to work with libcrypt.so.2?

renyuneyun commented 2 years ago

I found a workaround, by installing libxcrypt-compat from AUR. But this does not solve the root cause. Based on the discussion here, libcrypt.so.1 has long been deprecated. Switching to libcrypt.so.2 should be needed.

p.s. probably it's not because of the update of libxcrypt but rather glibc. Anyway, this does not affect the result.

flortsch commented 2 years ago

Thank you for the hint and short-term fix using libxcrypt-compat. I noticed this issue with the Evolution extension of DecSync no longer loading after an Arch update. In the long run, DecSync should be adapted to work with libcrypt.so.2.

Firstbober commented 2 years ago

After some research, it seems that Kotlin is the problem, as stated in https://github.com/JetBrains/kotlin-native/issues/3037. libdecsync source code does not use any function from libxcrypt or libraries related with it, as far as I can check.

flortsch commented 2 years ago

Ah, that makes sense :)

renyuneyun commented 2 years ago

@Firstbober Thanks for the information. That makes a lot of sense. I tried to find libcrypt in libdecsync but found nothing, and was wondering about that too.

Does that imply kotlin needs to fix this, or libdecsync should update the used kotlin API/function call? I see that repo is archived, and the issue was in 2019... Shouldn't that be fixed already, or never?

Firstbober commented 2 years ago

The only place where kotlin(-native) has mentions to libcrypt is in posix.def file, so maybe using kotlin provided by the distribution to build the code would solve the problem as it should link to the newer lib(x)crypt version.