Mraa-gpio list: No Pins

Hi, I am trying to use the gpio pins and I followed the steps in the wiki, I am on ubuntu mate desktop. But I have this, could anyone please help? Which kernel on RockPi 4 supports mraa?

rock@rockpi:~$ sudo mraa-gpio list
No Pins
rock@rockpi:~$ mraa-i2c list
rock@rockpi:~$
rock@rockpi:~$ uname -a
Linux rockpi 4.4.154-87-rockchip-00029-g8216f17 #2 SMP Sat Jun 22 11:06:39 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

Here are the packages being installed on my system:

root@rockpi:/home/rock# apt-get install rockpi4b-rk-u-boot-latest
Reading package lists… Done
Building dependency tree
Reading state information… Done
rockpi4b-rk-u-boot-latest is already the newest version (2017.09-00011-g0568348).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@rockpi:/home/rock# apt-get install linux-base
Reading package lists… Done
Building dependency tree
Reading state information… Done
linux-base is already the newest version (4.5ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@rockpi:/home/rock# apt-get install linux-4.4-latest
Reading package lists… Done
Building dependency tree
Reading state information… Done
linux-4.4-latest is already the newest version (4.4.154-87).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@rockpi:/home/rock# cat /boot/extlinux/extlinux.conf
timeout 10
menu title select kernel

label kernel-4.4.154-87-rockchip-00029-g8216f17
kernel /vmlinuz-4.4.154-87-rockchip-00029-g8216f17
devicetreedir /dtbs/4.4.154-87-rockchip-00029-g8216f17
append video=3840x2160@60 earlyprintk console=ttyFIQ0,1500000n8 >init=/sbin/init root=PARTUUID=b921b045-1d rw rootwait rootfstype=ext4

label kernel-4.4.154-59-rockchip-g5e70f14
kernel /vmlinuz-4.4.154-59-rockchip-g5e70f14
devicetreedir /dtbs/4.4.154-59-rockchip-g5e70f14
append earlyprintk console=ttyFIQ0,1500000n8 init=/sbin/init >root=PARTUUID=b921b045-1d rw rootwait rootfstype=ext4

root@rockpi:/home/rock# sudo apt-get install -y rockchip-overlay rockchip-fstab && >sudo apt-get install -y rockpi4-dtbo
Reading package lists… Done
Building dependency tree
Reading state information… Done
rockchip-fstab is already the newest version (0.1).
rockchip-overlay is already the newest version (1.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists… Done
Building dependency tree
Reading state information… Done
rockpi4-dtbo is already the newest version (1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Hi all,
I tried further to compile the mraa myself, but it fails with errors:

rock@rockpi:~/Downloads/libmraa/build$ make
Scanning dependencies of target mraa
[ 1%] Building C object src/CMakeFiles/mraa.dir/mraa.c.o
[ 2%] Building C object src/CMakeFiles/mraa.dir/gpio/gpio.c.o
[ 3%] Building C object src/CMakeFiles/mraa.dir/gpio/gpio_chardev.c.o
[ 4%] Building C object src/CMakeFiles/mraa.dir/i2c/i2c.c.o
[ 5%] Building C object src/CMakeFiles/mraa.dir/pwm/pwm.c.o
[ 6%] Building C object src/CMakeFiles/mraa.dir/spi/spi.c.o
[ 8%] Building C object src/CMakeFiles/mraa.dir/aio/aio.c.o
[ 9%] Building C object src/CMakeFiles/mraa.dir/uart/uart.c.o
[ 10%] Building C object src/CMakeFiles/mraa.dir/led/led.c.o
/home/rock/Downloads/libmraa/src/led/led.c: In function ‘mraa_led_get_trigfd’:
/home/rock/Downloads/libmraa/src/led/led.c:46:33: warning: ‘%s’ directive output may be truncated writing 7 bytes into a region of size between 0 and 63 [-Wformat-truncation=]
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “trigger”);
^~ ~~~~~~~~~
/home/rock/Downloads/libmraa/src/led/led.c:46:5: note: ‘snprintf’ output between 9 and 72 bytes into a destination of size 64
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “trigger”);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/led/led.c: In function ‘mraa_led_get_brightfd’:
/home/rock/Downloads/libmraa/src/led/led.c:61:33: warning: ‘%s’ directive output may be truncated writing 10 bytes into a region of size between 0 and 63 [-Wformat-truncation=]
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “brightness”);
^~ ~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/led/led.c:61:5: note: ‘snprintf’ output between 12 and 75 bytes into a destination of size 64
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “brightness”);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/led/led.c: In function ‘mraa_led_get_maxbrightfd’:
/home/rock/Downloads/libmraa/src/led/led.c:76:33: warning: ‘%s’ directive output may be truncated writing 14 bytes into a region of size between 0 and 63 [-Wformat-truncation=]
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “max_brightness”);
^~ ~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/led/led.c:76:5: note: ‘snprintf’ output between 16 and 79 bytes into a destination of size 64
snprintf(buf, MAX_SIZE, “%s/%s”, dev->led_path, “max_brightness”);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 11%] Building C object src/CMakeFiles/mraa.dir/initio/initio.c.o
[ 12%] Building C object src/CMakeFiles/mraa.dir/grovepi/grovepi.c.o
[ 13%] Building C object src/CMakeFiles/mraa.dir/uart_ow/uart_ow.c.o
[ 14%] Building C object src/CMakeFiles/mraa.dir/iio/iio.c.o
/home/rock/Downloads/libmraa/src/iio/iio.c: In function ‘mraa_iio_get_channel_data’:
/home/rock/Downloads/libmraa/src/iio/iio.c:182:44: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
syslog(LOG_ERR, “iio: Channel %d with channel bytes value <= 0”);
~^
/home/rock/Downloads/libmraa/src/iio/iio.c:40:26: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 71 and 81 [-Wformat-truncation=]
#define IIO_SYSFS_DEVICE “/sys/bus/iio/devices/” IIO_DEVICE
^
/home/rock/Downloads/libmraa/src/iio/iio.c:113:37: note: in expansion of macro ‘IIO_SYSFS_DEVICE’
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/iio/iio.c:612:80: note: format string is defined here
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~
/home/rock/Downloads/libmraa/src/iio/iio.c:113:13: note: ‘snprintf’ output between 48 and 313 bytes into a destination of size 128
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/iio/iio.c: In function ‘mraa_iio_get_event_data’:
/home/rock/Downloads/libmraa/src/iio/iio.c:40:26: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 78 and 88 [-Wformat-truncation=]
#define IIO_SYSFS_DEVICE “/sys/bus/iio/devices/” IIO_DEVICE
^
/home/rock/Downloads/libmraa/src/iio/iio.c:416:41: note: in expansion of macro ‘IIO_SYSFS_DEVICE’
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_EVENTS “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/iio/iio.c:38:31: note: format string is defined here
#define IIO_SCAN_ELEM “scan_elements”
^~
/home/rock/Downloads/libmraa/src/iio/iio.c:416:17: note: ‘snprintf’ output between 41 and 306 bytes into a destination of size 128
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_EVENTS “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/iio/iio.c: In function ‘mraa_iio_update_channels’:
/home/rock/Downloads/libmraa/src/iio/iio.c:40:26: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 71 and 81 [-Wformat-truncation=]
#define IIO_SYSFS_DEVICE “/sys/bus/iio/devices/” IIO_DEVICE
^
/home/rock/Downloads/libmraa/src/iio/iio.c:612:41: note: in expansion of macro ‘IIO_SYSFS_DEVICE’
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/src/iio/iio.c:612:80: note: format string is defined here
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~
/home/rock/Downloads/libmraa/src/iio/iio.c:612:17: note: ‘snprintf’ output between 48 and 313 bytes into a destination of size 128
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE “%d/” IIO_SCAN_ELEM “/%s”, dev->num, ent->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 16%] Building C object src/CMakeFiles/mraa.dir/json/jsonplatform.c.o
[ 17%] Building C object src/CMakeFiles/mraa.dir/arm/arm.c.o
[ 18%] Building C object src/CMakeFiles/mraa.dir/arm/96boards.c.o
[ 19%] Building C object src/CMakeFiles/mraa.dir/arm/raspberry_pi.c.o
/home/rock/Downloads/libmraa/src/arm/raspberry_pi.c: In function ‘mraa_raspberry_pi’:
/home/rock/Downloads/libmraa/src/arm/raspberry_pi.c:634:49: warning: ‘%s’ directive writing up to 255 bytes into a region of size 48 [-Wformat-overflow=]
sprintf(chip_path, “/sys/class/gpio/%s/label”, child->d_name);
^~
/home/rock/Downloads/libmraa/src/arm/raspberry_pi.c:634:13: note: ‘sprintf’ output between 23 and 278 bytes into a destination of size 64
sprintf(chip_path, “/sys/class/gpio/%s/label”, child->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 20%] Building C object src/CMakeFiles/mraa.dir/arm/beaglebone.c.o
/home/rock/Downloads/libmraa/src/arm/beaglebone.c: In function ‘mraa_beaglebone’:
/home/rock/Downloads/libmraa/src/arm/beaglebone.c:380:18: warning: variable ‘uart3_enabled’ set but not used [-Wunused-but-set-variable]
unsigned int uart3_enabled = 0;
^~~~~~~~~~~~~
[ 21%] Building C object src/CMakeFiles/mraa.dir/arm/phyboard.c.o
[ 22%] Building C object src/CMakeFiles/mraa.dir/arm/banana.c.o
[ 24%] Building C object src/CMakeFiles/mraa.dir/arm/de_nano_soc.c.o
[ 25%] Building C object src/CMakeFiles/mraa.dir/arm/rockpi4.c.o
[ 26%] Building C object src/CMakeFiles/mraa.dir/version.c.o
[ 27%] Linking C shared library libmraa.so
[ 27%] Built target mraa
[ 28%] Swig source
Scanning dependencies of target _python2-mraa
[ 29%] Building CXX object src/python/python2/CMakeFiles/_python2-mraa.dir/mraa2PYTHON_wrap.cxx.o
In file included from /home/rock/Downloads/libmraa/build/src/python/python2/mraa2PYTHON_wrap.cxx:3416:0:
/home/rock/Downloads/libmraa/api/mraa/gpio.hpp: In member function ‘mraa::Result mraa::Gpio::useMmap(bool)’:
/home/rock/Downloads/libmraa/api/mraa/gpio.hpp:317:77: warning: ‘mraa_result_t mraa_gpio_use_mmaped(mraa_gpio_context, mraa_boolean_t)’ is deprecated [-Wdeprecated-declarations]
return (Result) mraa_gpio_use_mmaped(m_gpio, (mraa_boolean_t) enable);
^
In file included from /home/rock/Downloads/libmraa/api/mraa/gpio.hpp:27:0,
from /home/rock/Downloads/libmraa/build/src/python/python2/mraa2PYTHON_wrap.cxx:3416:
/home/rock/Downloads/libmraa/api/mraa/gpio.h:287:26: note: declared here
DEPRECATED mraa_result_t mraa_gpio_use_mmaped(mraa_gpio_context dev, mraa_boolean_t mmap);
^~~~~~~~~~~~~~~~~~~~
[ 31%] Building C object src/python/python2/CMakeFiles/_python2-mraa.dir/__/mraapy.c.o
[ 32%] Linking CXX shared module _mraa.so
[ 32%] Built target _python2-mraa
[ 33%] Swig source
Scanning dependencies of target mraajs
[ 34%] Building CXX object src/javascript/CMakeFiles/mraajs.dir/mraajsJAVASCRIPT_wrap.cxx.o
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:966:27: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:966:43: error: expected ‘,’ or ‘…’ before ‘<’ token
void (*dtor) (const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data);
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1014:53: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1014:69: error: expected ‘,’ or ‘…’ before ‘<’ token
SWIGRUNTIME void SWIGV8_Proxy_DefaultDtor(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void SWIGV8_Proxy_DefaultDtor(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1015:25: error: ‘data’ was not declared in this scope
SWIGV8_Proxy proxy = data.GetParameter();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function 'void SWIGV8_SetPrivateData(v8::Handlev8::Object, void
, swig_type_info*, int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1086:78: error: no matching function for call to 'v8::Persistentv8::Object::SetWeak(SWIGV8_Proxy*&, void (&)(int))’
cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData
)info->clientdata)->dtor);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: candidate: template void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = P; T = v8::Object]
V8_INLINE void SetWeak(P* parameter,
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: template argument deduction/substitution failed:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1086:78: note: candidate expects 3 arguments, 2 provided
cdata->handle.SetWeak(cdata, ((SWIGV8_ClientData*)info->clientdata)->dtor);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate: void v8::PersistentBase::SetWeak() [with T = v8::Object]
V8_INLINE void SetWeak();
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate expects 0 arguments, 2 provided
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1088:58: error: no matching function for call to ‘v8::Persistentv8::Object::SetWeak(SWIGV8_Proxy*&, void (&)(int))’
cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: candidate: template void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = P; T = v8::Object]
V8_INLINE void SetWeak(P* parameter,
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: template argument deduction/substitution failed:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1088:58: note: candidate expects 3 arguments, 2 provided
cdata->handle.SetWeak(cdata, SWIGV8_Proxy_DefaultDtor);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate: void v8::PersistentBase::SetWeak() [with T = v8::Object]
V8_INLINE void SetWeak();
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate expects 0 arguments, 2 provided
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘int SwigV8Packed_Check(v8::Handlev8::Value)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1242:40: error: ‘class v8::Object’ has no member named ‘GetHiddenValue’; did you mean ‘IntegerValue’?
v8::Handlev8::Value flag = objRef->GetHiddenValue(SWIGV8_STRING_NEW(“swig__packed_data”));
^~~~~~~~~~~~~~
IntegerValue
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1292:58: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1292:74: error: expected ‘,’ or ‘…’ before ‘<’ token
SWIGRUNTIME void _wrap_SwigV8PackedData_delete(const v8::WeakCallbackData<v8::Object, SwigV8PackedData> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_SwigV8PackedData_delete(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1293:34: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘v8::Handlev8::Value SWIGV8_NewPackedObj(void*, size_t, swig_type_info*)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1322:8: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’; did you mean ‘IntegerValue’?
obj->SetHiddenValue(SWIGV8_STRING_NEW(“swig__packed_data”), SWIGV8_BOOLEAN_NEW(true));
^~~~~~~~~~~~~~
IntegerValue
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1346:61: error: no matching function for call to ‘v8::Persistentv8::Object::SetWeak(SwigV8PackedData*&, void (&)(int))’
cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: candidate: template void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = P; T = v8::Object]
V8_INLINE void SetWeak(P* parameter,
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:545:18: note: template argument deduction/substitution failed:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1346:61: note: candidate expects 3 arguments, 2 provided
cdata->handle.SetWeak(cdata, _wrap_SwigV8PackedData_delete);
^
In file included from /usr/include/nodejs/src/node.h:63:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:171:
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate: void v8::PersistentBase::SetWeak() [with T = v8::Object]
V8_INLINE void SetWeak();
^~~~~~~
/usr/include/nodejs/deps/v8/include/v8.h:556:18: note: candidate expects 0 arguments, 2 provided
In file included from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1693:0:
/home/rock/Downloads/libmraa/api/mraa/gpio.hpp: In member function ‘mraa::Result mraa::Gpio::useMmap(bool)’:
/home/rock/Downloads/libmraa/api/mraa/gpio.hpp:317:77: warning: ‘mraa_result_t mraa_gpio_use_mmaped(mraa_gpio_context, mraa_boolean_t)’ is deprecated [-Wdeprecated-declarations]
return (Result) mraa_gpio_use_mmaped(m_gpio, (mraa_boolean_t) enable);
^
In file included from /home/rock/Downloads/libmraa/api/mraa/gpio.hpp:27:0,
from /home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:1693:
/home/rock/Downloads/libmraa/api/mraa/gpio.h:287:26: note: declared here
DEPRECATED mraa_result_t mraa_gpio_use_mmaped(mraa_gpio_context dev, mraa_boolean_t mmap);
^~~~~~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:2016:53: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_uint8Array(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:2016:69: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_uint8Array(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_uint8Array(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:2017:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:2017:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:6555:47: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Gpio(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:6555:63: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Gpio(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Gpio(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:6556:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:6556:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:7427:46: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_I2c(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:7427:62: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_I2c(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_I2c(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:7428:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:7428:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8221:46: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Pwm(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8221:62: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Pwm(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Pwm(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8222:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8222:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8911:46: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Spi(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8911:62: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Spi(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Spi(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8912:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:8912:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9310:46: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Aio(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9310:62: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Aio(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Aio(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9311:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9311:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9618:47: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Uart(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9618:63: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Uart(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Uart(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9619:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:9619:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: At global scope:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10496:46: error: ‘WeakCallbackData’ in namespace ‘v8’ does not name a template type
static void _wrap_delete_Led(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^~~~~~~~~~~~~~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10496:62: error: expected ‘,’ or ‘…’ before ‘<’ token
static void _wrap_delete_Led(const v8::WeakCallbackData<v8::Object, SWIGV8_Proxy> &data) {
^
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void _wrap_delete_Led(int)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10497:40: error: ‘data’ was not declared in this scope
v8::Localv8::Object object = data.GetValue();
^~~~
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10497:40: note: suggested alternative: ‘atan’
v8::Localv8::Object object = data.GetValue();
^~~~
atan
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘void SWIG_V8_SetModule(void*, swig_module_info*)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10875:15: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’; did you mean ‘IntegerValue’?
global_obj->SetHiddenValue(SWIGV8_STRING_NEW(“swig_module_info_data”), mod);
^~~~~~~~~~~~~~
IntegerValue
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx: In function ‘swig_module_info* SWIG_V8_GetModule(void*)’:
/home/rock/Downloads/libmraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:10881:49: error: ‘class v8::Object’ has no member named ‘GetHiddenValue’; did you mean ‘IntegerValue’?
v8::Localv8::Value moduleinfo = global_obj->GetHiddenValue(SWIGV8_STRING_NEW(“swig_module_info_data”));
^~~~~~~~~~~~~~
IntegerValue
src/javascript/CMakeFiles/mraajs.dir/build.make:68: recipe for target ‘src/javascript/CMakeFiles/mraajs.dir/mraajsJAVASCRIPT_wrap.cxx.o’ failed
make[2]: *** [src/javascript/CMakeFiles/mraajs.dir/mraajsJAVASCRIPT_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:334: recipe for target ‘src/javascript/CMakeFiles/mraajs.dir/all’ failed
make[1]: *** [src/javascript/CMakeFiles/mraajs.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi all,

I can confirm GPIO works on Ubuntu Mate Desktop with direct access to the /sys/class/gpio bythe following code to blink an LED. I am sure that it is the problem of libmraa itself. Can anyone please take a look at the problem?

Thanks to all.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h> //define O_WRONLY and O_RDONLY

#define SYSFS_GPIO_EXPORT “/sys/class/gpio/export”
#define SYSFS_GPIO_RST_PIN_VAL “157”
#define SYSFS_GPIO_RST_DIR “/sys/class/gpio/gpio157/direction”
#define SYSFS_GPIO_RST_DIR_VAL “OUT”
#define SYSFS_GPIO_RST_VAL “/sys/class/gpio/gpio157/value”
#define SYSFS_GPIO_RST_VAL_H “1”
#define SYSFS_GPIO_RST_VAL_L “0”

int main()
{
int fd; //open port on /sys/class/gpio# echo 157 > export
fd = open(SYSFS_GPIO_EXPORT, O_WRONLY);
if(fd == -1)
{
printf(“ERR: Radio hard reset pin open error.\n”);
return EXIT_FAILURE;
}
write(fd, SYSFS_GPIO_RST_PIN_VAL ,sizeof(SYSFS_GPIO_RST_PIN_VAL));
close(fd);

//set direction /sys/class/gpio/gpio157# echo out > direction
fd = open(SYSFS_GPIO_RST_DIR, O_WRONLY);
if(fd == -1)
{
printf(“ERR: Radio hard reset pin direction open error.\n”);
return EXIT_FAILURE;
}
write(fd, SYSFS_GPIO_RST_DIR_VAL, sizeof(SYSFS_GPIO_RST_DIR_VAL));
close(fd);

//reset: push high for >100ns
fd = open(SYSFS_GPIO_RST_VAL, O_RDWR);
if(fd == -1)
{
printf(“ERR: Radio hard reset pin value open error.\n”);
return EXIT_FAILURE;
}
while(1)
{
write(fd, SYSFS_GPIO_RST_VAL_H, >sizeof(SYSFS_GPIO_RST_VAL_H));
usleep(100000);
write(fd, SYSFS_GPIO_RST_VAL_L, >sizeof(SYSFS_GPIO_RST_VAL_L));
usleep(100000);
}
close(fd);

printf(“INFO: Radio hard reset pin value open error.\n”);
return 0;
}

Hi, rolly

I use debian and install libmraa-rockpi4 from Radxa APT , both mraa-gpio and mraa-i2c can work.

I’ll test if it works on ubuntu later. If you’re in a hurry, try debian first.

Hi, @rolly

I’m glad to tell you that both mraa-gpio and mraa-i2c can work in ubuntu if you install it from Radxa APT .

root@localhost:~# uname -a
Linux localhost.localdomain 4.4.154-87-rockchip-00029-g8216f17 #2 SMP Sat Jun 22
11:06:39 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:~#
root@localhost:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
root@localhost:~# sudo apt install libmraa-rockpi4
root@localhost:~#
root@localhost:~# mraa-gpio list
01 3V3:
02 5V:
03 SDA7: GPIO I2C
04 5V:
05 SCL7: GPIO I2C
06 GND:
07 SPI2_CLK: GPIO SPI
08 TXD2: GPIO UART
09 GND:
10 RXD2: GPIO UART
11 PWM0: GPIO PWM
12 GPIO4_A3: GPIO
13 PWM1: GPIO PWM
14 GND:
15 GPIO4_C5: GPIO
16 GPIO4_D2: GPIO
17 3V3:
18 GPIO4_D4: GPIO
19 SPI1TX,TXD4: GPIO SPI UART
20 GND:
21 SPI1RX,RXD4: GPIO SPI UART
22 GPIO4_D5: GPIO
23 SPI1CLK: GPIO SPI
24 SPI1CS: GPIO SPI
25 GND:
26 ADC_IN0: AIO
27 SDA2: GPIO I2C
28 SCL2: GPIO I2C
29 SCL6,SPI2RX: GPIO I2C SPI
30 GND:
31 SDA6,SPI2TX: GPIO I2C SPI
32 GPIO3_C0: GPIO
33 SPI2CS: GPIO SPI
34 GND:
35 GPIO4_A5: GPIO
36 GPIO4_A4: GPIO
37 GPIO4_D6: GPIO
38 GPIO4_A6: GPIO
39 GND:
40 GPIO4_A7: GPIO
root@localhost:~#
root@localhost:~# mraa-i2c list
Bus 0: id=07 type=linux default
Bus 1: id=02 type=linux
Bus 2: id=06 type=linux
root@localhost:~#

tip: You need to first remove mraa-gpio installed from PPA.

Hi setq,
Thanks but I tried to purge and reinstall via radxa apt, but it still fails. Could you please show your steps to remove the ppa package?

root@rockpi:/home/rock# apt-get install libmraa-rockpi4
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
libmraa-rockpi4
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/168 kB of archives.
After this operation, 0 B of additional disk space will be used.
Selecting previously unselected package libmraa-rockpi4.
(Reading database … 164938 files and directories currently installed.)
Preparing to unpack …/libmraa-rockpi4_0.3_arm64.deb …
Unpacking libmraa-rockpi4 (0.3) …
Setting up libmraa-rockpi4 (0.3) …
root@rockpi:/home/rock# mraa-gpio list
No Pins
root@rockpi:/home/rock# uname -a
Linux rockpi 4.4.154-87-rockchip-00029-g8216f17 #2 SMP Sat Jun 22 11:06:39 CST >2019 aarch64 aarch64 aarch64 GNU/Linux

Besides, my /etc/apt/sources.list.d/apt-radxa-com.list reads, is it correct?

deb http://apt.radxa.com/bionic/ bionic main

Hi rolly,

sudo apt-get remove libmraa2 libmraa-dev libmraa-java python-mraa python3-mraa node-mraa mraa-tools
sudo rm /etc/apt/sources.list.d/mraa-ubuntu-*.list
sudo apt-get update
sudo apt-get install libmraa-rockpi4

HI setq,
Thanks very much and I confirm it works with radxa apt. :slight_smile: