besser82/libxcrypt

static linking with openssh 8.2p1

Closed this issue · 4 comments

Trying to link statically link openssh 8.2p1 using libxcrypt instead of glibc's crypt fails:

/pkg/bin/ld: /usr/lib/libcrypt.a(libcrypt_la-crypt-static.o): in function crypt': /home/gzp/build.base/libxcrypt/src/4.4.12/lib/crypt-static.c:29: multiple definition of xcrypt'; openbsd-compat/libopenbsd-compat.a(xcrypt.o):/home/gzp/src/openssh-8.2p1/openbsd-compat/xcrypt.c:101: first defined here

Any way to fix this?

zackw commented

Sorry for the delay.
Instead of attaching the old config.log, I was picking up your commit and made an errorless build with the new libcrypt.a.
I'm confirming, the problem solved, thanks.

zackw commented

@gzpapp Before I close this bug, could you please re-check that commit 823437d corrects the issue? fea80d9 includes a bunch of other work that is still experimental and it's possible that I have not pulled out the part that actually solves your problem.

@zackw Yes, commit 823437d corrects the problem, openssh 8.2p1 compiles fine statically with libxcrypt. Thank you!