diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.55k stars 277 forks source link

coap-client not work on Raspberry Pi OS (64-bit) #830

Open Thro42 opened 2 years ago

Thro42 commented 2 years ago

Describe the bug

It seams the the coap-client not works on Raspberry Pi OS bullseye (64-bit). I god the Message ./coap-client-linux: error while loading shared libraries: libcoap-1.so.0: cannot open shared object file: No such file or directory Known that the setup copy the version coap-client-aarch64 to coap-client-linux so I try tu use coap-client-i686 and it shows the same message.

Steps to Reproduce

  1. I use a fresh install Raspberry Pi OS bullseye (64-bit) on a P400.
  2. Then I install diyHue with.
    
    curl -fsSL https://get.diyhue.org -o install.sh
    sudo bash install.sh
3. Then i try 

cd /opt/hue-emulator ./coap-client-linux


4.  The I get the message 
`./coap-client-linux: error while loading shared libraries: libcoap-1.so.0: cannot open shared object file: No such file or directory
`
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Logs**
<!-- If applicable, provide output logs. These can be obtained via running `docker logs diyHue` -->
./coap-client-linux: error while loading shared libraries: libcoap-1.so.0: cannot open shared object file: No such file or directory

**Docker Info (please complete the following information):**
 - Architecture (Ex: x86, ARM): ARM64
 - Docker image version (Ex: latest, arm-05f043b, 128): no Docker
 - OS (Ex: Windows 10, Ubuntu Buster): Raspberry Pi OS bullseye (64-bit)
 - Hardware (Ex: PC, Raspberry Pi 1/2/3/Zero): Raspberry Pi 4/400

**Checklist**
- [X] I confirm that this is a bug report
- [X] I confirm that I have completed this template to the best of my ability

**Additional context**
<!-- Add any other context about the problem here. -->

<!-- DO NOT REMOVE THIS LINE OR THE ISSUE WILL BE CLOSED AUTOMATICALLY. -->
Mevel commented 2 years ago

Most probably it loaded the wrong architecture.

Thro42 commented 2 years ago

I tride also "./coap-client-arm" but result is -bash: ./coap-client-arm: No such file or directory I build now my own coap-client with

sudo apt-get install libtool autoconf automake
git clone --recursive https://github.com/obgm/libcoap.git
cd libcoap
git checkout dtls
git submodule update --init --recursive
./autogen.sh
./configure --disable-documentation --disable-shared --with-openssl --disable-test --disable-examples 
make

I will test and give respose

Thro42 commented 2 years ago

I put a recompiled version of coap-client-aarch64 in my repository https://github.com/Thro42/diyHue. For me this works correctly

GitHub
GitHub - Thro42/diyHue: Main diyHue software repo
Main diyHue software repo. Contribute to Thro42/diyHue development by creating an account on GitHub.
mariusmotea commented 2 years ago

Hi,

Can you create a pull request with your binary? I think we miss the arm64 version and now arm64 is default for raspberry PI

7FM commented 1 year ago

May I ask why these binaries are pushed in this repository in the first place? Shouldn't be an apt install libcoap2-bin on debian be enough to obtain coap-client?

mariusmotea commented 1 year ago

this package was not available at the moment when we added support for Tradfri Gateway device. we need to be sure before we edit the install script that this package is available on Ubuntu and Raspbian for Raspberry PI.

7FM commented 1 year ago

this package was not available at the moment when we added support for Tradfri Gateway device. we need to be sure before we edit the install script that this package is available on Ubuntu and Raspbian for Raspberry PI.

Ah, I see. Yes, the package is available for Ubuntu, Debian as well as Raspbian. I will open a draft PR soon :)

Edit: there it is https://github.com/diyhue/diyHue/pull/887