Page 1 of 1

Yet another LCD post

PostPosted: 15 Apr 2018, 17:24
by stablgr
Hi,

Like quite a few people on this forum I'm trying to connect either a 2x16 or 4x20 LCD to my Raspberry Pi running Rune Audio. unfortunately I haven't been too successful so far.

Setup details are:
Raspberry Pi 3
IQaudIO Pi-DAC Pro
RuneAudio - RuneAudio_rpi2_rp3_0.4-beta_20160321_2GB

I've started off by trying to follow XploD's post but seem to have stumbled very early in the process :(

I'm new to all of this so please bear with me. So far this is where I'm at:

Installed RuneAudio on microSSD
SSH into Pi and expanded the file system then rebooted.
Configured RuneAudio to work with the IQaudIO DAC then rebooted it and checked that all was working .
So far so good..... can successfully play tracks from connected USB memory stick.

Following XploDs post I then:

Installed Python2 (success)
Installed GCC compiler (success)

I had issues with installing the RPi.GPIO compiler using
wget http://raspberry-gpio-python.googlecode ... .2a.tar.gz
getting an Error 404, Not Found

I tried wget https://pypi.python.org/packages/e2/58/ ... 6.3.tar.gz
...and this seemed to work.

Then extracted it with tar -xvf RPi.GPIO-0.6.3.tar.gz which also seemed to go ok.

After moving to the RPi.GPIO-0.6.3 directory I tried installing it with python2 setup.py install ....but looks like I got a few errors:

running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/RPi
copying RPi/__init__.py -> build/lib.linux-armv7l-2.7/RPi
creating build/lib.linux-armv7l-2.7/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.linux-armv7l-2.7/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/source
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv7l-2.7/source/py_gpio.o
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.3.1/cc1: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory
error: command 'gcc' failed with exit status 1

I've tried doing this a few times now, each time starting with a fresh install of RuneAudio but keep getting the same problem.

I'd really appreciate any help with this.

Much appreciated,
Gary

Re: Yet another LCD post

PostPosted: 16 Apr 2018, 07:07
by janui
Hi stablgr,
Try installing/upgrading mpfr with:
Code: Select all
pacman -Sy mpfr
and try again.
If this doesn’t work please post the output of:
Code: Select all
cd /
find -name libmpfr*

janui

Re: Yet another LCD post

PostPosted: 18 Apr 2018, 02:08
by stablgr
Hi janui,

looks like I got a similar error as last time:

running install
running build
running build_py
running build_ext
building 'RPi._GPIO' extension
gcc -pthread -fno-strict-aliasing -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -DNDEBUG -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv7l-2.7/source/py_gpio.o
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.3.1/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
error: command 'gcc' failed with exit status 1

The output of
Code: Select all
find -name libmpfr*


is

./usr/lib/libmpfr.so
./usr/lib/libmpfr.so.6.0.1
./usr/lib/libmpfr.so.6

Hope this helps
Regards,
Gary

Re: Yet another LCD post

PostPosted: 19 Apr 2018, 10:42
by adrii
Hi Gary

In principle, you should be able to install Clang and build the module with that
Code: Select all
CC=clang python2 setup.py install

However, this particular module includes nested functions, which are not part of standard C and are not supported by Clang
https://stackoverflow.com/questions/2608158/nested-function-in-c
So, the build fails.

However, if you find another suitable GPIO module it will most likely be written in standard C and you will be able to build it with Clang.

Adrian.

Re: Yet another LCD post

PostPosted: 19 Apr 2018, 11:30
by adrii
Hi Gary

Someone has already reported the issue with RPi.GPIO and sent a patch
https://sourceforge.net/p/raspberry-gpio-python/tickets/122/

In which case, change to the RPi.GPIO-0.6.3 directory and run
Code: Select all
pacman -S patch clang
wget https://sourceforge.net/p/raspberry-gpio-python/tickets/122/attachment/0001-Remove-nested-functions.patch
patch -p1 < 0001-Remove-nested-functions.patch
CC=clang python2 setup.py install

That will get the module built. However, I don't know if there are any further issues.

Adrian.

Re: Yet another LCD post

PostPosted: 19 Apr 2018, 11:53
by s.k.
Hi,
You can try to install Frank’s newest RuneAudio
(http://www.runeaudio.com/forum/runeaudio-0-4-beta-for-raspberry-pi2-3-t4434.html#p19960)
Then you can try to follow this instructions
(http://www.runeaudio.com/forum/lcd-display-and-buttons-in-python-tutorial-and-code-t1191-110.html#p19483)

Works pretty well on my setup and the best with an additional IR remote for change the displays.