Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis build fails on new RaspberryPi 4 using Raspbian Buster

I am getting a linker error when trying to build redis-stable (should be 5.0.5) on raspbian buster running on the latest Raspberry Pi 4

make goes through the motions and then fails with the following

    LINK redis-server
/usr/bin/ld: networking.o: in function `createClient':
/home/pi/redis-stable/src/networking.c:109: 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/redis-stable/src'
make: *** [Makefile:6: all] Error 2

Am I missing a setting somewhere?

like image 854
sumitkm Avatar asked Oct 16 '22 13:10

sumitkm


1 Answers

I was able to get all the tests to run successfully by adding the compiler flag -latomic only to the redis-server

# redis-server                                                                                                                                                
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)                                                                                                                     
        $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -latomic

EDIT: This is with Redis 5.0.5

like image 186
cogle Avatar answered Oct 21 '22 04:10

cogle