Include File Path Error in hello-camkes-2 Tutorial
johnkrainski opened this issue · comments
I was having trouble with compiling the hello-camkes-2 tutorial, so I downloaded the solution source files for the hello-camkes-2 tutorial and inserted them on top of the initial file set, to ensure they were located in the right place. I received compiler errors on all instances of
include "str_buf.h".
This affected about 8-10 files. I took the easy way of changing these instances to point to an absolute path of "/home/sel4/sel4-tutorials-camkes/projects/sel4-tutorials/solutions/hello-camkes-2/include/str_buf.h", which enabled the example to compile and run correctly. Since there are multiple tutorials and multiple instances of the str_buf.h file, I wasn't sure of the most elegant way to fix the path issue.
That's interesting.
What did you do to copy the solutions over? (e.g. cp -R projects/sel4-tutorials/solutions/hello-camkes-2/* apps/hello-camkes-2/
or something else?)
Could you try if the following works for you (both work for me)?
This checks out the solutions and allows you to build and run them right away without having to do any copying:
mkdir camkes-solutions
cd camkes-solutions
repo init -u https://github.com/sel4-projects/sel4-tutorials-manifest.git
repo sync -m camkes-solutions.xml
make arm_hello-camkes-2_defconfig
make silentoldconfig
make
qemu-system-arm -M kzm -nographic -kernel images/capdl-loader-experimental-image-arm-imx31
The following checks out the tutorial's incomplete solutions and then copies the complete solution over that:
mkdir camkes-tutorial-cpsol
cd camkes-solutions-cpsol
repo init -u https://github.com/sel4-projects/sel4-tutorials-manifest.git
repo sync -m camkes-tutorials.xml
cp -R projects/sel4-tutorials/solutions/hello-camkes-2/* apps/hello-camkes-2/
make arm_hello-camkes-2_defconfig
make silentoldconfig
make
qemu-system-arm -M kzm -nographic -kernel images/capdl-loader-experimental-image-arm-imx31
I used the steps in the Tutorial Code section here: https://github.com/seL4-projects/sel4-tutorials
mkdir sel4-tutorials
cd sel4-tutorials
repo init -u http://github.com/sel4-projects/sel4-tutorials-manifest
repo sync -m sel4-tutorials.xml
and
mkdir camkes-tutorials
cd camkes-tutorials
repo init -u http://github.com/sel4-projects/sel4-tutorials-manifest
repo sync -m camkes-tutorials.xml
When I try the above, I get the following errors:
sel4@sel4-VirtualBox:~/camkes-solutions$ repo init -u https://github.com/sel4-projects/sel4-tutorials.git
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://github.com/sel4-projects/sel4-tutorials.git
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Counting objects: 436, done.
remote: Total 436 (delta 0), reused 0 (delta 0), pack-reused 436
Receiving objects: 100% (436/436), 6.48 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (214/214), done.
From https://github.com/sel4-projects/sel4-tutorials
* [new branch] master -> origin/master
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found
and
sel4@sel4-VirtualBox:~/camkes-solutions$ repo sync -m camkes-solutions.xml
Traceback (most recent call last):
File "/home/sel4/camkes-solutions/.repo/repo/main.py", line 513, in <module>
_Main(sys.argv[1:])
File "/home/sel4/camkes-solutions/.repo/repo/main.py", line 489, in _Main
result = repo._Run(argv) or 0
File "/home/sel4/camkes-solutions/.repo/repo/main.py", line 140, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/sel4/camkes-solutions/.repo/repo/command.py", line 67, in OptionParser
self._Options(self._optparse)
File "/home/sel4/camkes-solutions/.repo/repo/subcmds/sync.py", line 175, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/sel4/camkes-solutions/.repo/repo/manifest_xml.py", line 334, in default
self._Load()
File "/home/sel4/camkes-solutions/.repo/repo/manifest_xml.py", line 381, in _Load
self.manifestProject.worktree))
File "/home/sel4/camkes-solutions/.repo/repo/manifest_xml.py", line 417, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: '/home/sel4/camkes-solutions/.repo/manifest.xml'
FWIW, I've been getting the "curl: (22) The requested URL returned error: 404 Not Found" error throughout all my other github requests, and I'm not sure if it's causing a problem. I was able to get all the other Prerequisites and tutorials with no issue.
Yes, I made a mistake in the instructions!
I fixed it above, but the repo init command should be:
repo init -u https://github.com/sel4-projects/sel4-tutorials-manifest.git
Sorry about that.
Closing as this has been fixed.