grisp-software
grisp-software copied to clipboard
WiFi optimizations and libbsd to FreeBSD 12 update
This pull requests updates the libbsd to a FreeBSD baseline close to the FreeBSD 12 release (2018-09-17). This requires an RSB and RTEMS update as well.
The saf1761_otg driver uses now a real interrupt handler for the saf1761_otg_filter_interrupt() function which reduces the amount of task switches to the interrupt server.
An mbuf alignment was fixed in the rtwn driver receive path to avoid unnecessary data movements.
Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.
curl -o /dev/null ftp://[email protected]/dev/zero % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 104M 0 0 485k 0 --:--:-- 0:03:39 --:--:-- 542k
curl -T /dev/zero ftp://[email protected]/dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 76.2M 0 0 0 76.2M 0 593k --:--:-- 0:02:11 --:--:-- 606k
The signal quality has a huge impact on the throughput. This makes measurements quite uncertain.
The rtwn transmit path uses m_copydata() which uses bcopy() which is a memmove(). There is no specialized memmove() implementation for ARMv7-M in Newlib (unlike to memcpy()). This is a slight performance penalty.
Any progress on this, Freebsd12-release has published a few days ago
Any progress on this, Freebsd12-release has published a few days ago
Are you having issues that you hope to be fixed by this @mko-io ?
Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.
@sebhub I fail to see how this is done. All I see some smaller stacks and the inclusion of stackalloc.h
We would like to replicated this for the GRiSP image too (in addition to moving heavily used RTEMS and Erlang modules into internal SRAM once we figure out how that is done -- hints welcome ;-)
@peerst no, I just curious about whether the new Freebsd release would improve grisp or not
@mko-io I don't expect FreeBSD 12 to bring much new things for us. This PR is mainly about the WiFi and other optimisations which just happen to be made on the latest libbsd, which happens to be based on FreeBSD 12.
What we would get is all security updates since the last update of libbsd if there are any in the kernel network stack.
The libbsd upstream is based on FreeBSD head 2018-12-20. The FreeBSD 12 release was 2018-12-11:
https://www.freebsd.org/releases/12.0R/announce.html
It includes an update of wpa_supplicant to version 2.7.
It includes an update of the OpenSSL baseline to version 1.1.1a.
Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.
@sebhub I fail to see how this is done. All I see some smaller stacks and the inclusion of stackalloc.h
We would like to replicated this for the GRiSP image too (in addition to moving heavily used RTEMS and Erlang modules into internal SRAM once we figure out how that is done -- hints welcome ;-)
The inclusion of <bsp/stackalloc.h> in the configuration source file just enables a custom stack allocator. It uses the internal SRAM. The earlier a task is created the more likely its task stack is allocated from the internal SRAM. An alternative would be to use POSIX threads with a user defined task stack or a new API for Classic tasks which allow a user defined stack.
Builds fine on Linux, but still having issues on macOS, need to have a closer look...
@peerst I've read about Freebsd has some improvement on MMC/SDIO stack (base on CAM), does this mean we can use SDIO based wifi chip on grisp board?
@peerst I've read about Freebsd has some improvement on MMC/SDIO stack (base on CAM), does this mean we can use SDIO based wifi chip on grisp board?
A note regarding that from me: We had a GSoC student in 2018 who worked on the topic of using the FreeBSD-SDIO stack on RTEMS. He had some success on a Beagle Bone Black with a normal SD storage card. But there was still some work left. I would expect that about the following would be necessary:
- Port SDIO stack via libbsd (part of the GSoC work should be re-usable).
- Adapt the Atsam SD-Card driver so that it works with the new stack.
So SDIO WLAN modules should theoretically be possible but they would need quite some work.
@sebhub @c-mauderer I'm having trouble building this toolchain version on macOS 10.14.2:
../../gcc-7.3.0/gcc/graphite-optimize-isl.c:57:19: error: use of undeclared identifier 'isl_space_dim'
unsigned dims = isl_space_dim (space, isl_dim_set);
^
../../gcc-7.3.0/gcc/graphite-optimize-isl.c:60:3: error: use of undeclared identifier 'isl_space_free'
isl_space_free (space);
^
This could be related https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724
It's quite possible that GCC 7.3.0 does not play nice with ISL 0.20 / whatever is installed in macOS 10.13... Any suggestions?
The branch has already slightly fallen behind RTEMS upstream. Sebastian updated gcc to 7.4.0 in Dezember. Would you expect that 7.4.0 would work? In that case it might would be a good idea to update rtems, libbsd and rsb in this branch and try with that.
@c-mauderer It seems it should be fine in 7.4 according to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724#c6
Richard Biener 2018-08-01 08:08:08 UTC: Fixed for GCC 7.4+.
So it sounds like a good idea to update all of them to the latest version.
@c-mauderer Can you tell me how to do that, or help me do it?
To update the submodules, the following steps are necessary (written out of my head so no guarantee for no typos):
- go into the submodules directory
- Update the mirror of the remote repository on github
- go to the submodule directory and add a remote for the official repo at git.rtems.org (
git remote add rtems git://git.rtems.org/rtems.git- adapt rtems.git for the other submodules) - fetch the latest changes from git.rtems.org and push them to the GRiSP mirror repo (
git fetch rtemsandgit push origin rtems/master:masterassuming you didn't change the name oforigin)
- go to the submodule directory and add a remote for the official repo at git.rtems.org (
- check out the master from the github mirror (
git co origin/master) - repeat for other submodules
- do a
git stin grisp-software - it should tell you that the submodules have been changed - you can now add and commit the changed submodules and try whether everything still builds
Note that you should always use rtems, rtems-libbsd and rtems-source-builder from about the same date. Sometimes there are dependencies - especially from libbsd to newlib and rtems.
@c-mauderer Got further this time, but another error appeared when compiling GCC 7.4.0:
/arm-rtems5/eb/thumb/armv7-r/vfpv3-d16/hard/libstdc++-v3/include/bits/locale_facets.h:41:10: fatal error: bits/ctype_base.h: No such file or directory
#include <bits/ctype_base.h>
^~~~~~~~~~~~~~~~~~~
Some casual searching suggests libstdc++ is not available in macOS Mojave (10.14)...
Seems Apple decided to remove /usr/include in the upgrade to macOS Mojave (!). Following the instructions here solved the error above: https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave
Next problem (or is it the build successful?) is this:
...
Checking for RTEMS_POSIX_API : yes
Checking for RTEMS_SMP : no
Checking for RTEMS_NETWORKING : no
Checking for header dlfcn.h : yes
Checking for header rtems/pci.h : yes
Configure variant: : arm-rtems5-atsamv-grisp
Checking for header rtems/rtems-debugger.h : yes
'configure' finished successfully (0.978s)
+ waf
Could not create the directory ///o
I'm not entirely sure because it is missing some context but I would assume that RTEMS did build fine but the libbsd build went wrong. Can you do three things:
- There is now a known working version of waf checked in into libbsd. Use that version.
- Add a -v to the waf call.
- Re-run
./build/build-libbsd.sh
Basically 1 and 2 would be the following changes:
diff --git a/build/build-libbsd.sh b/build/build-libbsd.sh
index 61bc009..909499f 100755
--- a/build/build-libbsd.sh
+++ b/build/build-libbsd.sh
@@ -55,15 +55,15 @@ then
fi
fi
-waf configure \
+./waf configure \
--prefix="${PREFIX}" \
--rtems-bsps="${RTEMS_CPU}/${BSP_NAME}" \
--buildset="${SCRIPTDIR}/libbsd-buildset.ini"
-waf
+./waf -v
if [ $DO_INSTALL -ne 0 ]
then
- waf install
+ ./waf install
fi
if [ "$BSP_NAME" = "atsamv" ]
The -v should be removed after the problem is solved. The other changes would be good to keep.
@c-mauderer You're correct that it was in the libbsd build. Unfortunately the waf change didn't solve it:
'configure' finished successfully (1.272s)
+ ./waf -v
Could not create the directory ///o
Full output here: https://gist.github.com/eproxus/2b60f59c50ac74f05c3c93147ef58d27
Somehow I remember that I had that output once too. I'm currently not sure when or why. Could you try to clean the rtems-libbsd directory? For that I would suggest the command git clean -dxn inside the libbsd directory. That shows a list with files that git wants to delete. That should be the build directory and some waf specific stuff. If the output sounds reasonable, you can replace the n by an f to really delete all listed files.
@c-mauderer After cleaning the repo from scratch with git clean -fXd and git clean -fxd including all submodules I still get the same error.
Do you have the branch somewhere so that I could try a build on my Linux machine?
@c-mauderer Pushed my changes to eproxus/wifi-opti-and-libbsd-to-freebsd-12-update
@eproxus That branch builds fine on my OpenSUSE 42.3 Linux. So I really have some trouble debugging that problem. You might can try to add some of the extra verbosity options to the waf configure and build. There are
-v, --verbose verbosity level -v -vv or -vvv [default: 0]
--show-commands Print the commands as strings.
--enable-warnings Enable all warnings. The default is quiet builds.
With some luck, one of them provides some more info. -v should work for configure and build. The other two are configure options.
@c-mauderer Configure seems to work fine, it is the actual build step that fails. Here's the full output with -vvv (just -v didn't show anything extra):
'configure' finished successfully (1.006s)
+ ./waf -vvv
12:55:57 env {'files': ['/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/wscript'], 'run_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'hash': '\xed\x99n+\xd7\xc0\x839B\x07J\xeaL\xdb\xee\xcf', 'top_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'out_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/build', 'argv': ['./waf', 'configure', '--prefix=/opt/grisp/grisp-software/8b2967b756/build/..//rtems-install/rtems/5/', '--rtems-bsps=arm/atsamv', '--buildset=/opt/grisp/grisp-software/8b2967b756/build/libbsd-buildset.ini'], 'launch_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'environ': {'GOPATH': '/Users/user/Code/go', 'TERM_SESSION_ID': 'w0t0p0:7CD55A09-9877-40EA-A782-7EED94C00FF5', 'ERL_ZFLAGS': '-kernel shell_history enabled', 'LAST_EXEC_TIME': '1', 'XPC_SERVICE_NAME': '0', 'TERM_PROGRAM_VERSION': '3.2.0beta8', 'TMUX': '/private/tmp/tmux-501/default,2681,0', 'HOMEBREW_NO_ANALYTICS': '1', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.r2IZtuVlL2/Listeners', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.DjgiZR0JRi/Render', 'LOGNAME': 'user', 'USER': 'user', 'CHANDLER_GITHUB_API_TOKEN': '87cd7c6e08dc5712294daa9a3c86223d6be82e0f', 'HOME': '/Users/user', 'ITERM_PROFILE': 'Default', 'PATH': '/opt/grisp/grisp-software/8b2967b756/build/..//rtems-install/rtems/5//bin:/Users/user/.asdf/shims:/Users/user/.asdf/shims:/Users/user/.asdf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/user/.bin:/Users/user/.cache/rebar3/bin:/usr/local/sbin:/Users/user/Code/go/bin:/Users/user/.psvm/current/bin:/usr/local/texlive/2017/bin/x86_64-darwin:/Users/user/.cargo/bin', 'CHANGELOG_GITHUB_TOKEN': '9ab70a1a35759050d22d997f2ccba4469574faff', 'LC_ALL': 'en_US.UTF-8', '_': './waf', 'TERM_PROGRAM': 'iTerm.app', 'TERM': 'vt100', 'SHELL': '/usr/local/bin/zsh', 'COLORFGBG': '7;0', 'TMPDIR': '/var/folders/72/nh3_jg490_g0y21tn6r6h57h0000gn/T/', 'SHLVL': '3', 'OLDPWD': '/opt/grisp/grisp-software/8b2967b756', 'HOMEBREW_GITHUB_API_TOKEN': '5cf2312251141f6511c13580b6bfd9d78227ee73', 'SECURITYSESSIONID': '186ab', 'VISUAL': 'nvim', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x0', 'BASE16_THEME': 'base16-gruvbox-dark-hard', 'ITERM_SESSION_ID': 'w0t0p0:7CD55A09-9877-40EA-A782-7EED94C00FF5', 'TMUX_PANE': '%3', 'ASDF_DIR': '/Users/user/.asdf', 'COLORTERM': 'truecolor', 'VIMPAGER_VIM': 'nvim', 'PWD': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'COMMAND_MODE': 'unix2003', 'TMUX_PLUGIN_MANAGER_PATH': '/Users/user/.tmux/plugins/', 'EDITOR': 'nvim'}, 'config_cmd': 'configure', 'options': {'files': '', 'freebsd_options': '', 'force': False, 'verbose': 0, 'no_lock_in_run': '', 'no_lock_in_out': '', 'whelp': 0, 'show_commands': False, 'destdir': '', 'zones': '', 'buildset': ['/opt/grisp/grisp-software/8b2967b756/build/libbsd-buildset.ini'], 'prefix': '/opt/grisp/grisp-software/8b2967b756/rtems-install/rtems/5', 'pdb': 0, 'profile': 0, 'rtems_path': None, 'rtems_tools': None, 'net_config': 'config.inc', 'targets': '', 'out': '', 'auto_regen': False, 'jobs': 8, 'rtems_archs': 'all', 'progress_bar': 0, 'optimization': '2', 'top': '', 'warnings': False, 'libdir': None, 'colors': 'auto', 'keep': 0, 'rtems_version': None, 'rtems_bsps': 'arm/atsamv', 'distcheck_args': None, 'bindir': None, 'no_lock_in_top': ''}}
12:55:57 env {'version': 33557760, 'tools': [{'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'cxx', 'tooldir': None, 'funs': None}, {'tool': 'g++', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'asm', 'tooldir': None, 'funs': None}, {'tool': 'gas', 'tooldir': None, 'funs': None}]}
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['CC']))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['CFLAGS']))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('CPPPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['CC_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CC_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(to_list(env['CPPFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['LINK_CC']))", "\tlst.extend(to_list(env['LINKFLAGS']))", "\tlst.extend(merge(to_list(env['CCLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CCLNK_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(tsk.colon('RPATH_ST', 'RPATH'))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('FRAMEWORK_ST', 'FRAMEWORK'))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['STLIB_MARKER']))", "\tlst.extend(tsk.colon('STLIBPATH_ST', 'STLIBPATH'))", "\tlst.extend(tsk.colon('STLIB_ST', 'STLIB'))", "\tlst.extend(to_list(env['SHLIB_MARKER']))", "\tlst.extend(tsk.colon('LIBPATH_ST', 'LIBPATH'))", "\tlst.extend(tsk.colon('LIB_ST', 'LIB'))", "\tlst.extend(to_list(env['LDFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['CXX']))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['CXXFLAGS']))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('CPPPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['CXX_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CXX_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(to_list(env['CPPFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['LINK_CXX']))", "\tlst.extend(to_list(env['LINKFLAGS']))", "\tlst.extend(merge(to_list(env['CXXLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CXXLNK_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(tsk.colon('RPATH_ST', 'RPATH'))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('FRAMEWORK_ST', 'FRAMEWORK'))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['STLIB_MARKER']))", "\tlst.extend(tsk.colon('STLIBPATH_ST', 'STLIBPATH'))", "\tlst.extend(tsk.colon('STLIB_ST', 'STLIB'))", "\tlst.extend(to_list(env['SHLIB_MARKER']))", "\tlst.extend(tsk.colon('LIBPATH_ST', 'LIBPATH'))", "\tlst.extend(tsk.colon('LIB_ST', 'LIB'))", "\tlst.extend(to_list(env['LDFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['AS']))", "\tlst.extend(to_list(env['ASFLAGS']))", "\tlst.extend(tsk.colon('ASMPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['AS_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['AS_TGT_F']), [a.path_from(cwdx) for a in tsk.outputs]))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['ASLINK']))", "\tlst.extend(to_list(env['ASLINKFLAGS']))", "\tlst.extend(merge(to_list(env['ASLNK_TGT_F']), [a.path_from(cwdx) for a in tsk.outputs]))", "\tlst.extend(merge(to_list(env['ASLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 build Could not load the build cache /opt/grisp/grisp-software/8b2967b756/rtems-libbsd/build/arm-rtems5-atsamv-grisp/.wafpickle-darwin-34017264-20 (missing)
File "./waf", line 165, in <module>
Scripting.waf_entry_point(cwd, VERSION, wafdir)
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 119, in waf_entry_point
run_commands()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 179, in run_commands
ctx=run_command(cmd_name)
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 170, in run_command
ctx.execute()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 367, in execute
return execute_method(self)
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 90, in execute
self.restore()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 141, in restore
self.init_dirs()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 88, in init_dirs
self.bldnode.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
self.parent.mkdir()
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 188, in mkdir
raise Errors.WafError('Could not create the directory %r'%self)
Could not create the directory ///o
File './waf', line 165, in <module>
Scripting.waf_entry_point(cwd, VERSION, wafdir)
File '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py', line 131, in waf_entry_point
Logs.error(e.msg)
I had a look whether I can organize some legal system similar to MacOS. But it seems that beneath some VMs (that would violate the license terms of Apple) and a "PureDarwin" project which is not usable, there are no real usable systems.
But I noted something else while updating to your branch on my home machine: The repo-URL for the rtems_waf subrepository in libbsd has changed. Can you have a look at what a git remote -v in rtems-libbsd/rtems_waf prints? The URL should be git://git.rtems.org/rtems_waf.git. If there is still a chrisj in the URL, that one hasn't been updated. In that case, we might should add a git submodule sync during the repo update of libbsd in the buildscripts.
Edit: PS: The build went fine on my home machine (Arch Linux) too.
@c-mauderer Yeah, running macOS under VMs is only allowed on macOS hosts AFAIK.
I changed it to our fork, because we have a cloned repo and I assumed we would use our forks for all three sub repositories. Any reason we shouldn't?
So, question is, how can I continue debugging the build. Neither the stack trace nor the error message Waf gives me is in any way helpful. Do you know how to check what build step actually goes wrong?
The reason that I didn't change rtems_waf is, that it makes it necessary to fork the rtems-libbsd and not only clone it. To change the URL, you would have to add a commit and do merges in the future instead of just taking over the upstream branch. I discussed using relative URLs in the RTEMS repo once on the mailing list. But there are still some distros (CentOS, ...) with a git that doesn't yet support relative URLs so that we didn't use them.
Regarding debugging: Debugging problems with waf is really hard. I had a similar bug one or two times. Basically what I used was a combination of the python debugger (you can set break points in the wscript) and printing messages.
Maybe you can try to post that error message to the RTEMS mailing list. There is at least one RTEMS maintainer who uses MacOS too and maybe knows that error.
What I can say from your error message is, that your are quite at the beginning of the build. Some node want's to create a directory.
From the messages it is visible that it happens somewhere during the init_dirs in waflib/Build.py:
File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 88, in init_dirs
self.bldnode.mkdir()
That function tries to create create all the directories for the nodes:
def init_dirs(self):
if not(os.path.isabs(self.top_dir)and os.path.isabs(self.out_dir)):
raise Errors.WafError('The project was not configured: run "waf configure" first!')
self.path=self.srcnode=self.root.find_dir(self.top_dir)
self.bldnode=self.root.make_node(self.variant_dir)
self.bldnode.mkdir()
I assume that either the self.root itself has a wrong directory or that one of the nodes is somehow odd.
@sebhub @c-mauderer Do you know the source of the failure? https://20-67125809-gh.circle-artifacts.com/0/tmp/rsb-reports/rsb-report-arm-rtems5-gcc-7.3.0-newlib-d13c84eb07e35984bf7a974cd786a6cdac29e6b9-x86_64-linux-gnu-1.txt
I think it is connected to limited RAM of 4GB inside the Docker container of the CI system. We are currently requesting more from CircleCI.