Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbsd-dev is needed in CFLAGS and LDFLAGS to build on Debian 12 #32

Open
nroach44 opened this issue Mar 21, 2025 · 0 comments
Open

libbsd-dev is needed in CFLAGS and LDFLAGS to build on Debian 12 #32

nroach44 opened this issue Mar 21, 2025 · 0 comments

Comments

@nroach44
Copy link

Hi, thanks for your project!

When trying to install this on a reasonably clean Debian 12 install, I get the following error:

retronet.c: In function ‘rn_req_tcp_open’:
retronet.c:1753:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Werror=implicit-function-declaration]
 1753 |         strlcpy((char *)le->details.hostname,
      |         ^~~~~~~
      |         strncpy
cc1: all warnings being treated as errors
make[2]: *** [Makefile:610: nabud-retronet.o] Error 1

I also got this after "fixing" the above:

/usr/bin/ld: nabud-main.o: in function `main':
main.c:(.text+0x117a): undefined reference to `bsd_getopt'
/usr/bin/ld: nabud-retronet.o: in function `rn_req_tcp_open':
retronet.c:(.text+0x3c8b): undefined reference to `strlcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:466: nabud] Error 1

I ended up fixing it all by installing libbsd-dev, and running export CFLAGS="-DLIBBSD_OVERLAY -I/usr/include/bsd" and export LDFLAGS="-lbsd"

I just wanted to note it here as it's both missed by the configure script and I couldn't see it documented anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant