atomic ops in heimdal: -latomic

Andrew Bartlett abartlet at
Tue Jun 13 02:24:11 UTC 2023

On Mon, 2023-06-12 at 13:06 +0300, Michael Tokarev via samba-technical
> Hi!
> Something changed - probably in Debian (where I build packages), and
> some stuff
> started failing, eg
> /usr/bin/ld: third_party/heimdal/lib/krb5/krcache.c.55.o: in function
> `krcc_get_principal':
> ./bin/default/../../third_party/heimdal/lib/krb5/krcache.c:1395:
> undefined reference to `__atomic_load_8'
> Apparently this now needs -latomic on the link line. I don't know yet
> why it ended up like this,
> but other projects which faced this same issue, just added -latomic
> in similar cases.

Any chance of building a configure test for waf to detect this? 

How do we know if we need this?

Once you have the test, it should just be a matter of adding a
dependency on 'atomic' in the right spot, on platforms that don't find
the library this will just be empty (eg ignored in the dep calcuation),
you don't need to do string manipulation in the subsystem declarations.

Andrew Bartlett

Andrew Bartlett (he/him)
Samba Team Member (since 2001)
Samba Team Lead      
Catalyst.Net Ltd

Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group

Samba Development and Support:

Catalyst IT - Expert Open Source Solutions

More information about the samba-technical mailing list