failed to install spinnaker_tools

42 views
Skip to first unread message

Alberto Patiño Saucedo

unread,
Mar 3, 2022, 6:41:59 AM3/3/22
to SpiNNaker Users Group
Hi all,

I'm following the tutorial on the creation of custom models for sPyNNaker 6.0.0, however, I'm stuck at the configuration of the C development environment, specifically at the installation of spinnaker_tools.

I followed the following steps:

1. Installed a compiler: As I'm on Windows, I installed WSL with Ubuntu 20.04 and the Development Dependencies for Ubuntu (arm-none-eabi and perl). I checked that there are several 'arm-none-eabi-*' files located in Ubuntu's /usr/bin directory

2. Install spinnaker_tools: I cloned the spinnaker_tools directory, modified the setup file  which configures SPINN_DIRS, PERL5LIB, GNUTOOLS (which points to /usr). Commented out the ARMTOOLS part. Then sourced the setup file and ran 'make' with the following output:

make[1]: Entering directory '/home/alberto/spinnaker_tools/sark'
mkdir -p ../build/gnu
/home/alberto/spinnaker_tools/tools/arm2gas sark_alib.s > ../build/gnu/sark_alib.gas
mkdir -p ../build/gnu
/home/alberto/spinnaker_tools/tools/h2asm /home/alberto/spinnaker_tools/include/spinnaker.h | /home/alberto/spinnaker_tools/tools/arm2gas > ../build/gnu/spinnaker.gas
mkdir -p ../build/gnu
/home/alberto/spinnaker_tools/tools/h2asm /home/alberto/spinnaker_tools/include/sark.h | /home/alberto/spinnaker_tools/tools/arm2gas > ../build/gnu/sark.gas
mkdir -p ../build/gnu
arm-none-eabi-as --defsym GNU=1 -mthumb-interwork -march=armv5te -I ../build/gnu -o ../build/gnu/sark_alib.o ../build/gnu/sark_alib.gas
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_base.o sark_base.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_event.o sark_event.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_timer.o sark_timer.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_hw.o sark_hw.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_isr.o sark_isr.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_alloc.o sark_alloc.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_io.o sark_io.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_pkt.o sark_pkt.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -fdata-sections -ffunction-sections -g -DSARK_API -Os -o ../build/gnu/sark_div0.o sark_div0.c
rm -f /home/alberto/spinnaker_tools/lib/libsark.a
arm-none-eabi-ar -rcs /home/alberto/spinnaker_tools/lib/libsark.a ../build/gnu/sark_alib.o ../build/gnu/sark_base.o ../build/gnu/sark_event.o ../build/gnu/sark_timer.o ../build/gnu/sark_hw.o ../build/gnu/sark_isr.o ../build/gnu/sark_alloc.o ../build/gnu/sark_io.o ../build/gnu/sark_pkt.o ../build/gnu/sark_div0.o
make[1]: Leaving directory '/home/alberto/spinnaker_tools/sark'
make[1]: Entering directory '/home/alberto/spinnaker_tools/spin1_api'
make[2]: Entering directory '/home/alberto/spinnaker_tools/sark'
rm -f ../build/gnu/sark.o
arm-none-eabi-ld -i -o ../build/gnu/sark.o ../build/gnu/sark_alib.o ../build/gnu/sark_base.o ../build/gnu/sark_event.o ../build/gnu/sark_timer.o ../build/gnu/sark_hw.o ../build/gnu/sark_isr.o ../build/gnu/sark_alloc.o ../build/gnu/sark_io.o ../build/gnu/sark_pkt.o ../build/gnu/sark_div0.o
make[2]: Leaving directory '/home/alberto/spinnaker_tools/sark'
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -mthumb -DTHUMB -fdata-sections -ffunction-sections -g -Os -o ../build/gnu/spin1_api.o spin1_api.c
arm-none-eabi-gcc -c -mthumb-interwork -march=armv5te -std=gnu99 -ffreestanding -I /home/alberto/spinnaker_tools/include -fdata-sections -ffunction-sections -g -Os -o ../build/gnu/spin1_isr.o spin1_isr.c
rm -f /home/alberto/spinnaker_tools/lib/libspin1_api.a
arm-none-eabi-ar -rcs /home/alberto/spinnaker_tools/lib/libspin1_api.a ../build/gnu/sark.o ../build/gnu/spin1_api.o ../build/gnu/spin1_isr.o
make[1]: Leaving directory '/home/alberto/spinnaker_tools/spin1_api'


I don't notice build errors there. However, when I try to compile a single-file application:

make -f $SPINN_DIRS/make/app.make APP=example

this appears

make: *** No rule to make target 'build/gnu/example.elf', needed by 'build/gnu/example.bin'.  Stop.

A similar "No rule to make target " error appears when trying to compile the c models in the sPyNNaker8NewModelTemplate directory. So I think it's safe to assume the spinnaker_tools didn't install correctly. I suspect I did something wrong in the configuration of arm-none-eabi and the path of GNULIB... 

Any advice to solve this would be appreciated.

Best, 

Alberto.



 

Andrew Rowley

unread,
Mar 3, 2022, 6:53:48 AM3/3/22
to Alberto Patiño Saucedo, SpiNNaker Users Group

Hi,

 

Are you running the “example” compile in a folder where you have a file called example.c?

 

This would be required for that to execute.  I tried with hello.c from spinnaker_tools/apps/hello, which I copied to a new folder and then, from within that folder, ran the make i.e.:

 

mkdir test_hello

cp spinnaker_tools/apps/hello/hello.c test_hello

cd test_hello

make -f $SPINN_DIRS/make/app.make APP=hello

 

This then compiled without issue.

 

 

In any case, if you want to build new models, the above make step is not necessary; instead you should proceed to installing spinn_common and SpiNNFrontEndCommon, and the instructions beyond this, including setting the NEURAL_MODELLING_DIRS.  Compiling a neural model binary is then a bit more complicated, and involves writing a Makefile, which can also be seen in the instructions after this.

 

Let us know if you continue to have issues,

 

Andrew :)

 

 

--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/spinnakerusers/217047eb-8e7b-42ce-92c3-18e5c33e3f71n%40googlegroups.com.

Alberto Patiño Saucedo

unread,
Mar 3, 2022, 7:45:15 AM3/3/22
to SpiNNaker Users Group
Hi Andrew, thanks for your prompt reply

I just compiled the hello.c example without issue as you suggested. It generated an aplx file, so I think the spinnaker_tools are fine.

I then proceeded with the installation of spinn_common and SpiNNFrontEndCommon (I cloned both from the repository and ran make, make install in the appropriate directories without issue). Also set up the NEURAL_MODELLING_DIRS. However, when I try to compile 'my_model_curr_exp' in  sPyNNaker8NewModelTemplate/c_models/makefiles, I'm still having the 'no rule to make target error':

 make: *** No rule to make target '/home/alberto/sPyNNaker/neural_modelling/modified_src/neuron/c_main.c', needed by '/home/alberto/sPyNNaker8NewModelTemplate/c_models/build/my_model_curr_exp/neuron/c_main.o'.  Stop.

it seems there is a 'modified_src' folder missing at neural_modelling. There is a 'src' folder at that location instead, which has neuron/c_main.c on it. I tried renaming that directory but that didn't work.

Alberto. 

Andrew Gait

unread,
Mar 3, 2022, 7:52:43 AM3/3/22
to SpiNNaker Users Group
Hi Alberto,

You also need to build the C code inside sPyNNaker (simply running make in sPyNNaker/neural_modelling/ should work for this) before trying to build anything in sPyNNaker8NewModelTemplate.

Alternatively you could also clone the SupportScripts repository (from the same place as you have the other repositories) and then simply run SupportScripts/automatic_make.sh from the directory containing all repositories you have downloaded and this will do all the steps for you.

Andy

----------------------------------------------------
Dr. Andrew Gait (he/him),
Research Software Engineer,
APT Group,
Department of Computer Science,
The University of Manchester,
Oxford Road, Manchester M13 9PL

email: andre...@manchester.ac.uk
web: http://personalpages.manchester.ac.uk/staff/Andrew.Gait/

I do not expect a reply to this email outside of normal working hours

From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Alberto Patiño Saucedo <alberti...@gmail.com>
Sent: 03 March 2022 12:45

To: SpiNNaker Users Group <spinnak...@googlegroups.com>
Subject: Re: [SpiNNaker Mailing List] failed to install spinnaker_tools
 

Alberto Patiño Saucedo

unread,
Mar 4, 2022, 4:17:47 AM3/4/22
to SpiNNaker Users Group
Hi Andrew,

this appears when trying to build the code in sPyNNaker/neural_modelling (also when running automatic_make.sh):

