Skip to content

[Raspberry Pi] 5.0.4 Build fail : undefined reference to __atomic_fetch_add_8' #6275

@AngusP

Description

@AngusP

On a Raspberry Pi 3 v1.2, and also on I think a Zero W v1.1, but probably all RPis running Raspbian 10 'Buster', the build fails to link atomic -- undefined reference to __atomic_fetch_add_8'

uname: Linux raspberrypi 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l GNU/Linux`
gcc --version: gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

This is easily fixed by 'hacking' a -latomic in to the build flags, though I'm not too familiar with the Makefile and where best to add such a link without breaking stuff, so haven't PR'd

Redis 5.0.4
    ...
    CC t_stream.o
    CC localtime.o
    CC lolwut.o
    CC lolwut5.o
    LINK redis-server
/usr/bin/ld: networking.o: in function `createClient':
/home/pi/Downloads/redis-5.0.4/src/networking.c:108: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:219: redis-server] Error 1
make[1]: Leaving directory '/home/pi/Downloads/redis-5.0.4/src'
make: *** [Makefile:9: install] Error 2

This seems similar to #5550

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions