antirez / stonky

Stock market Telegram bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error compiling on raspberry 3B

thiago-scherrer opened this issue · comments

Hello!

I'm really enjoying the project!
I tried to compile the stonky on Pi3 B and had some problems:

Hardware/OS:

Raspberry Pi 3 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
armv7l 

Error

cc -g -ggdb -O2 -Wall -W -std=c11 \
	canvas.c cJSON.c sds.c stonky.c \
	-o stonky -lpthread -lcurl -lsqlite3
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `fortuneThread':
/home/stonky/stonky/stonky.c:3058: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:3059: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `cvThread':
/home/stonky/stonky/stonky.c:2874: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowPortfolioRequest':
/home/stonky/stonky/stonky.c:2250: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2251: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botHandleShowProfitLossRequest':
/home/stonky/stonky/stonky.c:2402: undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `botUpdateActiveChannels':
/home/stonky/stonky/stonky.c:2586: undefined reference to `__atomic_load_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2589: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2594: undefined reference to `__atomic_store_8'
/usr/bin/ld: /home/stonky/stonky/stonky.c:2595: undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/cc9jGxHR.o: in function `broadcastBigMovers':
/home/stonky/stonky/stonky.c:2957: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:4: stonky] Error 1```

Possible solution

I managed to solve the problem by installing:

apt install libatomic-ops-dev

And adding the flag to the compilation:

-latomic

Thanks!

Thanks! Fixed, hopefully.