Re: compiling adventures on Synology with DSM 4.2

1,534 views
Skip to first unread message

Stephen Collier

unread,
Mar 11, 2013, 1:16:36 AM3/11/13
to sma-bl...@googlegroups.com

Thanks for all this info. I'm rewriting the application at the moment and will add some of the things you have mentioned.


janus

unread,
Mar 14, 2013, 4:36:46 PM3/14/13
to sma-bl...@googlegroups.com
Hi,
i would prefer to set

export LD_LIBRARY_PATH=/opt/lib:/opt/lib/mysql

So you do not have to copy library araound and with an DMS upgrade you do not have to copy the libraries again.

I only use smatool with DMS 3.2 so i my be a little bit outdatet but one of the little things i had to do to compile was using perameter -L/opt/lib -L/opt/lib/mysql for compile time and set LD_LIBRARY_PATH.

Greetings

janus

Am Samstag, 9. März 2013 18:22:54 UTC+1 schrieb Koen Roggemans:
Hi all,

Since Synology DSM 4.2 now supports bluetooth by default, I thought it would be easy to install smatool in my nas and have the updates done every 5 minutes, rather then weekly trying to remember to do that with my laptop. So far the plan.

I share my experiences here in case someone wants to build upon them or one day, copy this info in the wiki.

Bluetooth is supported in DMS 4.2, so with a bluetooth usb dongel inserted, i can see my SMA when running hcitool scan.

Next step is to get smatool running. My synology has an ARM processor, so smatool needs to be compiled for that. The necessary tools for compiling are not installed by default on a Synology NAS.

To get that working:
At this point, make fails because of not finding mysqlclient libs; I solved that by changing -L/usr/lib to -L/opt/lib/mysql

Then makefile fails with following error messages:
/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'

I followed the advice on http://forum.synology.com/enu/viewtopic.php?f=90&t=30132 and solved the problem by 

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

To my joy, afther this the compiling process runs without error messages.

Running ./smatool fails with the error message: ./smatool: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
The libmysqlclient.so.15 file exists and lives in /opt/lib/mysql. I solved that errormessage by creating a symlink.
ln -s /opt/lib/mysql/libmysqlclient.so.15 /usr/lib/libmysqlclient.so.15

Running ./smatool again make it fail with a similar error message: ./smatool: error while loading shared libraries: libbluetooth.so.1: cannot open shared object file: No such file or directory
The libbluetooth.so.1 file exists and lives in /opt/lib. I solved that errormessage by creating a symlink.
ln -s /opt/lib/libbluetooth.so.1 /usr/lib/libbluetooth.so.1

And now ./smatool runs!




Koen Roggemans

unread,
Mar 15, 2013, 3:03:13 AM3/15/13
to sma-bl...@googlegroups.com
Yes, my fear is that after updating DMS, quite a bit of this work needs to be redone. I never looked closely in what disappears and what is moved arround when you update. 
I'll keep posted what breaks :-)

Koen Roggemans

unread,
Apr 10, 2013, 3:50:50 AM4/10/13
to sma-bl...@googlegroups.com
I'm using a Targus AC820EU which works fine. (old thing, bought in 2006)

I also tried a CBT200 nano (concentronics) which doesn't work, because the data coming out is corrupted. The reception is fine, recognised by Synology etc, but it just doesn't work. I didn't investigate any further what the problem is.



Koen Roggemans

unread,
Apr 10, 2013, 3:56:43 AM4/10/13
to sma-bl...@googlegroups.com
Sorry, It's Targus ACB20EU BT2.0, USB2.0

Op woensdag 10 april 2013 09:50:50 UTC+2 schreef Koen Roggemans het volgende:

PeterPan

unread,
Apr 10, 2013, 5:58:29 AM4/10/13
to sma-bl...@googlegroups.com
Hmm, I was thinking of buying the CBT200, but that's a no-go then...

Koen Roggemans

unread,
Apr 10, 2013, 7:39:46 AM4/10/13
to sma-bl...@googlegroups.com
No, I don't think so.
I find it very unsettling that even if the BT dongle is supported, works, etc there still can be problems. 
I bought the CBT200 for the purpose and it was just chance that I had another one in the house and a silly but working idea to try to solve the problem with the Targus dongle. There was no indication that it might solve the problem.

Op woensdag 10 april 2013 11:58:29 UTC+2 schreef PeterPan het volgende:

Koen Roggemans

unread,
Aug 8, 2014, 11:18:40 AM8/8/14
to sma-bl...@googlegroups.com
Ok, I upgraded to DMS 5.0 and a lot breaks :-(. I basically had to start all over again.
The switch from mysql to mariadb seems to be more pain full then expected. I'm still fiddling to get things back to work. If someone has a working recipe,  please post :-(

Koen Roggemans

unread,
Aug 8, 2014, 12:41:55 PM8/8/14
to sma-bl...@googlegroups.com
Where I got stuck no is a missing libmysqlclient.so.15. That file doesn't come with the installation of MariaDB and I can't install mysql5 because MariaDB is in the way.
I tried downloading an ARM version of the file for Debian Etch, but that didn't work. 


2014-08-08 17:18 GMT+02:00 Koen Roggemans <koen.ro...@gmail.com>:
Ok, I upgraded to DMS 5.0 and a lot breaks :-(. I basically had to start all over again.
The switch from mysql to mariadb seems to be more pain full then expected. I'm still fiddling to get things back to work. If someone has a working recipe,  please post :-(

--
You received this message because you are subscribed to a topic in the Google Groups "sma-bluetooth" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sma-bluetooth/BHAkk6Tr19A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sma-bluetoot...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages