Discussion:
bind-9.12.2-P2 fails to compile with baffling undefined symbol issues
Dennis Clarke
2018-10-18 02:55:52 UTC
Permalink
This has me baffled :


/opt/developerstudio12.6/bin/c99 -mt -errfmt=error -erroff=%none
-errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc
-xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none
-xdebugformat=dwarf -xunroll=1 -xarch=sparc -I/usr/include/libxml2 -I
/usr/local/include -KPIC -o resolve \
resolve.o ../irs/libirs.a ../dns/libdns.a -lgss -lkrb5
../isccfg/libisccfg.a ../isc/libisc.a -L/usr/local/lib -R/usr/local/lib
-R/usr/local/lib -lcrypto -ldl -lnsl -lsocket -lscf -lrt -lpthread
-L/usr/lib -R/usr/lib -lxml2 -lz -lpthread -lm -lsocket -lnsl
-L/usr/local/lib -latomic
Undefined first referenced
symbol in file
_TG_atomic_fetch_add ../dns/libdns.a(tsig.o)
_TG_atomic_fetch_sub ../dns/libdns.a(tsig.o)
_TG_atomic_load ../dns/libdns.a(tsig.o)
_TG_atomic_compare_exchange_strong ../isc/libisc.a(rwlock.o)
_TG_atomic_store ../isc/libisc.a(stats.o)
ld: fatal: symbol referencing errors. No output written to resolve
gmake[2]: *** [Makefile:464: resolve] Error 2
gmake[2]: Leaving directory
'/usr/local/build/bind-9.12.2-P2_SunOS5.10_sparc64vii+.001/lib/samples'
gmake[1]: *** [Makefile:82: subdirs] Error 1
gmake[1]: Leaving directory
'/usr/local/build/bind-9.12.2-P2_SunOS5.10_sparc64vii+.001/lib'
gmake: *** [Makefile:88: subdirs] Error 1

There is no such thing as TG_atomic anywhere in any sources and there is
a small reference to it in the config.log :

"conftest.c", line 105: warning: implicit function declaration:
_TG_atomic_fetch_add
"conftest.c", line 101: warning: implicit function declaration:
_TG_atomic_fetch_add
_TG_atomic_fetch_add conftest.o


Something obvious here ??

Dennis
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-***@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users
Michał Kępień
2018-10-18 08:04:37 UTC
Permalink
Post by Dennis Clarke
/opt/developerstudio12.6/bin/c99 -mt -errfmt=error -erroff=%none
-errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc
-xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none
-xdebugformat=dwarf -xunroll=1 -xarch=sparc -I/usr/include/libxml2 -I
/usr/local/include -KPIC -o resolve \
resolve.o ../irs/libirs.a ../dns/libdns.a -lgss -lkrb5
../isccfg/libisccfg.a ../isc/libisc.a -L/usr/local/lib -R/usr/local/lib
-R/usr/local/lib -lcrypto -ldl -lnsl -lsocket -lscf -lrt -lpthread
-L/usr/lib -R/usr/lib -lxml2 -lz -lpthread -lm -lsocket -lnsl
-L/usr/local/lib -latomic
Undefined first referenced
symbol in file
_TG_atomic_fetch_add ../dns/libdns.a(tsig.o)
_TG_atomic_fetch_sub ../dns/libdns.a(tsig.o)
_TG_atomic_load ../dns/libdns.a(tsig.o)
_TG_atomic_compare_exchange_strong ../isc/libisc.a(rwlock.o)
_TG_atomic_store ../isc/libisc.a(stats.o)
ld: fatal: symbol referencing errors. No output written to resolve
gmake[2]: *** [Makefile:464: resolve] Error 2
gmake[2]: Leaving directory
'/usr/local/build/bind-9.12.2-P2_SunOS5.10_sparc64vii+.001/lib/samples'
gmake[1]: *** [Makefile:82: subdirs] Error 1
gmake[1]: Leaving directory
'/usr/local/build/bind-9.12.2-P2_SunOS5.10_sparc64vii+.001/lib'
gmake: *** [Makefile:88: subdirs] Error 1
This looks like an Oracle Developer Studio glitch related to C11 atomic
operations. To fix it, try fiddling around with the -xatomic compiler
option [1] and/or the -std compiler option and/or the CC environment
variable. To work around the problem, build BIND with --disable-atomic.
Note that atomic operations support is mandatory as of BIND 9.13.3.

[1] https://docs.oracle.com/cd/E60778_01/html/E60745/gqico.html
--
Best regards,
Michał Kępień
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-***@lists.isc.org
https://lists.isc.org/mail
Dennis Clarke
2018-10-18 14:22:29 UTC
Permalink
Post by Michał Kępień
This looks like an Oracle Developer Studio glitch related to C11 atomic
operations. To fix it, try fiddling around with the -xatomic compiler
option [1] and/or the -std compiler option and/or the CC environment
variable. To work around the problem, build BIND with --disable-atomic.
Note that atomic operations support is mandatory as of BIND 9.13.3.
[1]https://docs.oracle.com/cd/E60778_01/html/E60745/gqico.html
-- Best regards, Michał Kępień
Thank you for the hint. I had not ever seen this before with a build of
anything from isc however I had also recently switched build machines. I
had an older system which used a well patched Oracle Studio 12.4 release
as that thing supported old sparc units. When all the old sparc units
went away then so did the Oracle Studio 12.4 and here we are with 12.6
which seems to do ... odd things.

Could switch over whole hog to gcc of course.

I'll look into this "atomics" thingy. Thank you.

Dennis
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-***@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-u
Dennis Clarke
2018-10-18 15:40:24 UTC
Permalink
On 10/18/2018 04:04 AM, Michał Kępień wrote:
...
Post by Michał Kępień
Post by Dennis Clarke
-L/usr/local/lib -latomic
Undefined first referenced
symbol in file
_TG_atomic_fetch_add ../dns/libdns.a(tsig.o)
_TG_atomic_fetch_sub ../dns/libdns.a(tsig.o)
_TG_atomic_load ../dns/libdns.a(tsig.o)
_TG_atomic_compare_exchange_strong ../isc/libisc.a(rwlock.o)
_TG_atomic_store ../isc/libisc.a(stats.o)
ld: fatal: symbol referencing errors. No output written to resolve
...
Post by Michał Kępień
This looks like an Oracle Developer Studio glitch related to C11 atomic
operations. To fix it, try fiddling around with the -xatomic compiler
option [1] and/or the -std compiler option and/or the CC environment
variable. To work around the problem, build BIND with --disable-atomic.
Note that atomic operations support is mandatory as of BIND 9.13.3.
After talking with experts in the field I have learned that :

in Studio 12.6, stdatomic.h lives in
lib/compilers/include/cc/stdatomic.h and uses
those _TG_atomic_* intrinsics

Thus if one compiles a trivial test with -std=c11 we see :

#include <stdatomic.h>

int
main (void)
{
_Atomic int i;
atomic_store (&i, 0);
return 0;
}


No issues at all with -xatomic=studio -std=c11 however this is
impossible with c99.

So what is the minimum spec for ISC Bind? If the ISO/IEC 9899:2011
standard is minimum then perhaps there could be a notation somewhere
on the isc site for that.

Dennis Clarke
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-***@lists.isc.org
https://lists.i
Michał Kępień
2018-10-19 08:34:38 UTC
Permalink
Post by Dennis Clarke
So what is the minimum spec for ISC Bind? If the ISO/IEC 9899:2011
standard is minimum then perhaps there could be a notation somewhere
on the isc site for that.
Platform requirements are specified in the PLATFORMS file inside each
BIND source archive since BIND 9.13.1:

https://gitlab.isc.org/isc-projects/bind9/blob/master/PLATFORMS.md

If you have any comments about it, please open a GitLab issue.
--
Best regards,
Michał Kępień
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-***@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind
Loading...