build weirdness - anybody recognize this?

Hal Murray hmurray at megapathdsl.net
Thu Feb 14 09:46:58 UTC 2019


[105/124] Linking hgm/main/ntpd/ntsd
/usr/bin/ld: libntp/libntp.a(msyslog.c.1.o): in function `addto_syslog':
/home/murray/ntpsec/raw/hgm/main/../../libntp/msyslog.c:171: undefined 
reference to `progname'
/usr/bin/ld: libntp/libntp.a(msyslog.c.1.o): in function `init_logging':
/home/murray/ntpsec/raw/hgm/main/../../libntp/msyslog.c:362: undefined 
reference to `progname'
collect2: error: ld returned 1 exit status

It goes away if I comment out the loop (4 lines) in this new code I'm trying 
to add to nts.c
That leaves warnings from 2 unused variables, but it loads cleanly.

#include <openssl/err.h>

void nts_log_ssl_error(void) {
  char buff[256];
  int err;
  while (0 != (err=ERR_get_error())) {
    ERR_error_string_n(err, buff, sizeof(buff));
    msyslog(LOG_INFO, "NTS: err %s", buff);
  }
}


I get the same result on FreeBSD using 
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 
6.0.1)
Target: x86_64-unknown-freebsd12.0
Thread model: posix



-- 
These are my opinions.  I hate spam.





More information about the devel mailing list