Unbound 1.9.3rc1 pre-release

Hi,

Unbound 1.9.3rc1 maintainers' prerelease is available:
https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3rc1.tar.gz
sha256 d8511328ae6643c9d38cd1b3aa6b25b639ac1e67885f919c5d7e1b8b02fdb24e
pgp https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3rc1.tar.gz.asc

This release has a number of bug fixes. Added is the ipset module, that
helps add ip-addresses that are looked up in a domain to a firewall
ip-address filter. Also, the python module has restart next, per-query
data and multiple instance support. The unbound -V option has been
added and it prints the build config.

Features:
- PR #28: IPSet module, by Kevin Chou. Created a module to support
  the ipset that could add the domain's ip to a list easily.
  Needs libmnl, and --enable-ipset and config it, doc/README.ipset.md.
- Merge PR #6: Python module: support multiple instances
- Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
- Merge PR #4: Python module: assign something useful to the
  per-query data store 'qdata'
- Introduce `-V` option to print the version number and build options.
  Previously reported build options like linked libs and linked modules
  are now moved from `-h` to `-V` as well for consistency.
- PACKAGE_BUGREPORT now also includes link to GitHub issues.

Bug Fixes:
- Fix #39: In libunbound, leftover logfile is close()d unpredictably.
- Fix for #24: Fix abort due to scan of auth zone masters using old
  address from previous scan.
- Fix to omit RRSIGs from addition to the ipset.
- Fix to make unbound-control with ipset, remove unused variable,
  use unsigned type because of comparison, and assign null instead
  of compare with it. Remade lex and yacc output.
- make depend
- Added documentation to the ipset files (for doxygen output).
- Fix python dict reference and double free in config.
- Fix memleak in unit test, reported from the clang 8.0 static analyzer.
- For #45, check that 127.0.0.1 and ::1 are not used in unbound.conf
  when do-not-query-localhost is turned on, or at default on,
  unbound-checkconf prints a warning if it is found in forward-addr or
  stub-addr statements.
- Fix for possible assertion failure when answering respip CNAME from
  cache.
- Fix in respip addrtree selection. Absence of addr_tree_init_parents()
  call made it impossible to go up the tree when the matching netmask is
  too specific.
- Fix #48: Unbound returns additional records on NODATA response,
  if minimal-responses is enabled, also the additional for negative
  responses is removed.
- Fix #49: Set no renegotiation on the SSL context to stop client
  session renegotiation.
- Fix question section mismatch in local zone redirect.
- Add verbose log message when auth zone file is written, at level 4.
- Add hex print of trust anchor pointer to trust anchor file temp
  name to make it unique, for libunbound created multiple contexts.
- For #52 #53, second context does not close logfile override.
- Fix #52 #53, fix for example fail program.
- Fix to return after failed auth zone http chunk write.
- Fix to remove unused test for task_probe existance.
- Fix to timeval_add for remaining second in microseconds.
- Check repinfo in worker_handle_request, if null, drop it.
- Generate configlexer with newer flex.
- Fix warning for unused variable for compilation without systemd.
- Fix #59, when compiled with systemd support check that we can properly
  communicate with systemd through the `NOTIFY_SOCKET`.
- iana portlist updated.
- Fix autotrust temp file uniqueness windows compile.
- avoid warning about upcast on 32bit systems for autotrust.
- escape commandline contents for -V.
- Fix character buffer size in ub_ctx_hosts.

Best regards, Wouter

Hello Wouter,

I build and run this rc

two notes:
- contrib/fastrpz.patch doesn't apply
- one warning (no idea if relevant)

libtool: compile: gcc -I. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/python3.5m -DSRCDIR=. -g -O2 "-fdebug-prefix-map=/<<PKGBUILDDIR>>=." -fstack-protect
or-strong -Wformat -Werror=format-security -pthread -I/usr/include/google -c pythonmod/pythonmod.c -fPIC -DPIC -o .libs/pythonmod.o
In file included from pythonmod/pythonmod.c:117:0:
./pythonmod/interface.h:14:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wcast-function-type"
                                ^~~~~~~~~~~~~~~~~~~~~~

Andreas

Hi Andreas,

Hi,

Unbound 1.9.3rc1 maintainers' prerelease is available:

Hello Wouter,

I build and run this rc

two notes:
- contrib/fastrpz.patch doesn't apply
- one warning (no idea if relevant)

Thanks! Fixed.

Best regards, Wouter

Hi,

Unbound 1.9.3rc2 maintainers' prerelease is available:
https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3rc2.tar.gz
sha256 8167e260bf935b6eddc089b65a09cf3c22727f340f1b766011ddacbb2f21ba54
pgp https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3rc2.tar.gz.asc

And update to 1.9.3 rc1 with fixes for it in this rc2 candidate.

