aws / aws-iot-device-sdk-arduino-yun

SDK for connecting to AWS IoT from an Arduino Yún.
Apache License 2.0
163 stars 77 forks source link

Error on install - incompatible with the architectures configured #73

Closed ldnelso2 closed 5 years ago

ldnelso2 commented 5 years ago

I am getting an error with the distribute package, but it seems different than issue #26. I also posted this question on the arduino forum, but I am hoping we can find a workaround for the bad 'distribute' package.

Device: Yun Rev2 OpenWrt: 17.11

So the package is available on the arduino downloads page, but doesn't seem to be compatible for some reason.

http://downloads.arduino.cc/openwrtyun/1/packages/

For example, for the package 'distribute'

$ wget http://downloads.arduino.cc/openwrtyun/1/packages/distribute_0.6.21-1_ar71xx.ipk

Downloading 'http://downloads.arduino.cc/openwrtyun/1/packages/distribute_0.6.21-1_ar71xx.ipk' Connecting to 104.20.190.47:80 Writing to 'distribute_0.6.21-1_ar71xx.ipk' distribute0.6.21-1 100% |***| 150k 0:00:00 ETA Download completed (154232 bytes)

$ opkg install distribute_0.6.21-1_ar71xx.ipk Unknown package 'distribute'. Collected errors:

So, you can download it fine from the package page, but opkg won't install it, with the error being an architectural flag.

Looking at a clue here from another device, perhaps the packages aren't properly cross complied... or perhaps something in opkg.conf that could be changed to make this work???

https://forums.hak5.org/topic/36961-can-i-use-any-opkg-package-from-openwrt/

SO - looking at the architecture of a couple other packages, it is clear the architecture we are looking for is 'mips_24kc'

Confirmed by looking at:

$ cat /etc/openwrt_release DISTRIB_ID='LEDEYun' DISTRIB_RELEASE='17.11' DISTRIB_REVISION='r6773+1-8dd3a6e' DISTRIB_TARGET='ar71xx/generic' DISTRIB_ARCH='mips_24kc' DISTRIB_DESCRIPTION='LEDEYun 17.11 r6773+1-8dd3a6e' DISTRIB_TAINTS='busybox'

BUT, I can't seem to find any other repo to find the distribute package that is cross compiled for the mips_24kg architecture. My guess is the downloads.arduino.cc page that opkg pulls from just grabs those files from the LEDE repo. So, if that source is down, maybe it can't get updated cross-compiled files and maybe it could fail.

https://github.com/mylittletony/SocketMan/wiki/LEDE-OPKG-repository

So, the referenced repo there is down... so that might explain the problem of the referenced opkg package on the arduino downloads page not matching the architecture, but not sure.

There is another download source for the mips_24kc architecture, and 'distribute' is not in the package list:

http://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/

I really don't know what to do.. I'm not sure how one would cross-compile a given package against the architecture, and not sure how to find a workaround for distribute.

Any other thoughts from someone with more experience here would be hugely helpful.

ldnelso2 commented 5 years ago

Okay - so I got some additional info from the OpenWRT forum. Looks like the distribute package never existed on openwrt.

So, from what I understand, the Yun used to run on the Lede distro, and then subsequently openwrt (or there was a merge or something). Looks like that is where things fell through.

So that means we:

  1. Either have to find an older copy of the .ipk file for distribute that worked before
  2. Find the source for distribute and cross compilie it for our architecture (mips_24kc).
  3. Find a way to set up easy_install or pip manally on this distribution without easy_install (this could involve cross compiling pip on the mips_24kc architecture
ldnelso2 commented 5 years ago

I ended up getting a good response from the arduino repo:

https://github.com/arduino/openwrt-packages-yun/issues/32#issuecomment-490385567