On 02/08/16 11:47, Rick Payne wrote:
I’m struggling to build the unikernel on OSX. I’m following the instructions to
build the toolchain for OSX as outlined in the ‘Building Manually’ section:
https://github.com/rumpkernel/wiki/wiki/Howto:-Set-up-a-Rumprun-toolchain-in-Mac-OS-X
However I end up with this compile error when doing 'CC=x86_64-netbsd-gcc
./build-rr.sh hw’ (though Xen is my target of choice for now, hw is a starting
point):
--- compat_strtonum.lo ---
# compile mandoc/compat_strtonum.lo
cc -O -DOSNAME=\"NetBSD\ 7.99\" -DHAVE_CONFIG_H -I. -no-cpp-precomp
-I/Users/rickp/src/rumpkernels/rumprun/obj-amd64-xen/rumptools/include/compat
-I/Users/rickp/src/rumpkernels/rumprun/src-netbsd/tools/compat -DHAVE_NBTOOL_CONFIG_H=1
-D_FILE_OFFSET_BITS=64 -c -o compat_strtonum.lo.o
/Users/rickp/src/rumpkernels/rumprun/src-netbsd/tools/mandoc/../../external/bsd/mdocml/bin/mandoc/../../dist/compat_strtonum.c
In file included from
/Users/rickp/src/rumpkernels/rumprun/src-netbsd/tools/mandoc/../../external/bsd/mdocml/bin/mandoc/../../dist/compat_strtonum.c:1:
./config.h:59:17: error: expected parameter declarator
--- chars.lo ---
In file included from
/Users/rickp/src/rumpkernels/rumprun/src-netbsd/tools/mandoc/../../external/bsd/mdocml/bin/mandoc/../../dist/chars.c:18:
./config.h:59:17: error: expected parameter declarator
--- compat_strtonum.lo ---
extern size_t strlcat(char *, const char *, size_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/secure/_string.h:111:44:
note: expanded from macro ‘strlcat'
What have I missed?
Most likely you haven't missed anything. The whole tools build is a
race against platform vendors being creative, and in this case Apple
might have been creative with strlcpy().
I just updated src-netbsd, so you might want to pull in a new version
and see if you got lucky. I didn't really see anything that would fix
the above in the diffs, so probably not (but worth a shot).
That failing, try to do a "regular" NetBSD build on your host. See
instructions here:
https://wiki.netbsd.org/tutorials/how_to_build_netbsd-current/
Just building "tools" is enough.
If that build fails too, file an upstream bug report to NetBSD. Even if
you do come up with a patch, it needs to trickle into our repo via
upstream, so an upstream bug report is the right thing to do.
If that build doesn't fail, we need to figure out where the difference
is -- there should be zero differences, but computers are oh so good at
screwing people.