Unbound 1.9.3 released

Wouter Wijngaards wouter at nlnetlabs.nl
Fri Aug 30 07:52:08 UTC 2019

Hi Yuri,

On 29/08/2019 09:43, Yuri via Unbound-users wrote:
> 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 пишет:
>> On 8/28/19 18:49, Yuri via Unbound-users wrote:
>>> 28.08.2019 18:23, Wouter Wijngaards via Unbound-users пишет:
>>>> Hi Yuri,
>>>> On 27/08/2019 19:45, Yuri via Unbound-users wrote:
>>>>> 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

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

>>>> 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 at 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?
>> Hope this helps you with your problem.
>> Regards

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20190830/bcdcff79/attachment.bin>

More information about the Unbound-users mailing list