besser82 / libxcrypt

Extended crypt library for descrypt, md5crypt, bcrypt, and others
GNU Lesser General Public License v2.1
189 stars 52 forks source link

autotools $(LN_S) fails if symlink/file already exists #120

Closed asavah closed 3 years ago

asavah commented 3 years ago

In case of inplace upgrade libxcrypt 4.4.18 make install fails due to already existing symlink(s).

/home/asavah/kross/host/bin/make  install-exec-hook
make[4]: Entering directory '/home/asavah/kross/src/libxcrypt'
cd /home/asavah/kross/host/lib && \
        ln -s libcrypt.so libxcrypt.so
ln: failed to create symbolic link 'libxcrypt.so': File exists

All these and more will fail if file/symlink already exists. https://github.com/besser82/libxcrypt/blob/develop/Makefile.am#L138-L140 https://github.com/besser82/libxcrypt/blob/develop/Makefile.am#L237-L239 https://github.com/besser82/libxcrypt/blob/develop/Makefile.am#L252-L254

Edit: quick and dirty workaround without butchering Makefile.am: make install LN_S="ln -sf"