Bug Fixes
- Option -V prints if TCP fastopen is available.
- Fix unittest valgrind false positive uninitialised value report,
  where if gcc 9.1.1 uses -O2 (but not -O1) then valgrind 3.15.0
  issues an uninitialised value for the token buffer at the str2wire.c
  rrinternal_get_owner() strcmp with the '@' value. Rewritten to use
  straight character comparisons removes the false positive. Also
  valgrinds --expensive-definedness-checks=yes can stop this false
  positive.
- Please doxygen's parser for "@" occurrence in doxygen comment.
- Fixup contrib/fastrpz.patch
- Remove warning about unknown cast-function-type warning pragma.
- Document limitation of pidfile removal outside of chroot directory.
- Fix log_dns_msg to log irrespective of minimal responses config.
- Fix that pkg-config is setup before --enable-systemd needs it.

Best regards, Wouter

Hi,

Unbound 1.9.3 is available:
https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3.tar.gz
sha256 1b55dd9170e4bfb327fb644de7bbf7f0541701149dff3adf1b63ffa785f16dfa
pgp https://nlnetlabs.nl/downloads/unbound/unbound-1.9.3.tar.gz.asc

This release has a number of bug fixes. Added is the ipset module, that
helps add ip-addresses that are looked up in a domain to a firewall
ip-address filter. Also, the python module has restart next, per-query
data and multiple instance support. The unbound -V option has been
added and it prints the build config.

Features:
- PR #28: IPSet module, by Kevin Chou. Created a module to support
  the ipset that could add the domain's ip to a list easily.
  Needs libmnl, and --enable-ipset and config it, doc/README.ipset.md.
- Merge PR #6: Python module: support multiple instances
- Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
- Merge PR #4: Python module: assign something useful to the
  per-query data store 'qdata'
- Introduce `-V` option to print the version number and build options.
  Previously reported build options like linked libs and linked modules
  are now moved from `-h` to `-V` as well for consistency.
- PACKAGE_BUGREPORT now also includes link to GitHub issues.

Bug Fixes:
- Fix #39: In libunbound, leftover logfile is close()d unpredictably.
- Fix for #24: Fix abort due to scan of auth zone masters using old
  address from previous scan.
- Fix to omit RRSIGs from addition to the ipset.
- Fix to make unbound-control with ipset, remove unused variable,
  use unsigned type because of comparison, and assign null instead
  of compare with it. Remade lex and yacc output.
- make depend
- Added documentation to the ipset files (for doxygen output).
- Fix python dict reference and double free in config.
- Fix memleak in unit test, reported from the clang 8.0 static analyzer.
- For #45, check that 127.0.0.1 and ::1 are not used in unbound.conf
  when do-not-query-localhost is turned on, or at default on,
  unbound-checkconf prints a warning if it is found in forward-addr or
  stub-addr statements.
- Fix for possible assertion failure when answering respip CNAME from
  cache.
- Fix in respip addrtree selection. Absence of addr_tree_init_parents()
  call made it impossible to go up the tree when the matching netmask is
  too specific.
- Fix #48: Unbound returns additional records on NODATA response,
  if minimal-responses is enabled, also the additional for negative
  responses is removed.
- Fix #49: Set no renegotiation on the SSL context to stop client
  session renegotiation.
- Fix question section mismatch in local zone redirect.
- Add verbose log message when auth zone file is written, at level 4.
- Add hex print of trust anchor pointer to trust anchor file temp
  name to make it unique, for libunbound created multiple contexts.
- For #52 #53, second context does not close logfile override.
- Fix #52 #53, fix for example fail program.
- Fix to return after failed auth zone http chunk write.
- Fix to remove unused test for task_probe existance.
- Fix to timeval_add for remaining second in microseconds.
- Check repinfo in worker_handle_request, if null, drop it.
- Generate configlexer with newer flex.
- Fix warning for unused variable for compilation without systemd.
- Fix #59, when compiled with systemd support check that we can properly
  communicate with systemd through the `NOTIFY_SOCKET`.
- iana portlist updated.
- Fix autotrust temp file uniqueness windows compile.
- avoid warning about upcast on 32bit systems for autotrust.
- escape commandline contents for -V.
- Fix character buffer size in ub_ctx_hosts.
- Option -V prints if TCP fastopen is available.
- Fix unittest valgrind false positive uninitialised value report,
  where if gcc 9.1.1 uses -O2 (but not -O1) then valgrind 3.15.0
  issues an uninitialised value for the token buffer at the str2wire.c
  rrinternal_get_owner() strcmp with the '@' value. Rewritten to use
  straight character comparisons removes the false positive. Also
  valgrinds --expensive-definedness-checks=yes can stop this false
  positive.
- Please doxygen's parser for "@" occurrence in doxygen comment.
- Fixup contrib/fastrpz.patch
- Remove warning about unknown cast-function-type warning pragma.
- Document limitation of pidfile removal outside of chroot directory.
- Fix log_dns_msg to log irrespective of minimal responses config.
- Fix that pkg-config is setup before --enable-systemd needs it.

Best regards, Wouter

1.9.3 failed to link on Solaris with Oracle Developer Studio with this
output:

ld: fatal: soname option (-h, --soname) is incompatible with building a
dynamic executable
ld: fatal: flags processing errors

It seems like this issue: https://gitlab.haskell.org/ghc/ghc/issues/4973

Is is possible to fix?

27.08.2019 14:22, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared flag
could fix it.

That stops unbound from building the libunbound.so dynamic library. The
static lib is still built, and could be used if you wanted to. The
unbound server binary and commandline tools are then built when it
continues the build process. It also links like normal with dynamic
libraries, so I think it should be (relatively) harmless to add to the
configure options.

Or, from the link you cite, switch to either gcc (with its ld), or to
solaris 11. The commandline switches that it complains about, are
created by libtool, so, instead, upgradeing to a different version of
libtool, installing that, autoreconf, and then configure may result in a
different build process (if that libtool supports the build system).

Best regards, Wouter

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared flag
could fix it.

But I require shared library too.

That stops unbound from building the libunbound.so dynamic library. The
static lib is still built, and could be used if you wanted to. The
unbound server binary and commandline tools are then built when it
continues the build process. It also links like normal with dynamic
libraries, so I think it should be (relatively) harmless to add to the
configure options.

Or, from the link you cite, switch to either gcc (with its ld), or to

GCC produces extremely unefficient code on SPARC and GCC stop support
SPARC starting from GCC 8 or 9. Yes, I can successfully build with GCC,
but code is extremely slow. Whenever compiler options or whatever.

solaris 11. The commandline switches that it complains about, are

Solaris 11 does not support SPARC-IV+ CPUs.

created by libtool, so, instead, upgradeing to a different version of
libtool, installing that, autoreconf, and then configure may result in a
different build process (if that libtool supports the build system).

Best regards, Wouter

All options is unacceptable, Wouter. So, I can fix it by myself, of
course...

Hi Yuri,

Another option, if your system has a specific version of libtool for it,
is to specify the libtool version specificaly on the configure line,
like this ./configure libtool=/usr/bin/libtool (or point to another
location or version of libtool). Then it uses that libtool for dynamic
library linking, and if that passes the right options, things could
start to work.

Best regards, Wouter

Also, one old known issue. Solaris stops supporting static linking
approx. starting from 2008. They just simple remove all *.a libraries
from system. Completely. So, static libs is meaningless on Solaris. Only
shared, only hardcore. (Solaris 11 too)

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Same shame, Wouter:

/usr/local/lib/libevent.so -lsendfile -lrt -lsocket -lnsl -lcrypto -lmd
-pthreads -mt -R/usr/local/lib -R/usr/local/lib -R/opt/csw/lib
gmake: *** [Makefile:335: unbound-control] Error 2
ld: fatal: soname option (-h, --soname) is incompatible with building a
dynamic executable
ld: fatal: flags processing errors
postopt: error: ld failed to link the binary

Does not help.

27.08.2019 21:24, Wouter Wijngaards via Unbound-users пишет:

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared flag
could fix it.

Tried with same error:

nsport.o outside_network.o ub_event.o keyraw.o sbuffer.o wire2str.o
parse.o parseutil.o rrdef.o str2wire.o explicit_bzero.o reallocarray.o
arc4random.o arc4random_uniform.o arc4_lock.o getentropy_solaris.o
strsep.o -L/opt/csw/lib/64 -L/opt/csw/lib -L/usr/local/lib -lssl
/usr/local/lib/libevent.so -lsendfile -lrt -lsocket -lnsl -lcrypto -lmd
-pthreads -mt -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath
-Wl,/usr/local/lib -Wl,-rpath -Wl,/opt/csw/lib
gmake: *** [Makefile:335: unbound-control] Error 2
gmake: *** [Makefile:332: unbound-checkconf] Error 2
ld: fatal: soname option (-h, --soname) is incompatible with building a
dynamic executable
ld: fatal: flags processing errors
postopt: error: ld failed to link the binary
gmake: *** [Makefile:329: unbound] Error 2

Static library built, but no one executable linked.

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

You could edit the CFLAGS, CPPFLAGS in the Makefile to try different
options, or enter the commandline by hand ('#' makes comments in the
Makefile, or copy to a backup file so you can try different changes).
Try to remove the '-pthread', because there is an 'h' in that and
solaris has a different threading model (the '-mt' option enables the
solaris threading I believe). Maybe the '/usr/local/lib/libevent.so'
needs to change into '-levent' because citing the .so directly is a gcc
feature (I thought). Maybe there are other options that cause issues,
like warning options or the '-flto' option (disabled with --disable-flto
for configure).

Best regards, Wouter

28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

Failed all object and binaries link call. Which one?

You could edit the CFLAGS, CPPFLAGS in the Makefile to try different
options, or enter the commandline by hand ('#' makes comments in the
Makefile, or copy to a backup file so you can try different changes).
Try to remove the '-pthread', because there is an 'h' in that and
solaris has a different threading model (the '-mt' option enables the
solaris threading I believe). Maybe the '/usr/local/lib/libevent.so'

