Raspberry pi 使用Raspbian Buster在新RaspberryPi 4上构建Redis失败
在最新的Raspberry pi 使用Raspbian Buster在新RaspberryPi 4上构建Redis失败,raspberry-pi,raspbian,debian-buster,Raspberry Pi,Raspbian,Debian Buster,在最新的树莓皮4上运行的树莓buster上尝试构建redis stable(应为5.0.5)时,我遇到链接器错误 make通过这些动作,然后失败,原因如下 链接redis服务器 /usr/bin/ld:networking.o:在函数“createClient”中: /home/pi/redis stable/src/networking.c:109:未定义对“原子”的引用 collect2:错误:ld返回了1个退出状态 make[1]:***[Makefile:219:redis服务器]错误1
树莓皮4
上运行的树莓buster
上尝试构建redis stable
(应为5.0.5)时,我遇到链接器错误
make
通过这些动作,然后失败,原因如下
链接redis服务器
/usr/bin/ld:networking.o:在函数“createClient”中:
/home/pi/redis stable/src/networking.c:109:未定义对“原子”的引用
collect2:错误:ld返回了1个退出状态
make[1]:***[Makefile:219:redis服务器]错误1
make[1]:离开目录“/home/pi/redis stable/src”
make:**[Makefile:6:all]错误2
我是否丢失了某个设置?通过仅将编译器标志
-latomic
添加到redis服务器,我成功地运行了所有测试
# redis-server
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -latomic
编辑:这是使用Redis 5.0.5时运行的我可以通过在haproxy中添加编译器标志-latomic来运行
[错误]
/home/pi/CQ/LB/haproxy-1.8.21/src/proto_http.c:12152: undefined reference to `__atomic_fetch_add_8'
..........................................
..........................................
/usr/bin/ld: src/proto_http.o:/home/pi/CQ/LB/haproxy-1.8.21/src/proto_http.c:4200: more undefined references to `__atomic_fetch_add_8' follow
/usr/bin/ld: src/time.o: in function `tv_update_date':
/home/pi/CQ/LB/haproxy-1.8.21/src/time.c:229: undefined reference to `__atomic_compare_exchange_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:914: haproxy] error 1
[加入]
913 haproxy: $(OPTIONS_OBJS) $(EBTREE_OBJS) $(OBJS)
914 $(LD) $(LDFLAGS) -o $@ $^ $(LDOPTS) -latomic
尝试将-latomic
添加到编译器标志中。此处存在相同问题。你找到解决办法了吗?cheers@JVLobo我在src文件夹中的Makefile中添加了-latomic命令,这使构建得以进行,但测试从未通过。它们看起来像是超时问题。。。在我再次运行测试之前,我正在尝试设置一个比我的廉价SD卡更健壮的存储介质。