50ButtonsEach / fliclib-linux-hci

Flic SDK for Linux
306 stars 54 forks source link

flicd is not working on AlpineLinux #69

Open joker85 opened 7 years ago

joker85 commented 7 years ago

Hello,

I have a problem to run flicd on my Raspberry Pi 3

0cd90890fd17:/etc/conf.d# cd /root/fliclib-linux-hci-master/bin/armv6l/ 0cd90890fd17:~/fliclib-linux-hci-master/bin/armv6l# ls flicd 0cd90890fd17:~/fliclib-linux-hci-master/bin/armv6l# ./flicd -f flic.sqlite3 -l ./flic.out -ash: ./flicd: not found 0cd90890fd17:/addons/flicd# /bin/bash ./flicd -f pippo ./flicd: ./flicd: cannot execute binary file 0cd90890fd17:~/fliclib-linux-hci-master/bin/armv6l# cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.6.1 PRETTY_NAME="Alpine Linux v3.6" HOME_URL="http://alpinelinux.org" BUG_REPORT_URL=“http://bugs.alpinelinux.org

Is the binary file incompatible with my of version or I'm doing something wrong?

I had this issue with the latest version of home-assistant.

Thanks for your support.

Emill commented 7 years ago

What does lscpu print?

joker85 commented 7 years ago

Hi,

lscpu

Architecture: armv7l Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Model name: ARMv7 Processor rev 4 (v7l) CPU max MHz: 1200.0000 CPU min MHz: 600.0000

Emill commented 7 years ago

Hmm not really sure why this happens. Could you try use the full path instead of ./

Emill commented 7 years ago

And Exactly which download did you pick when you downloaded AlpineLinux?

joker85 commented 7 years ago

I have a build created by home assistant: https://home-assistant.io/hassio/installation/

The build allow me just to run application in docker container, maybe it is necessary to add some specific components in the container.

Emill commented 7 years ago

Not sure how easy it is to forward the hci device to the docker environment. Do you really need to use Docker?

joker85 commented 7 years ago

I have already done the docker container to run it, but I'm not sure if the problem is the Docker container or the OS.

If the software need some specific library or other software to work I can handle it, but i need to know the list.

Emill commented 7 years ago

It doesn't need anything else than a Linux kernel, libc, network connection and Bluetooth hci device.

Could you run "file /bin/bash" and print the output. Or "file [some other binary]"? It should print a lot of things about the cpu and binary format.

acarlo79 commented 7 years ago

I have the same issue, it looks like that the Raspberry binary is not compatible with this distribution: The binary is not recognised as such.

here the output requested:

/bin/bash: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped, with debug_info

Emill commented 7 years ago

Maybe it is because that distribution uses musl instead of glibc...

acarlo79 commented 7 years ago

3b0323706b6a:/config# /bin/bash /config/flicd -f db.sql /config/flicd: /config/flicd: cannot execute binary file 3b0323706b6a:/config# ls -la flicd -rwxrwxrwx 1 root root 734708 Jul 29 21:53 flicd 3b0323706b6a:/config# file flicd flicd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=e080a631d9d667cba75284641c9a01c16cffdc8a, stripped, with debug_info 3b0323706b6a:/config# file /bin/bash /bin/bash: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped, with debug_info 3b0323706b6a:/config#

acarlo79 commented 7 years ago

well, possibly as you said, the only fix is to get a version compiled for using musl.

Emill commented 7 years ago

Yes but that will take some time. I'm back from holiday in August.

acarlo79 commented 7 years ago

we can just wait :)

joker85 commented 7 years ago

Yes perfect thanks.

joker85 commented 7 years ago

Hello,

have you got the time to compile the new binary?

Thanks.