Bug 210658 - [PATCH] usr.sbin/ppp failing to build due to missing -lcrypt since r275054
Summary: [PATCH] usr.sbin/ppp failing to build due to missing -lcrypt since r275054
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2016-06-28 12:39 UTC by Guido Falsi
Modified: 2016-07-04 21:19 UTC (History)
1 user (show)

See Also:


Attachments
worksforme patch (366 bytes, patch)
2016-06-28 12:39 UTC, Guido Falsi
no flags Details | Diff
add crypt linking in case of WITHOUT_PAM (361 bytes, patch)
2016-07-04 15:33 UTC, Baptiste Daroussin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2016-06-28 12:39:15 UTC
Created attachment 171907 [details]
worksforme patch

I'm testing building a nanoBSD image using head and it is failing to build ppp sources with this error:

--- all_subdir_usr.sbin/ppp ---
auth.o: In function `auth_CheckPasswd':
/usr/local/nanobsd/rr-11/src/usr.sbin/ppp/auth.c:(.text+0x73e): undefined reference to `crypt'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [ppp] Error code 1

(full log available if needed)

I've noticed that the crypt library was removed in r275054 as part of a bigger refactor.

I don't know much of the internals of the build system but it looks to me there was confusion between crypt and crypto in this commit and crypt was removed by mistake. The build usually works for a whole tree, but excluding bits like I'm doing with nanoBSD exposes the problem.

Attaching a simple "works for me" patch which adds -lcrypt back to the linker command line.

CCing bapt as the author of the commit which seems to cause the problem. If my analysis is wrong, please accept my excuses.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2016-06-28 12:40:40 UTC
For further reference I'm building with these defined:

CONF_WORLD="
MALLOC_PRODUCTION=YES
WITHOUT_ACCT=YES
WITHOUT_AMD=YES
WITHOUT_AUDIT=YES
WITHOUT_AUTHPF=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_CALENDAR=YES
WITHOUT_CDDL=YES
WITHOUT_CTM=YES
WITHOUT_CVS=YES
WITHOUT_DEBUG_FILES=YES
WITHOUT_DICT=YES
WITHOUT_EXAMPLES=YES
WITHOUT_FLOPPY=YES
WITHOUT_FORTRAN=YES
WITHOUT_FREEBSD_UPDATE=YES
WITHOUT_GAMES=YES
WITHOUT_GCOV=YES
WITHOUT_GDB=YES
WITHOUT_GPIB=YES
WITHOUT_GROFF=YES
WITHOUT_HTML=YES
WITHOUT_I4B=YES
WITHOUT_INFO=YES
WITHOUT_IPFILTER=YES
WITHOUT_IPX=YES
WITHOUT_KERNEL_SYMBOLS=YES
WITHOUT_LIBKSE=YES
WITHOUT_LOCALES=YES
WITHOUT_LOCATE=YES
WITHOUT_LPR=YES
WITHOUT_MAN=YES
WITHOUT_MISC=YES
WITHOUT_NIS=YES
WITHOUT_NLS=YES
WITHOUT_NS_CACHING=YES
WITHOUT_OBJC=YES
WITHOUT_PAM=YES
WITHOUT_PF=YES
WITHOUT_PORTSNAP=YES
WITHOUT_PROFILE=YES
WITHOUT_QUOTAS=YES
WITHOUT_RCS=YES
WITHOUT_RESCUE=YES
WITHOUT_ROUTED=YES
WITHOUT_SENDMAIL=YES
WITHOUT_SHAREDOCS=YES
WITHOUT_SVNLITE=YES
WITHOUT_SYSCONS=YES
WITHOUT_TESTS=YES
WITHOUT_UNBOUND=YES
WITHOUT_VT=YES
WITHOUT_ZFS=YES
WITH_BSD_GREP=YES
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2016-07-04 15:33:04 UTC
Created attachment 172104 [details]
add crypt linking in case of WITHOUT_PAM

Can you try the following patch?
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2016-07-04 16:42:03 UTC
Comment on attachment 171907 [details]
worksforme patch

Thanks Bapt!

Your patch works fine for my case.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-07-04 21:19:33 UTC
A commit references this bug:

Author: bapt
Date: Mon Jul  4 21:18:58 UTC 2016
New revision: 302337
URL: https://svnweb.freebsd.org/changeset/base/302337

Log:
  Fix build of ppp when WITHOUT_PAM is set

  PR:		210658
  Reported by:	madpilot
  Tested by:	madpilot
  Approved by:	re@ (kib)

Changes:
  head/usr.sbin/ppp/Makefile