Re: 8.2 openssl-1.1.1s undefined reference to `__atomic_is_lock_free'

Riccardo Mottola <[email protected]>
Newsgroups gmane.os.netbsd.ports.sparc
Message-ID <[email protected]>
Hi,

Riccardo Mottola wrote:
> ${LDCMD:-cc} -pthread -Wa,--noexecstack -O2 -D_FORTIFY_SOURCE=2
> -I/usr/include -L.  -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib \
>         -o test/chacha_internal_test test/chacha_internal_test.o \
>          test/libtestutil.a libcrypto.a -pthread
> libcrypto.a(threads_pthread.o): In function `CRYPTO_atomic_add':
> threads_pthread.c:(.text+0x1e8): undefined reference to
> `__atomic_is_lock_free'
> gmake[1]: *** [Makefile:7030: test/asn1_internal_test] Error 1

looking back, we had the same issuein 2020...

The solution proposed by ROmain was to comment out this code:

int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
#if 0
# if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL)
    if (__atomic_is_lock_free(sizeof(*val), val)) {
        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
        return 1;
    }
# endif
#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.