Borg: "illegal instruction" on Raspberry Pi 1

Created on 31 Dec 2015  路  18Comments  路  Source: borgbackup/borg

I am running Raspian Wheezy on a Raspberry Pi 1. After installing and running borg on it, it simply shows me "Illegal Instruction" every time I execute the command. This is probably also the case for other armv6 chips.

help wanted

Most helpful comment

I like to keep my systems as clean as possible. As useful as pip is, I really do not want it to spam my system with files.

So I am using pip, running as a dedicated user in a virtual env.

There is no reason why running it without the virtual env, other user or even root should make any difference.

All 18 comments

How did you install it?

Please note that the wheel packages I made are for arm v7 (raspi 2) and were made on Debian/Raspian Jessie.

Can you post more information about how to reproduce?

I installed it using pip (sudo pip-3.2 install borgbackup). If it helps, I can also post the output of pip during the installation.
The lz4 lib had to be installed from backports as it is not available otherwise. To get the error message, I can simply run borg without any parameters.

Yes, please post full pip commandline and output.

Here is the output of the installation.

The "_Ung眉ltiger Maschinenbefehl_" at the end is german for "_Invalid Instruction_"

Strange. Somehow this rather looks like a compiler error or some malfunctioning hardware.

Could someone else who owns a raspberry pi 1 please try to reproduce this?

To be more accurate: It is a Raspberry Pi 1 model B (with 512MB RAM and Ethernet).

Maybe it should be build with GDB mode and run under GDB to see what actually is happening there.

I'ld say "first reproduce it". If it can be reproduced, I'ld appreciate if @xor-gate helps with the debug build (didn't do that yet with C/Cython stuff).

I am using and working on the netinstaller for raspbian https://github.com/debian-pi/raspbian-ua-netinst.
My RPi1 is using raspbian Jessie. I would also recommend using Jessie instead of Wheezy (eventho that is probably unrelated to your problem.)

I installed borg by building it with a dedicated user using the installation documentation for PIP, plus installing the dependencies:

### Borg installation ###
useradd --base-dir /opt --create-home --no-user-group --system --shell /bin/bash borg-build
apt-get install build-essential
apt-get install python3-dev
apt-get install libssl-dev openssl libacl1-dev libacl1 liblz4-dev liblz4-1
apt-get install --no-install-recommends python-pip
apt-get install --no-install-reocmmends virtualenv
# optional fuse, check recommends? #apt-get install libfuse-dev fuse pkg-config

virtualenv --python=python3 borg-env
source borg-env/bin/activate

## install Borg + Python dependencies into virtualenv
#pip install 'llfuse<0.41'  # optional, for FUSE support
#                           # 0.41 and 0.41.1 have unicode issues at install time
pip install borgbackup

# And then added it to path with root:
ln -s ./borg-env/bin/borg /usr/local/bin/borg

You should try if your python setup works at all. You could try creating a test-pything script:

#!/usr/bin/python3
print('Test')
chmod +x <file>
./<file>

My installation of borg works just as my python3 installation without problems. I cannot reproduce the issues reported.

-Draget

@dragetd so it is working flawlessly for you and you do not have the issue as seen in first post?

I tried to use a new Raspian Jessie image and it seems to work now.

@elya5 did you install from 'http://ftp.debian.org/debian/ wheezy-backports main'?

liblz4 is indeed not available for wheezy. And Raspbian-wheezy does not provide wheezy-backports! So you have to compile the package for yourself. Debian ARM is based on the ARM7 instruction-set while the RPi1 needs ARM6. This is why Raspbian was created in the first place.

Using the package from debian wheezy-backports would explain why you got this error! I just tried it myself. apt-get installs liblz4-1 without complaining. Compiling and running borg ends in 'Illegal instruction'.

Mystery solved :)

Good job, maybe we should document this for people who want to run it on their Pi's :-). I think it is possible to setup a KVM Linux virtual machine to compile for raspberry but with more performance than the PI itself. Like this: https://gist.github.com/stefanozanella/4608873

@dragetd I did exactly that so we found my mistake. Thanks!

@dragetd Why did you use a dedicated user?
Thank you.

I like to keep my systems as clean as possible. As useful as pip is, I really do not want it to spam my system with files.

So I am using pip, running as a dedicated user in a virtual env.

There is no reason why running it without the virtual env, other user or even root should make any difference.

@dragetd , I'm sorry, but I don't understand what's the solution of this mistery.

please help me.
I've just install opencv 3.2.0 with instruction from http://pklab.net/?id=392&lang=EN, but the problem :

  • I can't using : import cv2
    that return : "illegal instruction", and then python interactive shell closed.
    NB: the other import work well, like : import numpy ang matplotlib
    cmake and make was built 100% succes for opencv, but some cmake options was edited

specs : Raspberry Pi 1 B, 512MB ARMv6
OS : Raspbian Jessie 8.0
python : python 2.7.9 and python 3.4.2 (both version with same error)

is that my raspberry don't support the opencv package?

sorry for my bad English
thank you

@kgfathur I've no idea why you installed opencv. borgbackup does not use that.

This issue tracker is about borgbackup only, so please keep your opencv / numpy / matplotlib issues elsewhere.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pierreozoux picture pierreozoux  路  4Comments

chebee7i picture chebee7i  路  5Comments

unlandm picture unlandm  路  4Comments

TinajaLabs picture TinajaLabs  路  6Comments

russelldavis picture russelldavis  路  3Comments