Open replikvlt opened 4 years ago
P.S. I'm using not the old wheezy version of this system, but sid version made by ports team (iso link is in the debian-kbsd irc channel
You'll want to change src/mkenv to filter the SYSNAME setting using sed (like OBJTYPE does) to rewrite GNU/kFreeBSD into either Linux or FreeBSD or maybe a new setting (GNU_kFreeBSD?). If you can reuse Linux or FreeBSD, you're done. If not, you will need to provide a GNU_kFreeBSD implementation for all the current Linux-/FreeBSD-specific code.
Okay thanks for help! The compilation as FreeBSD went (almost) good, there are also some paths difference which i hopefully not forget to post here. But the compilation was successful.
Okay so in order to build plan9port on Debian GNU/kFreeBSD sid from Debian Ports i needed (maybe not all parts are needed, needs citation, but it worked for me):
SYSNAME="uname"
with SYSNAME="uname | sed 's/GNU\/kFreeBSD/FreeBSD/g'"
libutil-freebsd-dev
to provide library libutil.h
in order for src/cmd/9term/FreeBSD.c
to buildlibxt-dev
to provide library IntrinsicP.h
in order for src/cmd/auxstats/FreeBSD.c
to buildsrc/cmd/auxstats/FreeBSD.c
replace #include <nlist.h>
by #include <bsd/nlist.h>
libnfs-dev
to provide nfs libraries in order needed for src/cmd/vbackup/mount-BSD.c
to buildsrc/cmd/vbackup/mount-BSD.c
Replace #include <nfs/rpcv2.h>
with #include <fs/nfs/rpcv2.h>
Replace #include <nfs/nfsproto.h>
with #include <fs/nfs/nfsproto.h>
Replace #include <nfs/nfs.h>
with #include <nfsclient/nfs.h>
Add #define MNT_NODEV 0
outside of FreeBSD version checks/ifdefsNow this is not indeed a perfect solution, but it works. Possible TODO's:
src/mkenv
to filter unames for special characters
...
Running on GNU/kFreeBSD, adjusting linker flags
...mk: don't know how to make '<dir>/plan9port-master/lib/libip.a(GNU/kFreeBSD.o)' in <dir>/plan9port-master/src/libip
mk: for i in ... : exit status=exit(1)
Don't know if this is related, but on
uname
this OS returns GNU/kFreeBSD which probably breaks some things.