Bug 1735

Summary: build failure if ENABLE_PKCS11 is not defined
Product: Portable OpenSSH Reporter: Felix von Leitner <felix-mindrot>
Component: Build systemAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P2    
Version: 5.4p1   
Hardware: All   
OS: Linux   

Description Felix von Leitner 2010-03-13 16:59:06 AEDT
When ENABLE_PKCS11 is not defined (probably my fault, will investigate separately), openssh will fail to build because the #ifdef in ssh-pkcs11-helper.c skips the part that #includes log.h, which defines SYSLOG_LEVEL_ERROR and SYSLOG_FACILITY_AUTH.  Those (and the prototype for log_init) are needed on line 369.
Comment 1 Felix von Leitner 2010-03-13 17:04:28 AEDT
I found out why my build did not define ENABLE_PKCS11.  I was building a statically linked binary with my embedded libc.

There is another, related bug.  ssh-pkcs11-helper fails to build in the above configuration, because it has an undefined reference to xstrdup.  That is used by bsd-misc.o but not linked into openbsd-compat.a.
When I add xmalloc.o manually to openbsd-compat.a, the build works.
Comment 2 Damien Miller 2010-03-14 08:43:42 AEDT
Thanks for the report; fixes to both issues (bad #ifdef order and broken -lssh dep) have been committed and will be in the next release. For the xstrdup thing, I just appended -lssh to the link line - we already do this for ssh-keyscan.
Comment 3 Damien Miller 2010-04-16 15:51:13 AEST
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1