How to install Libmraa on 18.06.2 Linkit7688

#1

I upgraded my Linkit7688 from Openwrt 15.05.1, r49203 to Openwrt 18.06.2, r7676-cddd7b4c77, my applications are not able to find find libmraa

My application exits with following error

Error loading shared library libmraa.so.0: No such file or directory (needed by /root/ctusr/nameoflib.so)

Is there any way that I can install libmraa?

edit: if I copy the libmraa from the Openwrt 15.05.1 then I do not get any error but application does not work properly.

#2

Not clear why it isn't available to you -- they show up for an Archer C7v2 (mips_24kc)

jeff@office:~$ sudo opkg find '*libmraa*'
libmraa - 2.0.0-2 - Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface
 with the IO on Galileo, Edison & other platforms, with a structured and sane API where
 port names/numbering matches the board that you are on. Use of libmraa does not tie you
 to specific hardware with board detection done at runtime you can create portable code
 that will work across the supported platforms.
 
 This package contains the C/C++ libraries.
libmraa-python - 2.0.0-2 - Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface
 with the IO on Galileo, Edison & other platforms, with a structured and sane API where
 port names/numbering matches the board that you are on. Use of libmraa does not tie you
 to specific hardware with board detection done at runtime you can create portable code
 that will work across the supported platforms.
 
 This package contains the Python libraries.
libmraa-python3 - 2.0.0-2 - Libmraa is a C/C++ library with bindings to Java, Python and JavaScript to interface
 with the IO on Galileo, Edison & other platforms, with a structured and sane API where
 port names/numbering matches the board that you are on. Use of libmraa does not tie you
 to specific hardware with board detection done at runtime you can create portable code
 that will work across the supported platforms.
 
 This package contains the Python3 libraries.
#3

I didn't built the firmware, i just installed one from Openwrt website from here

Is there a guide, to build the firmware, for a noob
edit:
Also ls -l /sys/class/gpio/ gives following output

Original firmware CHAOS CALMER (15.05.1, r49203)

--w-------    1 root     root          4096 Jan  1  1970 export
lrwxrwxrwx    1 root     root             0 Jan 23 06:06 gpio0 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpio0
lrwxrwxrwx    1 root     root             0 Jan 23 06:06 gpio14 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpio14
lrwxrwxrwx    1 root     root             0 Jan 23 06:06 gpio17 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpio17
lrwxrwxrwx    1 root     root             0 Jan 23 06:06 gpio4 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpio4
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip0 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpiochip0
lrwxrwxrwx    1 root     root             0 May 15 01:15 gpiochip127 -> ../../devices/gpio-wifi/gpio/gpiochip127
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip32 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpiochip32
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip64 -> ../../devices/10000000.palmbus/10000600.gpio/gpio/gpiochip64
--w-------    1 root     root          4096 Jan  1  1970 unexport

On Openwrt 18.06.2, r7676-cddd7b4c77

--w-------    1 root     root          4096 Jan  1  1970 export
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip0 -> ../../devices/platform/10000000.palmbus/10000600.gpio/gpio/gpiochip0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip32 -> ../../devices/platform/10000000.palmbus/10000600.gpio/gpio/gpiochip32
lrwxrwxrwx    1 root     root             0 Jan  1  1970 gpiochip64 -> ../../devices/platform/10000000.palmbus/10000600.gpio/gpio/gpiochip64
--w-------    1 root     root          4096 Jan  1  1970 unexport

Can this be a problem too??

#4

To verify, have you used these commands after upgrading:

opkg update
opkg install libmraa
#5

You should expect that there are differences after four years and multiple kernel releases (including moving from mach-based to DTS-based configuration).

#6
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/ramips/mt76x8/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/18.06.2/targets/ramips/mt76x8/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mipsel_24kc/telephony/Packages.sig
Signature check passed.
root@OpenWrt:~# opkg install libmraa
Unknown package 'libmraa'.
Collected errors:
 * opkg_install_cmd: Cannot install package libmraa.
root@OpenWrt:~# 

#7

i tried to build an firmware iimage with libmraa but am getting following error

node_lib.target.mk:156: recipe for target '/home/developer/Work/Git/NEW/openwrt/build_dir/target-mipsel_24kc_musl/node-v8.16.0/out/Release/obj.target/node_lib/src/node.o' failed
make[5]: *** [/home/developer/Work/Git/NEW/openwrt/build_dir/target-mipsel_24kc_musl/node-v8.16.0/out/Release/obj.target/node_lib/src/node.o] Error 1
rm e6a6f1ad8233939f8f5343f9e611192b5c385e69.intermediate
Makefile:88: recipe for target 'node' failed
make[4]: *** [node] Error 2
make[4]: Leaving directory '/home/developer/Work/Git/NEW/openwrt/build_dir/target-mipsel_24kc_musl/node-v8.16.0'
Makefile:133: recipe for target '/home/developer/Work/Git/NEW/openwrt/build_dir/target-mipsel_24kc_musl/node-v8.16.0/.built' failed
make[3]: *** [/home/developer/Work/Git/NEW/openwrt/build_dir/target-mipsel_24kc_musl/node-v8.16.0/.built] Error 2
make[3]: Leaving directory '/home/developer/Work/Git/NEW/openwrt/feeds/packages/lang/node'
time: package/feeds/packages/node/compile#2.16#0.21#2.35
package/Makefile:107: recipe for target 'package/feeds/packages/node/compile' failed
make[2]: *** [package/feeds/packages/node/compile] Error 2
make[2]: Leaving directory '/home/developer/Work/Git/NEW/openwrt'
package/Makefile:103: recipe for target '/home/developer/Work/Git/NEW/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile' failed
make[1]: *** [/home/developer/Work/Git/NEW/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/developer/Work/Git/NEW/openwrt'
/home/developer/Work/Git/NEW/openwrt/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2
developer@DEVELOPMENT:~/Work/Git/NEW/openwrt$ 

#8

Ummmm...have you looked at this:

http://downloads.openwrt.org/releases/faillogs/mipsel_24kc/packages/libmraa/

It could have saved you some trouble. It seems the official buildbot is having a problem too.