Let's take a look on configure options:

./configure --prefix=/usr/local
--with-conf-file=/usr/local/etc/unbound/unbound.conf
--with-username=unbound --with-ssl=/opt/csw --with-libevent=/usr/local
--with-libexpat=/opt/csw --without-pthreads --with-solaris-threads
--enable-tfo-client --with-pidfile=/tmp/unbound.pid 'CFLAGS=-xO4 -m64
-xlinkopt=2' 'CPPFLAGS=-I/opt/csw/include' 'LDFLAGS=-m64
-L/opt/csw/lib/64 -xlinkopt=2'

Solaris support POSIX threads since at least Developer Studio 12.4, If I
remember correct. I've specified explicity use native, however, for
Unbound since 2014.

needs to change into '-levent' because citing the .so directly is a gcc
feature (I thought). Maybe there are other options that cause issues,
like warning options or the '-flto' option (disabled with --disable-flto
for configure).

LTO does not supported by SunPro, only -xlinkopt.

Yuri

Solaris 11.4 SPARC with Studio 12.6, linked to libev 4.24. The output from './unbound -V':

Thank you, Jaco, but this not solves my problem.

I have Solaris 10u13 with Oracle Developer Studio 12.6 on SPARC-IV+ (so,
incompatible with Solaris 11.x).

29.08.2019 13:29, Jaco Lesch via Unbound-users пишет:

28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared
flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link
fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

Failed all object and binaries link call. Which one?

You could edit the CFLAGS, CPPFLAGS in the Makefile to try different
options, or enter the commandline by hand ('#' makes comments in the
Makefile, or copy to a backup file so you can try different changes).
Try to remove the '-pthread', because there is an 'h' in that and
solaris has a different threading model (the '-mt' option enables the
solaris threading I believe). Maybe the '/usr/local/lib/libevent.so'

Let's take a look on configure options:

./configure --prefix=/usr/local
--with-conf-file=/usr/local/etc/unbound/unbound.conf
--with-username=unbound --with-ssl=/opt/csw --with-libevent=/usr/local
--with-libexpat=/opt/csw --without-pthreads --with-solaris-threads
--enable-tfo-client --with-pidfile=/tmp/unbound.pid 'CFLAGS=-xO4 -m64
-xlinkopt=2' 'CPPFLAGS=-I/opt/csw/include' 'LDFLAGS=-m64
-L/opt/csw/lib/64 -xlinkopt=2'

Solaris support POSIX threads since at least Developer Studio 12.4, If I
remember correct. I've specified explicity use native, however, for
Unbound since 2014.

needs to change into '-levent' because citing the .so directly is a gcc
feature (I thought). Maybe there are other options that cause issues,
like warning options or the '-flto' option (disabled with
--disable-flto
for configure).

LTO does not supported by SunPro, only -xlinkopt.

Best regards, Wouter

nsport.o outside_network.o ub_event.o keyraw.o sbuffer.o wire2str.o
parse.o parseutil.o rrdef.o str2wire.o explicit_bzero.o reallocarray.o
arc4random.o arc4random_uniform.o arc4_lock.o getentropy_solaris.o
strsep.o -L/opt/csw/lib/64 -L/opt/csw/lib -L/usr/local/lib -lssl
/usr/local/lib/libevent.so -lsendfile -lrt -lsocket -lnsl -lcrypto
-lmd
-pthreads -mt -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath
-Wl,/usr/local/lib -Wl,-rpath -Wl,/opt/csw/lib
cc: postopt failed for unbound-checkconf
gmake: *** [Makefile:335: unbound-control] Error 2
gmake: *** [Makefile:332: unbound-checkconf] Error 2
ld: fatal: soname option (-h, --soname) is incompatible with
building a
dynamic executable
ld: fatal: flags processing errors
postopt: error: ld failed to link the binary
cc: postopt failed for unbound
gmake: *** [Makefile:329: unbound] Error 2

Static library built, but no one executable linked.

Yuri

From my side I was able to successfully compile Unbound 1.9.3 on
Solaris 11.4 SPARC with Studio 12.6, linked to libev 4.24. The output
from './unbound -V':
--------------------------------------------------------------------------------------

Version 1.9.3

Configure line: --prefix=/opt/local --libdir=/opt/local/lib/sparcv9
--sysconfdir=/etc --with-username=dnsadmin --with-libevent=/opt/local
--disable-gost --disable-ecdsa
Linked libs: libev 4.24 (it uses not obtainable), OpenSSL 1.0.2q 20
Nov 2018
Linked modules: dns64 respip validator iterator

BSD licensed, see LICENSE in source package for details.
Report bugs to unbound-bugs@nlnetlabs.nl or
https://github.com/NLnetLabs/unbound/issues
--------------------------------------------------------------------------------------

And I compiled it with the following settings:
--------------------------------------------------------------------------------------

