Closed plntyk closed 9 years ago
I've added _XOPEN_SOURCE prior to searching for crypt(). That should resolve the issue.
Hello, it's happened again. Should I use this patch?
ocserv 0.8.8 on Archlinux
ocpasswd.o: In function main': ocpasswd.c:(.text.startup+0x362): undefined reference to
crypt'
ocpasswd.c:(.text.startup+0x5a6): undefined reference to `crypt'
collect2: error: ld returned 1 exit status
The latest version is 0.8.9 and includes the patch.
I'm still getting the same error when I try to compile the latest ocserv-0.9.0.tar.gz for OpenWRT on SLES (Suse):
ocpasswd.c:(.text.startup+0x424): undefined reference to `crypt'
What can I do to fix it?
No idea, the current code should compile out of the box.
compiling this package in a clean build tree leads to different results debian (and buildbots) : package seems to build fine arch linux: package fails with
examining a little bit further (config.log): ac_cv_libcrypt=no (archlinux) while ac_cv_libcrypt=yes (debian)
adding to that some research show that crypt() in unistd.h is guarded / sometimes not exposed:
I don't know if this is a bug in the toolchain, autotools (libcrypt detection), environment (__USE_XOPEN) or source code (not declaring code XOPEN/POSIX compliant affecting) or a mix of the above.