Log In  

Hi all,

Is the Rasbperry Pi version of the pico8 binary that comes with the 0.1.9b zipfile supposed to be statically linked? Note that I'm asking specifically about pico8, NOT pico8_dyn.

My copy of the pico8 binary from the 0.1.9b zipfile is dynamically linked, unfortunately. When I tried to run pico8 after unzipping version 0.1.9b on top of my 0.1.8 install, it started complaining about a missing libwiringPi.so.

Note that other people ([1] & [2], linked below) are also having problems launching the statically linked Raspi version.

Here's the binary that I got from the 0.1.9b zipfile:

$ file pico8
pico8: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=2b6b9f76d74fa2ce00530c81dd82d84646693f09, stripped

$ strings pico8 | grep '^0.1.'
0.1.9b

Silly me, I deleted all of my copies of the 0.1.8 zipfile, so I can't double check that the pico8 binary is actually statically linked; I don't see on the website where you can download old versions of the zipfile.

I was able to work around the missing libwiringPi.so by following the instructions on the author's website for installing it, it installs into /usr/local/lib, and sets up symlinks in /usr/lib.

Thanks,

Brian

[1] - Pi version of PICO-8 not launching
[2] - rpi B+ pico8

Instructions for installing libwiringPi
You'll need network access for your Raspberry Pi, as you'll be installing a package called git, then downloading the source code for libwiringPi.

You'll need a command shell on your Raspi in order to install libwiringPi. You have 2 options:

1) You can SSH in to your Raspi if you have SSH set up in raspi-config
2) You can quit Emulation Station in order to start a command shell; you'll need to have a keyboard plugged in to your Raspi. Quit Emulation Station to a shell by pressing Start on your joystick, choosing Quit, then Quit EmulationStation.

Once you have a command shell open, type in the lines of text below that do not start with hash marks '#'; the hash marks are comments for you, the comments are explaining what the commands you are typing are doing.

2016-11-15: PLEASE NOTE, THESE INSTRUCTIONS ARE OUTDATED; JUST USE THE COMMAND 'sudo apt-get install wiringpi' TO INSTALL THE WIRINGPI LIBRARIES

# Note: you should be logged in to your Raspberry Pi at this point...

# Verify your 'pico8' static binary is missing 'libwiringPi'
# If you unpacked the PICO-8 Raspberry Pi zipfile to another location
# besides /home/pi/pico-8, then please use that path in this next command
cd /home/pi/pico-8

# Run the "ldd" command, and pipe the output through "grep"
# If you see "libwiringPi.so => not found" in the output of this command,
# then you need to build "libwiringPi"
ldd pico8  | grep "not found"

# Past this point, it's assumed that you're trying to build "libwiringPi"...
# Install 'git'; the "sudo" command gives us privileges to install packages
sudo apt-get install git

# create a temporary directory in your "home directory"
cd ~; mkdir tmp; cd tmp

# Run 'git clone' in order to get a copy of the libwiringPi source code;
# no "sudo" required for this
git clone git://git.drogon.net/wiringPi wiringPi.git

# you'll see a few lines of text, starting with...
# "Cloning into 'wiringPi.git'..."
# After the repo is cloned to your Raspi, run
cd wiringPi.git; ./build

# More text will scroll by, starting with...
# "wiringPi Build script"
# It should take less than a minute for "wiringPi" to build.
# Once the "wiringPi" build script is done, verify it's been installed...
ls /usr/lib/libwiringPi* /usr/local/lib/libwiringPi*

# You should now see a bunch of files
# that all start with the filename "libwiringPi"

# Now verify that "libwiringPi" is installed and working
# For this command, you should see a "version" screen, 
# without any obvious errors...
gpio -v

# And this command should show you the names
# and states of all of the GPIO pins...
gpio readall

# Now go back and check your "pico8" binary
# Remember, if you have your "pico8" binary installed in a different directory,
# please use the name of that directory in this next command
cd /home/pi/pico-8

# Verify that your "pico8" binary is happy
ldd pico8  | grep "not found"

# No text from the "grep" output means that "libwiringPi"
# is now installed correctly.
# Go ahead and try to launch "pico8" and see if it works!

The RetroPie site has setup instructions for setting up SSH on RetroPie.

EDIT #1: added instructions from the libwiringPi author on how to test that libwiringPi is working correctly.
EDIT #2: Added the note about just using sudo apt-get install wiringpi, instead of having to compile the wiringpi library by hand

P#32343 2016-11-09 00:13 ( Edited 2016-11-16 03:47)

I can't exactly answer your question, but...

I had to install wiringPi too, when I first installed Pico-8 on Pi (v0.1.9).

I assume this is necessary due to the GPIO support added in v0.1.9.

P#32358 2016-11-09 07:59 ( Edited 2016-11-09 12:59)

I can confirm, I had to install "wiringPi" manually outside as well. Just go to any prompt and enter the following:

sudo apt-get update
sudo apt-get install wiringPi

...and then it'll work fine!

P#32396 2016-11-11 11:53 ( Edited 2016-11-11 16:53)
1

@TonyTheTGR is correct, just need to install the wiringpi package, no need for the above. I wasn't aware it was a package, so I did it the hard way.

The easy way is:

sudo apt-get install wiringpi
P#32540 2016-11-15 22:44 ( Edited 2016-11-16 03:44)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 06:19:53 | 0.010s | Q:16