rpki-client / rpki-client-portable

Portability shim for OpenBSD's rpki-client

Home Page:https://rpki-client.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build warnings

jtkristoff opened this issue · comments

Having conferred with Job off line he thought it would be worth at least a report so here it is.

On a Debian 10.x stable x86 64-bit system with OpenSSL, building the 6.7p1 release tarball resulted in some messages I thought you'd want to at least know about if you didn't already in the hope that this may help clean up any lingering issues going forward.

Only other unrelated, minor thing I didn't see mentioned that was /usr/local/var/cache/rpki-client needs to be setup with the default build and instantiation before rpki-client can be successfully run.

Everything otherwise builds successfully and is functional. Happy to provide more information if needed.

rpki-client-portable-6.7p1$ make
[...]
Making all in include
make[1]: Entering directory '/home/jtk/dl/rpki-client-portable-6.7p1/include'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/jtk/dl/rpki-client-portable-6.7p1/include' 
Making all in compat
make[1]: Entering directory '/home/jtk/dl/rpki-client-portable-6.7p1/compat'
  CC       recallocarray.lo
recallocarray.c: In function ‘recallocarray’:
recallocarray.c:60:28: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   if (d < oldsize / 2 && d < getpagesize()) {
  CC       strlcat.lo
  CC       strlcpy.lo
[...]
  CCLD     libcompat.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CCLD     libcompatnoopt.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[1]: Leaving directory '/home/jtk/dl/rpki-client-portable-6.7p1/compat'
Making all in src
make[1]: Entering directory '/home/jtk/dl/rpki-client-portable-6.7p1/src'

I can confirm two warnings for builds on a modern Linux for x86_64, i686, aarch64, armv7hl, ppc64le:

recallocarray.c: In function 'recallocarray':
recallocarray.c:60:28: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   60 |   if (d < oldsize / 2 && d < getpagesize()) {
      |                            ^
main.c:482:3: warning: ignoring return value of 'asprintf' declared with attribute 'warn_unused_result' [-Wunused-result]
  482 |   asprintf(&tmp, "%s %s", stats.talnames, file);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For s390x, I'm seeing however more warnings, but only there.

Only other unrelated, minor thing I didn't see mentioned that was /usr/local/var/cache/rpki-client needs to be setup with the default build and instantiation before rpki-client can be successfully run.

What do you mean by that exactly? There is an install-data-hook as part of make install that should either cover it (or raise a message).

When I first started rpki-client, this was the result:

$ rpki-client -c
rpki-client: /usr/local/var/cache/rpki-client: chdir: No such file or directory
rpki-client: poll: hangup

After mkdir'ing that directory and chown'ing to _rpki-client, things worked fine. update: Same situation for the outputdir.

Oh, and I hate to add random things to this issue, but there is also no mention of the ARIN TAL. I know that situation is less than ideal, but getting it is probably worth a mention.

The getpagesize() warning is harmless. getpagesize() will always return a positive number. Unsure if we should add a cast to size_t. Not a big fan of such casts.

The asprintf() warning is something that should be fixed. I look into it.

The s390x related warnings are because of a compiler that is not smart enough for its own good. The strdup() calls are unreachable if desrc is NULL. The code could be changed to help such compilers and also us humans.

Unsure about ar(1) related warnings. This is from deep down the autoconf rabbit hole. The makefile tries to be smart and only partially update the archives but it seems some systems have D (deterministic mode) by default and then u does not work and is ignored.

The asprintf() warning is something that should be fixed. I look into it.

Claudio fixed this some time ago.

As mentioned by @sebastianbenoit many things got fixed in -current and 6.8.
If there are more issues please open a new ticket.