-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
liblsl32.so for ARM architecture #74
Comments
Actually, there is now an LSL version for Raspberry-Pi. I believe the code.blocks project will compile just fine, and you can download the binaries on our ftp: |
First off, thank you for the quick reply, even though it's not directly an 'issue'! PS: I have managed to import the code::blocks project but as I have never worked with this particular IDE and never compiled a shared object file I am not able to do complie it myself. |
Yes, it does indeed appear to be invalid. I did cross-compile it on a virtual linux machine, so I suppose I shouldn't be that surprised that it doesn't work, but I seem to remember testing it before pushing it to the ftp. I am recompiling the binaries on an actual pi (which takes hours) and will replace the broken binaries when it's done. |
So the pi is still doing its thing. I will finish this up tomorrow. One final note is that there were indeed incorrect project settings on the code.blocks project -- causing the library build to fail at link time. I made the correct changes some time ago, and thought that I had saved them, but apparently not. It should all be correct on git etc. now. |
This is becoming increasingly difficult (and frustrating). I can compile LSL on the pi (it takes about 3 hours), but I get the symbol not found error on all the LSL functions when I try to link one of the C/C++ examples to it. I can cross compile it on my virtual linux box and send it to the pi. This time, the example programs compile without errors, but when I try to run them, they report a 'libls-bcm2708.so' file not found error. The file is most certainly there and the permissions are correct. I also get 'not a dynamic executable' from ldd. I have no idea what is going on here. I definitely had this working several months ago. |
Sorry, hit close by accident |
The file not found error on the .so file might be related to the file being On Wed, Dec 9, 2015 at 11:41 AM, David Medine notifications@github.com
|
Indeed so. But, presumably the cross compiler knows to build for the correct architecture and bitness. |
Yes. I verified that the cross compiler should be ok. I compiled a very simple test program and sent it over to the pi. Worked fine. |
Ok, time to call Mulder & Scully! ;) On Wed, Dec 9, 2015 at 12:37 PM, David Medine notifications@github.com
|
If only I could. |
OK, so I guess a fresh build of liblsl on the pi itself did the trick. Everything seems to be working correctly now. I am still compiling the debug library, but I will add the Pi release binaries to the ftp now. |
ftp://sccn.ucsd.edu/pub/software/LSL/SDK/liblsl-All-Languages-1.11.zip |
Thanks a lot for all the effort! I got the file from the 'All-Languages' zip and it works fine now. Just a note: it seems that the new library is not in the 'C-C++-1.11' zip up to now. |
Should be there now. Debug version as well. On 12/10/2015 12:04 AM, beaniwonder wrote:
|
@dmedine Could you provide instructions how you managed to build on Pi? I'm struggling with similar linking issues as you did. Seems like the Boost needs some special treatment? Cross-compiling: git clone https://github.com/sccn/labstreaminglayer.git
cd labstreaminglayer/LSL/liblsl
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++
make
...
Linking CXX shared library liblsl.so
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for lslboost::archive::basic_binary_oarchive<eos::portable_oarchive>'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.data.rel.ro+0x0): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.rodata+0xc3c): multiple definition of `typeinfo name for lslboost::archive::basic_binary_oarchive<eos::portable_oarchive>'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.rodata+0x1d7c): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for lslboost::archive::basic_binary_oprimitive<eos::portable_oarchive, char, std::char_traits<char> >'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.data.rel.ro+0xc): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.rodata+0x12fc): multiple definition of `typeinfo name for lslboost::archive::basic_binary_oprimitive<eos::portable_oarchive, char, std::char_traits<char> >'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.rodata+0x1fd8): first defined here
collect2: error: ld returned 1 exit status
src/CMakeFiles/lsl.dir/build.make:711: recipe for target 'src/liblsl.so' failed
make[2]: *** [src/liblsl.so] Error 1
CMakeFiles/Makefile2:125: recipe for target 'src/CMakeFiles/lsl.dir/all' failed
make[1]: *** [src/CMakeFiles/lsl.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2 Same thing on RPi with USE_SYSTEM_BOOST: sudo apt-get install libboost-all-dev
git clone https://github.com/sccn/labstreaminglayer.git
cd labstreaminglayer/LSL/liblsl
mkdir build
cd build
cmake .. -DUSE_SYSTEM_BOOST=ON
make
...
Linking CXX shared library liblsl.so
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for boost::archive::basic_binary_oarchive<eos::portable_oarchive>'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.data.rel.ro+0x0): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.rodata+0x9fc): multiple definition of `typeinfo name for boost::archive::basic_binary_oarchive<eos::portable_oarchive>'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.rodata+0x17d8): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for boost::archive::basic_binary_oprimitive<eos::portable_oarchive, char, std::char_traits<char> >'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.data.rel.ro+0xc): first defined here
CMakeFiles/lsl.dir/legacy/legacy_abi.cpp.o:(.rodata+0x10bc): multiple definition of `typeinfo name for boost::archive::basic_binary_oprimitive<eos::portable_oarchive, char, std::char_traits<char> >'
CMakeFiles/lsl.dir/tcp_server.cpp.o:(.rodata+0x19c4): first defined here
collect2: error: ld returned 1 exit status
src/CMakeFiles/lsl.dir/build.make:716: recipe for target 'src/liblsl.so' failed
make[2]: *** [src/liblsl.so] Error 1
CMakeFiles/Makefile2:75: recipe for target 'src/CMakeFiles/lsl.dir/all' failed
make[1]: *** [src/CMakeFiles/lsl.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
Edit: cmake .. -DUSE_SYSTEM_BOOST=ON -DCMAKE_CXX_FLAGS="-Wunknown-pragmas"
make |
Workaround: add cmake .. -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--allow-multiple-definition" At least the sources compile and link. Don't know whether the library works. I will test that tomorrow. |
Glad to know you got the build to work! I actually used code::blocks to do my compilation. I made it on a On 10/31/2016 10:37 AM, Kim Blomqvist wrote:
|
Removing |
I had the same problem, and removing the reference to legacy_abi.cpp fixed it. Would be nice to have this changed on master! |
I'm trying this too and had to exclude |
also I found the binary for distribution (liblsl-bcm2708.so) is 64 bit so it won't run on pi. |
That's my bad. A mistake from using the cross-compiler and then not
testing. Coincidentally, I have my pi out at home right now so in the
coming days I will compile it natively and re-upload the binary. That
way it will definitely work.
In the meantime, please exclude the legacy_abi.cpp from the project. I
thought I had already done this in the commit of the code.blocks
project, but maybe not. That code is only relevant for Windows and
causes all sorts of issues with gcc.
…On 6/21/17 6:57 AM, Naoto HIÉDA wrote:
also I found the binary for distribution (liblsl-bcm2708.so) is 64 bit
so it won't run on pi.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<sccn/labstreaminglayer#74 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADch7j3-f5v0TkzU11t8rdaA4hRIiMMvks5sGKLBgaJpZM4GvgX8>.
|
@dmedine sorry I didn't use code blocks - I built straight from cmake so maybe that's the reason. In the meantime I built a library so that I can run on a Pi (chkothe/pylsl#2). I had to omit |
I downloaded @micuat's ARM library
I checked the symbols in the ".so" file using Could it be possible this function was excluded somehow when @micuat did the recompile for the ARM architecture?? I am hoping you will be able to figure out how to resolve this problem, because we are stuck and unable to proceed. (We are trying to read raw EEG data from the Muse). Any help or advice appreciated. |
@tstenner , how hard is it to add an ARM build to Travis? |
Very hard, as they have no ARM machines. I have a 3B (but no charger) and some changes to reduce the compile time, so it's on my radar but it might take some days |
On a second thought: VS2017 has an arm toolchain and the android toolchain compiles for ARM Linux, so that's something appveyor could have preinstalled |
@dxjones i have the same problem. i'm really new with this and need help, how to compile in raspberry |
Please see sccn/liblsl#2 (and test the file attached to my comment there) and discussion in #336 |
Hi!
I am currently trying to run a simple server written in python on a raspberry pi (running raspbian linux). When i try to start the script is tells me that that it cannot find "liblsl32.so" and after some research I found out that it may be complied only for Intel architecture?
(As 'ldd liblsl32.so' tells me 'not a dynamic executable' on an ARM system)
Is it possible to get a library file compiled for ARM architecture or to compile one myself somehow?
The text was updated successfully, but these errors were encountered: