Shell task failed, exit value: 2 // reprise


#1

hello

i know this topic has been covered before, but i've followed all the previous suggestions to solve the problem and none of these have worked.

i'm running axoloti on a deiban 64-bit amd system.

i've installed the following dependencies:
lib32ncurses5_6.0+20161126-1+deb9u2_amd64.deb
lib32z1_1.2.11.dfsg-4.1_amd64.deb
libbz2-1.0_1.0.8-5_amd64.deb

in the axoloti preferences all my directory locations are correct.

and here is the output from the axoloti terminal when i try to run a patch:

Generate code complete
Creating directory on sdcard : /01_sine_oscillator
Done creating directory
Changing working directory on sdcard : /01_sine_oscillator
Done changing working directory
Start compiling patch
Compiling patch... with /opt/Axoloti/app/firmware
BDIR = /home/jason/axoloti/build\
FIRMWARE = .
make: *** No rule to make target '/home/jason/axoloti/build /xpatch.cpp', needed by '/home/jason/axoloti/build /xpatch.bin'. Stop.
shell task failed, exit value: 2
Compiling patch failed ( /home/jason/axoloti/axoloti-factory/patches/tutorials/01_sine_oscillator.axp )

many thanks for any help on this.


#2

The backslash at the end of BDIR looks wrong.


#3

thanks for your reply, but can you explain what you're referring to or how i can fix this?


#4

The BDIR variable, which contains the path to the build directory, has a ‘\’ at the end. This is causing an unwanted space in the file name, as seen in the ‘make’ error message:
'/home/jason/axoloti/build /xpatch.cpp'.

Notice the space between build and /xpatch, this is causing the error.

It’s been years since I installed, and I don’t recall how this is set.
Also, you didn’t write what version of Axoloti you are trying to use. It might not matter in this case, but don’t install 2.0.0.

Use 1.0.12-2, it is the newest, stable, functional version.


#5

thanks again for your help.

this is the version i installed:

axoloti-linux-1.0.12-2.deb

Notice the space between build and /xpatch, this is causing the error.

does anyone know a solution for this?


#6

Not sure if this is the best/proper solution, but BDIR is defined in /opt/Axoloti/app/firmware/Makefile.patch:
SPACE :=
SPACE +=
BDIR=$(subst $(SPACE),\ ,${axoloti_home}/build)
You could edit this to hardcode the correct value for your system. Note that FIRMWARE is hardcoded just below BDIR in Makefile.patch as well, so the proposed change seems low risk.

Cheerz,
John


#7

thanks for your reply.

Not sure if this is the best/proper solution, but BDIR is defined in /opt/Axoloti/app/firmware/Makefile.patch:
SPACE :=
SPACE +=
BDIR=$(subst $(SPACE),\ ,${axoloti_home}/build)
You could edit this to hardcode the correct value for your system. Note that FIRMWARE is hardcoded just below BDIR in Makefile.patch as well, so the proposed change seems low risk.

this doesn't seem like something i should have to do with a normal install. why would i have to edit some code for my system when many other people have already run this in linux without any problems? i have the feeling there must be an easier solution for this.


#9

You need to figure out why BDIR ends with build\, there shouldn’t be a backslash at the end.

First place I’d look is in Makefile.patch. If it has a backslash in the line which sets up BDIR, I’d remove the backslash, and see what happens. Sure, you shouldn’t need to fiddle with this, but there’s no harm in taking a minute to try it.

I don’t have a Linux system here, and on OSX this has always worked correctly for me. Aside from differences in specific paths, the OSX install is very similar to Linux.


#10

thanks again for your help.

First place I’d look is in Makefile.patch. If it has a backslash in the line which sets up BDIR, I’d remove the backslash, and see what happens. Sure, you shouldn’t need to fiddle with this, but there’s no harm in taking a minute to try it.

i had a look at the Makefile.patch. this is what i found:

SPACE :=
SPACE +=
BDIR=$(subst $(SPACE),\ ,${axoloti_home}/build)

are you suggesting i remove the backslash in the line:

BDIR=$(subst $(SPACE),\ ,${axoloti_home}/build)

so that the line looks likes this:

BDIR=$(subst $(SPACE), ,${axoloti_home}/build)


#11

subst is trying to replace any instances of $SPACE (whitespace) in the string ${axoloti_home}/build with an escaped space (a space with a backslash in front of it) For some reason, on your system it seems to be adding an escaped space at the end of the string - perhaps it is replacing the line terminator? There is a comment right below this for the definition of FIRMWARE that states that escaped spaces are an issue for it's expansion - you'll see a similar definition to BDIR using subst that is commented out and then a line that hardcodes FIRMWARE.
I think you can safely change the BDIR line to:
BDIR=${axoloti_home}/build
For safety, I'd comment out the original and add this, as was done for FIRMWARE.
Otherwise you need to work out why subst is adding the escaped space on your system - perhaps the version of make you are using? I really have no idea myself, sorry.
Hope this helps,
John


#12

thanks so much for your help.

i entered this:

SPACE :=
SPACE +=
BDIR=${axoloti_home}/build
FIRMWARE=.

and now everything seems to be working just fine. the patches load without a problem.
i'm not much of a programmer at all...!


#13

Glad it worked out! I was a professional programmer and I have no idea why that subst line would append the escaped space - my guess would be that the whitespace stuff that gets written into SPACE is corrupted somehow on your system and is somehow matching the end of string or something. Hardcoding BDIR is almost definitely easier than debugging whatever is happening here and it should not cause you any problems unless you change the value of axoloti_home to something that has whitespace (spaces, tabs, linefeeds, etc.) in it.
BTW, you no longer need the SPACE stuff with BDIR and FIRMWARE hardcoded, but it is not hurting anything to leave it there...

Regards,
John


#14

thanks again, really appreciate your help.


#15

I’m also a retired SW engineer, this kind of stuff was always more vexing to me than most of the ‘real’ code I worked on.

Axoloti is a very confusing piece of integration. Local code, remote code, Java, cross-compiled C++ generated by the Java code and combined with code in objects. Im glad Johannes got it working pretty well before abandoning it.