CC="/opt/SunStudio/OracleDeveloperStudio12.6-solaris-sparc-bin/developerstudio12.6/bin/cc"

CFLAGS="-m64 -xO4 -Qoption cg -xregs=no%appl -W2,-xwrap_int
-xmemalign=16s"
CPPFLAGS="-I/opt/local/include"
LDFLAGS="-L/opt/local/lib/64"

./configure --prefix=/opt/local \
--libdir=/opt/local/lib/sparcv9 \
--sysconfdir=/etc \
--with-username=dnsadmin \
--with-libevent=/opt/local \
--disable-gost --disable-ecdsa
--------------------------------------------------------------------------------------

According the Studio manpage on cc, the "-mt" is used by default for
multithreaded code and the binary then links to
'/lib/64/libpthread.so.1'.

Yes, I know about it. Im using it in my own projects for years. But the
issue is not -mt, but -soname option.

Just take a look on my configure more closely:

./configure --prefix=/usr/local
--with-conf-file=/usr/local/etc/unbound/unbound.conf
--with-username=unbound --with-ssl=/opt/csw --with-libevent=/usr/local
--with-libexpat=/opt/csw --without-pthreads --with-solaris-threads
--enable-tfo-client --with-pidfile=/tmp/unbound.pid 'CFLAGS=-xO4 -m64
-xlinkopt=2' 'CPPFLAGS=-I/opt/csw/include' 'LDFLAGS=-m64
-L/opt/csw/lib/64 -xlinkopt=2'

AFAIK, --without-pthreads --with-solaris-threads should set
thread-related flags correctly, right?

Hello Jaco,

why do you disable ECDSA? I would not recommend to do that.
You will not only be unable to validate my domain without ECDSA
but anything under br, ch, cz, li, md, nu and sk.

Andreas

Hi Yuri,

Thank you, Jaco, but this not solves my problem.

I have Solaris 10u13 with Oracle Developer Studio 12.6 on SPARC-IV+ (so,
incompatible with Solaris 11.x).

29.08.2019 13:29, Jaco Lesch via Unbound-users пишет:

28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared
flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link
fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

Failed all object and binaries link call. Which one?

The commandline I need is just before the part that you copy and pasted,
and I guess about 20 lines more would help me. That probably also
includes another commandline before it, or even a non-failure line, but
that's not a problem.

Your configure options look nice. The "--without-pthreads
--with-solaris-threads" part should be okay, but on the CFLAGS there
seems to be -pthread -mt. This is weird. The -pthread should not be
there, I think. Could you re-run configure, then when it is done edit
the Makefile and remove the -pthread from the Makefile and see if that
compiles?

From the code, it looks like the -pthread could be from some pkg-config
imported flags, but there does not seem to be an obvious candidate that
is importing flags. The ax_pthread code, tries to do the -pthread -mt
option, and that could be the culprit - it does not distinguish between
solaris 11 and solaris 10 for the -pthread flag and sunworkshop. But
you disabled that, in the configure line you pasted. This is weird.
And perhaps the way to solve this (if the compile without -pthread
passes, then this debug could be useful) is to look at the configure
output for threading stuff and the config.log, to take a look and see
what is wrong there.

Best regards, Wouter

30.08.2019 13:52, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

Thank you, Jaco, but this not solves my problem.

I have Solaris 10u13 with Oracle Developer Studio 12.6 on SPARC-IV+ (so,
incompatible with Solaris 11.x).

29.08.2019 13:29, Jaco Lesch via Unbound-users пишет:

28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared
flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link
fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

Failed all object and binaries link call. Which one?

The commandline I need is just before the part that you copy and pasted,
and I guess about 20 lines more would help me. That probably also
includes another commandline before it, or even a non-failure line, but
that's not a problem.

Your configure options look nice. The "--without-pthreads
--with-solaris-threads" part should be okay, but on the CFLAGS there
seems to be -pthread -mt. This is weird. The -pthread should not be
there, I think. Could you re-run configure, then when it is done edit
the Makefile and remove the -pthread from the Makefile and see if that
compiles?

Yes, this weird. Ever Dev Strudio accepts GCC options (most of all),
-pthread should be -lthread in LDFLAGS and -mt/-mt=yes in CFLAGS.

Sure, will play around with it.

30.08.2019 13:52, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

Thank you, Jaco, but this not solves my problem.

I have Solaris 10u13 with Oracle Developer Studio 12.6 on SPARC-IV+ (so,
incompatible with Solaris 11.x).

29.08.2019 13:29, Jaco Lesch via Unbound-users пишет:

28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

27.08.2019 21:22, Yuri пишет:

27.08.2019 21:17, Wouter Wijngaards via Unbound-users пишет:

Hi Yuri,

If that is any similar to yours, the ./configure --disable-shared
flag
could fix it.

Tried with same error:

It looks like the flag makes the library build pass, but this link
fails
because of (what may also be the first error) unrecognised options.

