SBFspot on Synology

Topics: 1. General
Jul 12, 2016 at 5:42 PM
When compiling SBfspot on a Synolgy NAS 214+ I got the erro here below.
Can anyone please help me to solve the problem?
Thanks!

root@AlfaBeta:/volume1/SMA# make install_mysql
test -d bin/Release_MySQL || mkdir -p bin/Release_MySQL
test -d obj/Release_MySQL || mkdir -p obj/Release_MySQL
g++ -Wall -O2 -DUSE_MYSQL -c boost_ext.cpp -o obj/Release_MySQL/boost_ext.o
In file included from boost_ext.cpp:35:0:
boost_ext.h:39:29: fatal error: boost/version.hpp: No such file or directory
#include <boost/version.hpp>
                         ^
compilation terminated.
makefile:215: recipe for target 'obj/Release_MySQL/boost_ext.o' failed
make: *** [obj/Release_MySQL/boost_ext.o] Error 1
Coordinator
Jul 12, 2016 at 10:32 PM
It looks like you didn't install BOOST libraries
sudo apt-get install libboost-all-dev
Jul 13, 2016 at 1:22 PM
Thank you for your help.
Looks like apt-get is also missing. How can I install this?

This is the error:
sudo apt-get install libboost-all-dev
sudo: apt-get: command not found

Btw, when replacing apt-get with wget, I got this:

sudo wget install libboost-all-dev
--2016-07-13 14:21:05-- http://install/ Resolving install... failed: Name or service not known.
wget: unable to resolve host address 'install'
--2016-07-13 14:21:05-- http://libboost-all-dev/ Resolving libboost-all-dev... failed: Name or service not known.
wget: unable to resolve host address 'libboost-all-dev'
Coordinator
Jul 13, 2016 at 9:05 PM
A quick google search shows me you have to use ipkg on Synology NAS
sudo ipkg update
sudo ipkg install libboost-all-dev
Jul 15, 2016 at 11:05 AM
Thanks, this (and a lot of googling) helped me further.
Now I get this error:

SBFspot.cpp:2809: error: integer constant is too large for 'long' type

Has anyone an ideau how to solve it?
Coordinator
Jul 15, 2016 at 12:55 PM
What compiler version do you have?
gcc -v
Can you post the complete error message?
Jul 15, 2016 at 1:58 PM
Thank you, it is gcc version 4.2.3

In the meantime I was still playing aroubd to get SBFspot installed on my Synology-NAS (214+)
Now I got this error:

[root@AlfaBeta SMA]$ make
test -d bin/Release || mkdir -p bin/Release
test -d obj/Release || mkdir -p obj/Release
g++ -o bin/Release/SBFspot obj/Release/boost_ext.o obj/Release/misc.o obj/Release/strptime.o obj/Release/sunrise_sunset.o obj/Release/SBFNet.o obj/Release/Bluetooth.o obj/Release/CSVexport.o obj/Release/Ethernet.o obj/Release/EventData.o obj/Release/ArchData.o obj/Release/SBFspot.o obj/Release/TagDefs.o -s -lbluetooth -lboost_date_time -lboost_system -lpthread
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/libc.so.6 uses VFP register arguments, bin/Release/SBFspot does not
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /lib/libc.so.6
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to __default_sa_restorer_v2@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to
`__default_rt_sa_restorer_v2@GLIBC_PRIVATE' /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to __default_rt_sa_restorer_v1@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to
__default_sa_restorer_v1@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
make: *** [out_release] Error 1
Coordinator
Jul 15, 2016 at 9:46 PM
Explained in this thread and a possible fix:

1) backup the pthread libraries found in /opt/arm-none-linux-gnueabi/lib/ :
mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
2) Copy the pthread libraries found in /opt/lib
cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so
About ERROR: /lib/libc.so.6 uses VFP register arguments, bin/Release/SBFspot does not
the fix might be described here - You will need to edit the makefile
Use the -mfloat-abi=hard flag, and possibly -mfpu=vfp flag (see the gcc man page for other vfp variants that might be suitable).
Jul 17, 2016 at 3:07 PM
This helped me a little further.
Still these problems

[root@AlfaBeta SMA]$ make
test -d bin/Release || mkdir -p bin/Release
test -d obj/Release || mkdir -p obj/Release
g++ -o bin/Release/SBFspot obj/Release/boost_ext.o obj/Release/misc.o obj/Release/strptime.o obj/Release/sunrise_sunset.o obj/Release/SBFNet.o obj/Release/Bluetooth.o obj/Release/CSVexport.o obj/Release/Ethernet.o obj/Release/EventData.o obj/Release/ArchData.o obj/Release/SBFspot.o obj/Release/TagDefs.o -s -lbluetooth -lboost_date_time -lboost_system -lpthread
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so uses VFP register arguments, bin/Release/SBFspot does not
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /lib/libc.so.6 uses VFP register arguments, bin/Release/SBFspot does not
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: failed to merge target specific data of file /lib/libc.so.6
collect2: ld returned 1 exit status
make: *** [out_release] Error 1

I adjusted the make file and changed
CFLAGS = -Wall
into
CFLAGS = -O0 -g -Wall -I. -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=soft

I did not find a solution after 2 days of googling. Still needs help.
Coordinator
Jul 19, 2016 at 7:49 AM
Edited Jul 19, 2016 at 7:50 AM
Try without -lpthread for LIB variable (in makefile)
LIB = -lbluetooth -lboost_date_time -lboost_system
Leave CFLAGS = -Wall
Jul 22, 2016 at 9:26 AM
Nothing changed, still the same error
Coordinator
Jul 22, 2016 at 9:35 PM
I'm afraid I can't help you further...
There are a lot of forums where they're talking about ERROR: /lib/libc.so.6 uses VFP register arguments
Can't try the given solutions as I don't have a NAS