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

build with --without-ssl fails #206

Closed
Polynomial-C opened this issue Jan 28, 2022 · 2 comments
Closed

build with --without-ssl fails #206

Polynomial-C opened this issue Jan 28, 2022 · 2 comments

Comments

@Polynomial-C
Copy link

This has been reported downstream at Gentoo: https://bugs.gentoo.org/832213

These are the configure options I was using for reproducing this issue:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --docdir=/usr/share/doc/nsd-9999 --htmldir=/usr/share/doc/nsd-9999/html --libdir=/usr/lib64 --enable-largefile --enable-pie --enable-relro-now --enable-tcp-fastopen --with-dbfile=/var/db/nsd/nsd.db --with-logfile=/var/log/nsd.log --with-pidfile=/run/nsd/nsd.pid --with-xfrdfile=/var/db/nsd/xfrd.state --with-xfrdir=/var/db/nsd --with-zonelistfile=/var/db/nsd/zone.list --with-zonesdir=/var/lib/nsd --disable-bind8-stats --disable-zone-stats --disable-dnstap --disable-ipv6 --disable-minimal-responses --enable-mmap --enable-nsec3 --disable-ratelimit --disable-root-server --disable-checking --disable-systemd --without-libevent --without-ssl

During build I see

x86_64-pc-linux-gnu-gcc -I. -march=native -mtune=native -O2 -pipe -c edns.c
edns.c: In function ‘cookie_verify’:
edns.c:282:12: warning: implicit declaration of function ‘CRYPTO_memcmp’ [-Wimplicit-function-declaration]
  282 |         if(CRYPTO_memcmp(hash2verify, hash, 8) == 0 ) {
      |            ^~~~~~~~~~~~~

and later the final linking fails:

x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -o nsd answer.o axfr.o buffer.o configlexer.o configparser.o dname.o dns.o edns.o iterated_hash.o lookup3.o namedb.o nsec3.o options.o packet.o query.o rbtree.o radtree.o rdata.o region-allocator.o rrl.o siphash.o tsig.o tsig-openssl.o udb.o udbradtree.o udbzone.o util.o bitset.o popen3.o xfrd-disk.o xfrd-notify.o xfrd-tcp.o xfrd.o remote.o  difffile.o ipc.o mini_event.o netio.o nsd.o server.o dbaccess.o dbcreate.o zlexer.o zonec.o zparser.o cpuset.o strlcat.o strlcpy.o b64_pton.o b64_ntop.o setproctitle.o
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: edns.o: in function `cookie_verify':
edns.c:(.text+0x3e7): undefined reference to `CRYPTO_memcmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: edns.c:(.text+0x430): undefined reference to `CRYPTO_memcmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: edns.c:(.text+0x50c): undefined reference to `CRYPTO_memcmp'
collect2: error: ld returned 1 exit status
make: *** [Makefile:158: nsd] Error 1

Seems like some #ifdef HAVE_SSL is missing.

@wcawijngaards
Copy link
Member

Not sure if the cookie functionality works, but there is fallback code for no SSL for this function in the TSIG code. Used that fallback code for the edns calls. The siphash seems to be in the nsd code, so likely the cookie verify works fine. Build succeeds for me with the fix.

@Polynomial-C
Copy link
Author

Thanks for the quick fix 😉

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

2 participants