Can you give the full commandline that failed, and also a couple before
it (the libtool invocation, and then the compiler and linker lines).
The flags on it, we can try to change them to see which one is the
problem. Something that looks like -...h... is what I guess from the
link you sent.

Failed all object and binaries link call. Which one?

The commandline I need is just before the part that you copy and pasted,
and I guess about 20 lines more would help me. That probably also
includes another commandline before it, or even a non-failure line, but
that's not a problem.

libtool: compile: /bin/cc -I. -I/opt/csw/include -I/opt/csw/include
-I/usr/local/include -I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2
-xc99 -mt -c libunbound/libworker.c -o libworker.o >/dev/null 2>&1
./libtool --tag=CC --mode=compile /bin/cc -I. -I/opt/csw/include
-I/opt/csw/include -I/usr/local/include -I/opt/csw/include -DSRCDIR=.
-xO4 -m64 -xlinkopt=2 -xc99 -mt -o ub_event_pluggable.lo -c
util/ub_event_pluggable.c
libtool: compile: /bin/cc -I. -I/opt/csw/include -I/opt/csw/include
-I/usr/local/include -I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2
-xc99 -mt -c util/ub_event_pluggable.c -KPIC -DPIC -o
.libs/ub_event_pluggable.o
"./util/log.h", line 75: warning: attribute "format" is unknown, ignored
"./util/log.h", line 131: warning: attribute "format" is unknown, ignored
"./util/log.h", line 138: warning: attribute "format" is unknown, ignored
"./util/log.h", line 145: warning: attribute "format" is unknown, ignored
"./util/log.h", line 161: warning: attribute "format" is unknown, ignored
"./util/log.h", line 168: warning: attribute "format" is unknown, ignored
"./util/log.h", line 184: warning: attribute "format" is unknown, ignored
libtool: compile: /bin/cc -I. -I/opt/csw/include -I/opt/csw/include
-I/usr/local/include -I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2
-xc99 -mt -c util/ub_event_pluggable.c -o ub_event_pluggable.o

/dev/null 2>&1