for d in makefiles/synapse_expander makefiles/bit_field_expander makefiles/spike_source/poisson makefiles/delay_extension makefiles/robot_motor_control makefiles/neuron_only makefiles/synapse_only makefiles/neuron; do make -C $d || exit $?; done
make[1]: Entering directory '/home/alberto/sPyNNaker/neural_modelling/makefiles/synapse_expander'
for f in delay_expander.mk synapse_expander.mk; do make -f $f || exit $?; done
make[2]: Entering directory '/home/alberto/sPyNNaker/neural_modelling/makefiles/synapse_expander'
make[2]: *** No targets.  Stop.
make[2]: Leaving directory '/home/alberto/sPyNNaker/neural_modelling/makefiles/synapse_expander'
make[1]: *** [Makefile:19: all] Error 2
make[1]: Leaving directory '/home/alberto/sPyNNaker/neural_modelling/makefiles/synapse_expander'
make: *** [Makefile:37: all] Error 2


Thanks for your help,

Alberto.

Andrew Rowley

unread,
Mar 4, 2022, 8:43:16 AM3/4/22
to Alberto Patiño Saucedo, SpiNNaker Users Group

Hi,

 

Synapse_expander is the first Makefile in the neural_moddelling.  This might then suggest that the issue is with the NEURAL_MODELLING_DIRS folder.  This should point at the “neural_modelling” folder within sPyNNaker.  I would expect from the error message below that this should be:

/home/alberto/sPyNNaker/neural_modelling

 

Hopefully making sure that is correct will fix the issues.

 

Andrew :)

 

 

Alberto Patiño Saucedo

unread,
Mar 4, 2022, 9:50:20 AM3/4/22
to SpiNNaker Users Group
Hi Andrew, 

My NEURAL_MODELLING_DIRS environment variable is indeed  /home/alberto/sPyNNaker/neural_modelling

But I agree that there is something weird happening with the environment variables. I'm using Ubuntu but on a WSL, so it also takes the native Windows environment variables. I remember I first set NEURAL_MODELLING_DIRS, SPINN_DIRS, and others in Windows using the POSIX standard, but afterward, I removed those variables from Windows and now I'm just (apparently) using the Ubuntu environment variables. 

I'll try on a native Ubuntu system and let you know if the issues persist. 

Best regards,

Alberto.

Andrew Rowley

unread,
Mar 4, 2022, 9:57:31 AM3/4/22
to Alberto Patiño Saucedo, SpiNNaker Users Group

Hi,

 

Yes that is worth a go I guess.  Additionally, our latest git code is generally quite stable (tested daily) so you might also want to try that.  To get that code fully, the easiest way is to follow these instructions:

https://spinnakermanchester.github.io/development/gitinstall.html

 

You are likely to already have the C and Python requirements; installing in a virtualenv is recommended just to be sure nothing else is getting in there.

 

Note that I also use WSL(2) on a Windows machine, and this works well for me so far.  It uses environment variables locally in the WSL VM.  I do tend to be working on the git version of course, so it might just be that the instructions where you download the zip files are not completely working.  I will try to run this in my own environment, but as that isn’t a clean environment it might not fail for me in the same way…

 

Andrew :)

 

Alberto Patiño Saucedo

unread,
Mar 11, 2022, 11:22:32 AM3/11/22
to SpiNNaker Users Group
Hi again Andrew,

Last update on this case:

I did a clean install of the c development environment on an Ubuntu VM (VirtualBox) by cloning the minimal necessary repos and compiling and it now installs everything without error. So most probably the first time I messed up the environment variables. There's only a small dependency conflict with spalloc when installing the python models in sPyNNaker8NewModelTemplate, as it expects spalloc 1!6.0.1 as a requirement but the latest version of spalloc is 1!6.0.0. I'm able to run custom example models nonetheless.

I also installed the development environment via the git support script which is a lot easier, but not without quirks, as it required PyNN 0.8 for the first steps, and then forced me to upgrade to PyNN >= 0.9.1 for the last steps. But again, the compilation and running of custom models could be performed without errors.

Thanks for your support!

Alberto.

Christian Brenninkmeijer

unread,
Mar 14, 2022, 6:52:55 AM3/14/22
to Alberto Patiño Saucedo, SpiNNaker Users Group
Hi,
The way we version spinnaker is that all repositories must either be the same release version or all same github branch.

It looks like your spalloc branch is the release 1!6.0.0 (on pypi) rather than the github master which is 1!6.0.1

Looking at the install script this is likely to be caused by there already being a local spalloc repository.

You could fix this by doing a git fetch.

However, I have check the spalloc repository and other than changing the version number there have been no changes to spalloc since the release so if your system is working you don't need to worry about the reported version mismatch.

Christian
University of Manchester 

PS. I think spalloc is the only repository where a clash between 1!6.0.0 and 1!6.0.1 can be safely ignored.


From: spinnak...@googlegroups.com <spinnak...@googlegroups.com> on behalf of Alberto Patiño Saucedo <alberti...@gmail.com>
Sent: 11 March 2022 16:22
Reply all
Reply to author
Forward
0 new messages