ducdh1210 / labstreaminglayer

Automatically exported from code.google.com/p/labstreaminglayer
0 stars 0 forks source link

Sending/Receiving don't work on Linux #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run SendDataC-linux
2. Run ReceiveDataC-linux
3. Nothing happens

What is the expected output? What do you see instead?

The receiver does not receive the data. This is also the case when I try to 
read ldl streams from BCILAB

What version of the product are you using? On what operating system?
Latest hg on Fedora 19 Linux x86_64

Please provide any additional information below.
No firewall is running, I don't think that this is a networking issue. Will 
provide further debugging informations when I have time.

Original issue reported on code.google.com by ozan...@gmail.com on 27 Nov 2013 at 10:49

GoogleCodeExporter commented 8 years ago
Well it seems that rebuilding the example codes with liblsl built on my machine 
fixes the issues but still can't read with BCILAB->Read from lsl

Original comment by ozan...@gmail.com on 27 Nov 2013 at 12:55

GoogleCodeExporter commented 8 years ago
1. liblsl64.so built with USE_SYSTEM_BOOST=ON crashes Matlab
2. liblsl64.so build with USE_SYSTEM_BOOST=OFF at least does not crash Matlab 
but I now constantly getting "Stream transmission broke off, reconnecting"

Original comment by ozan...@gmail.com on 27 Nov 2013 at 2:06

GoogleCodeExporter commented 8 years ago
OK this was caused by mismatching version of liblsl. Let me explain this for 
further reference.

1. MATLAB ships its own boost libraries, v1.49 in bin/glnxa64. If you build 
liblsl with -DUSE_SYSTEM_BOOST=ON, lsl_resolve_byprop crashes MATLAB. So it is 
crucial that you build liblsl with included boost sources by just not passing 
the flag above.
2. The other problematic case for me was this:
 2.1 I once built liblsl with system boost and installed it to /usr/local.
 2.2 The one used by MATLAB was shipping its own boost, so there was a version mismatch interpreted as "stream transmission broke off".

Summary:
Always use the same liblsl with internal boost everywhere on your system.

Original comment by ozan...@gmail.com on 27 Nov 2013 at 2:34

GoogleCodeExporter commented 8 years ago
Thanks for the extensive testing! Yes, the ability to use the system boost 
version is only there since it's standard practice to do things that way on 
Linux. 

However, unfortunately a recent boost version (post-1.50) introduced a silent 
incompatibility when it comes to data serialization. To address this, in liblsl 
1.10 and later an alternative network protocol is supported (and enabled by 
default if both parties support it) which resolves the issue (does not use 
boost.serialization).

Original comment by christia...@gmail.com on 23 Jan 2014 at 11:35