./libtool --tag=CC --mode=link /bin/cc -R/opt/csw/lib -R/usr/local/lib
-I. -I/opt/csw/include -I/opt/csw/include -I/usr/local/include
-I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2 -xc99 -mt -m64
-L/opt/csw/lib/64 -xlinkopt=2 -L/opt/csw/lib -L/usr/local/lib
-L/opt/csw/lib -version-info 9:3:1 -no-undefined -export-symbols
./libunbound/ubsyms.def -o libunbound.la context.lo libunbound.lo
libworker.lo ub_event_pluggable.lo dns.lo infra.lo rrset.lo dname.lo
msgencode.lo as112.lo msgparse.lo msgreply.lo packed_rrset.lo
iterator.lo iter_delegpt.lo iter_donotq.lo iter_fwd.lo iter_hints.lo
iter_priv.lo iter_resptype.lo iter_scrub.lo iter_utils.lo localzone.lo
mesh.lo modstack.lo view.lo outbound_list.lo alloc.lo config_file.lo
configlexer.lo configparser.lo fptr_wlist.lo edns.lo locks.lo log.lo
mini_event.lo module.lo net_help.lo random.lo rbtree.lo regional.lo
rtt.lo dnstree.lo lookup3.lo lruhash.lo slabhash.lo tcp_conn_limit.lo
timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo
validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo
val_nsec.lo val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo
cachedb.lo redis.lo authzone.lo respip.lo netevent.lo
listen_dnsport.lo outside_network.lo keyraw.lo sbuffer.lo wire2str.lo
parse.lo parseutil.lo rrdef.lo str2wire.lo explicit_bzero.lo
reallocarray.lo arc4random.lo arc4random_uniform.lo arc4_lock.lo
getentropy_solaris.lo strsep.lo -rpath /usr/local/lib -lssl -lrt -levent
-lrt -lsocket -lnsl -lcrypto -lmd
libtool: link: echo "{ global:" > .libs/libunbound.so.8.1.3.exp
libtool: link: cat ./libunbound/ubsyms.def | /opt/csw/gnu/sed -e
"s/\(.*\)/\1;/" >> .libs/libunbound.so.8.1.3.exp
libtool: link: echo "local: *; };" >> .libs/libunbound.so.8.1.3.exp
libtool: link: /bin/cc -G -z defs -M .libs/libunbound.so.8.1.3.exp -h
libunbound.so.8 -o .libs/libunbound.so.8.1.3 .libs/context.o
.libs/libunbound.o .libs/libworker.o .libs/ub_event_pluggable.o
.libs/dns.o .libs/infra.o .libs/rrset.o .libs/dname.o .libs/msgencode.o
.libs/as112.o .libs/msgparse.o .libs/msgreply.o .libs/packed_rrset.o
.libs/iterator.o .libs/iter_delegpt.o .libs/iter_donotq.o
.libs/iter_fwd.o .libs/iter_hints.o .libs/iter_priv.o
.libs/iter_resptype.o .libs/iter_scrub.o .libs/iter_utils.o
.libs/localzone.o .libs/mesh.o .libs/modstack.o .libs/view.o
.libs/outbound_list.o .libs/alloc.o .libs/config_file.o
.libs/configlexer.o .libs/configparser.o .libs/fptr_wlist.o .libs/edns.o
.libs/locks.o .libs/log.o .libs/mini_event.o .libs/module.o
.libs/net_help.o .libs/random.o .libs/rbtree.o .libs/regional.o
.libs/rtt.o .libs/dnstree.o .libs/lookup3.o .libs/lruhash.o
.libs/slabhash.o .libs/tcp_conn_limit.o .libs/timehist.o .libs/tube.o
.libs/winsock_event.o .libs/autotrust.o .libs/val_anchor.o
.libs/validator.o .libs/val_kcache.o .libs/val_kentry.o .libs/val_neg.o
.libs/val_nsec3.o .libs/val_nsec.o .libs/val_secalgo.o
.libs/val_sigcrypt.o .libs/val_utils.o .libs/dns64.o .libs/cachedb.o
.libs/redis.o .libs/authzone.o .libs/respip.o .libs/netevent.o
.libs/listen_dnsport.o .libs/outside_network.o .libs/keyraw.o
.libs/sbuffer.o .libs/wire2str.o .libs/parse.o .libs/parseutil.o
.libs/rrdef.o .libs/str2wire.o .libs/explicit_bzero.o
.libs/reallocarray.o .libs/arc4random.o .libs/arc4random_uniform.o
.libs/arc4_lock.o .libs/getentropy_solaris.o .libs/strsep.o
-R/usr/local/lib -R/usr/local/lib -R/opt/csw/lib -L/opt/csw/lib/64
-L/opt/csw/lib -L/usr/local/lib -lssl /usr/local/lib/libevent.so
-lsendfile -lrt -lsocket -lnsl -lcrypto -lmd -lc -m64 -mt -m64 -mt
-pthreads
ld: warning: soname option (-h, --soname) appears more than once, first
setting taken
libtool: link: rm -f .libs/libunbound.so.8.1.3.exp
libtool: link: (cd ".libs" && rm -f "libunbound.so.8" && ln -s
"libunbound.so.8.1.3" "libunbound.so.8")
libtool: link: (cd ".libs" && rm -f "libunbound.so" && ln -s
"libunbound.so.8.1.3" "libunbound.so")
libtool: link: /opt/csw/gnu/ar cru .libs/libunbound.a context.o
libunbound.o libworker.o ub_event_pluggable.o dns.o infra.o rrset.o
dname.o msgencode.o as112.o msgparse.o msgreply.o packed_rrset.o
iterator.o iter_delegpt.o iter_donotq.o iter_fwd.o iter_hints.o
iter_priv.o iter_resptype.o iter_scrub.o iter_utils.o localzone.o mesh.o
modstack.o view.o outbound_list.o alloc.o config_file.o configlexer.o
configparser.o fptr_wlist.o edns.o locks.o log.o mini_event.o module.o
net_help.o random.o rbtree.o regional.o rtt.o dnstree.o lookup3.o
lruhash.o slabhash.o tcp_conn_limit.o timehist.o tube.o winsock_event.o
autotrust.o val_anchor.o validator.o val_kcache.o val_kentry.o val_neg.o
val_nsec3.o val_nsec.o val_secalgo.o val_sigcrypt.o val_utils.o dns64.o
cachedb.o redis.o authzone.o respip.o netevent.o listen_dnsport.o
outside_network.o keyraw.o sbuffer.o wire2str.o parse.o parseutil.o
rrdef.o str2wire.o explicit_bzero.o reallocarray.o arc4random.o
arc4random_uniform.o arc4_lock.o getentropy_solaris.o strsep.o
libtool: link: ranlib .libs/libunbound.a
libtool: link: ( cd ".libs" && rm -f "libunbound.la" && ln -s
"../libunbound.la" "libunbound.la" )
./libtool --tag=CC --mode=link /bin/cc -R/opt/csw/lib -R/usr/local/lib
-I. -I/opt/csw/include -I/opt/csw/include -I/usr/local/include
-I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2 -xc99 -mt -m64
-L/opt/csw/lib/64 -xlinkopt=2 -L/opt/csw/lib -L/usr/local/lib
-L/opt/csw/lib -o unbound acl_list.lo cachedump.lo daemon.lo shm_main.lo
remote.lo stats.lo unbound.lo worker.lo dns.lo infra.lo rrset.lo
dname.lo msgencode.lo as112.lo msgparse.lo msgreply.lo packed_rrset.lo
iterator.lo iter_delegpt.lo iter_donotq.lo iter_fwd.lo iter_hints.lo
iter_priv.lo iter_resptype.lo iter_scrub.lo iter_utils.lo localzone.lo
mesh.lo modstack.lo view.lo outbound_list.lo alloc.lo config_file.lo
configlexer.lo configparser.lo fptr_wlist.lo edns.lo locks.lo log.lo
mini_event.lo module.lo net_help.lo random.lo rbtree.lo regional.lo
rtt.lo dnstree.lo lookup3.lo lruhash.lo slabhash.lo tcp_conn_limit.lo
timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo
validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo
val_nsec.lo val_secalgo.lo val_sigcrypt.lo val_utils.lo dns64.lo
cachedb.lo redis.lo authzone.lo respip.lo netevent.lo
listen_dnsport.lo outside_network.lo ub_event.lo keyraw.lo sbuffer.lo
wire2str.lo parse.lo parseutil.lo rrdef.lo str2wire.lo explicit_bzero.lo
reallocarray.lo arc4random.lo arc4random_uniform.lo arc4_lock.lo
getentropy_solaris.lo strsep.lo -lssl -lrt -levent -lrt -lsocket
-lnsl -lcrypto -lmd
libtool: link: /bin/cc -I. -I/opt/csw/include -I/opt/csw/include
-I/usr/local/include -I/opt/csw/include -DSRCDIR=. -xO4 -m64 -xlinkopt=2
-xc99 -mt -m64 -xlinkopt=2 -o unbound .libs/acl_list.o .libs/cachedump.o
.libs/daemon.o .libs/shm_main.o .libs/remote.o .libs/stats.o
.libs/unbound.o .libs/worker.o .libs/dns.o .libs/infra.o .libs/rrset.o
.libs/dname.o .libs/msgencode.o .libs/as112.o .libs/msgparse.o
.libs/msgreply.o .libs/packed_rrset.o .libs/iterator.o
.libs/iter_delegpt.o .libs/iter_donotq.o .libs/iter_fwd.o
.libs/iter_hints.o .libs/iter_priv.o .libs/iter_resptype.o
.libs/iter_scrub.o .libs/iter_utils.o .libs/localzone.o .libs/mesh.o
.libs/modstack.o .libs/view.o .libs/outbound_list.o .libs/alloc.o
.libs/config_file.o .libs/configlexer.o .libs/configparser.o
.libs/fptr_wlist.o .libs/edns.o .libs/locks.o .libs/log.o
.libs/mini_event.o .libs/module.o .libs/net_help.o .libs/random.o
.libs/rbtree.o .libs/regional.o .libs/rtt.o .libs/dnstree.o
.libs/lookup3.o .libs/lruhash.o .libs/slabhash.o .libs/tcp_conn_limit.o
.libs/timehist.o .libs/tube.o .libs/winsock_event.o .libs/autotrust.o
.libs/val_anchor.o .libs/validator.o .libs/val_kcache.o
.libs/val_kentry.o .libs/val_neg.o .libs/val_nsec3.o .libs/val_nsec.o
.libs/val_secalgo.o .libs/val_sigcrypt.o .libs/val_utils.o .libs/dns64.o
.libs/cachedb.o .libs/redis.o .libs/authzone.o .libs/respip.o
.libs/netevent.o .libs/listen_dnsport.o .libs/outside_network.o
.libs/ub_event.o .libs/keyraw.o .libs/sbuffer.o .libs/wire2str.o
.libs/parse.o .libs/parseutil.o .libs/rrdef.o .libs/str2wire.o
.libs/explicit_bzero.o .libs/reallocarray.o .libs/arc4random.o
.libs/arc4random_uniform.o .libs/arc4_lock.o .libs/getentropy_solaris.o
.libs/strsep.o -L/opt/csw/lib/64 -L/opt/csw/lib -L/usr/local/lib -lssl
/usr/local/lib/libevent.so -lsendfile -lrt -lsocket -lnsl -lcrypto -lmd
-pthreads -mt -R/usr/local/lib -R/usr/local/lib -R/opt/csw/lib
ld: fatal: soname option (-h, --soname) is incompatible with building a
dynamic executable
ld: fatal: flags processing errors
postopt: error: ld failed to link the binary
gmake: *** [Makefile:329: unbound] Error 2

Your configure options look nice. The "--without-pthreads
--with-solaris-threads" part should be okay, but on the CFLAGS there
seems to be -pthread -mt. This is weird. The -pthread should not be
there, I think. Could you re-run configure, then when it is done edit
the Makefile and remove the -pthread from the Makefile and see if that
compiles?

From the code, it looks like the -pthread could be from some pkg-config
imported flags, but there does not seem to be an obvious candidate that
is importing flags. The ax_pthread code, tries to do the -pthread -mt
option, and that could be the culprit - it does not distinguish between
solaris 11 and solaris 10 for the -pthread flag and sunworkshop. But
you disabled that, in the configure line you pasted. This is weird.
And perhaps the way to solve this (if the compile without -pthread
passes, then this debug could be useful) is to look at the configure
output for threading stuff and the config.log, to take a look and see
what is wrong there.

Attached compressed config.log

(attachments)

config.zip (37.4 KB)