9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Beware of 'mk nuke': mkrunetype.c
@ 2023-03-29  7:24 Romano
  2023-03-29  7:29 ` Jacob Moody
  0 siblings, 1 reply; 6+ messages in thread
From: Romano @ 2023-03-29  7:24 UTC (permalink / raw)
  To: 9front

I haven't updated my system in a few months, and noticed the Unicode
changes so wanted to work with them.  I generally do a 'cd /sys/src &&
mk nuke && mk all', but that led to many errors.  I tried the
following:
* re-compile the compilers first (cc & 6c), which was successful; 6a &
  6l were not
* compile and install ape (successful)
* compile libc first (not successful), which led me to:
* compile the individual .c files in libc/port, which led me to
  mkrunetype.c still not compiling.

Yet I was still getting errors like the following:

cpu% cd /sys/src/libc/port
cpu% mk
@{
	eval `{grep '^[A-Z]' /$cputype/mkfile}
	6c -FTVw -o mkrunetype.6 mkrunetype.c
	6l $LDFLAGS -o 6.mkrunetype mkrunetype.6
	6.mkrunetype
}
param: undefined: _assert in param
getunicodeline: undefined: getfields in getunicodeline
estrtoul: undefined: strtoul in estrtoul
markbreak: undefined: strstr in markbreak
main: undefined: strcmp in main
main: undefined: exits in main
smprint: undefined: setmalloctag in smprint
fmtStrFlush: undefined: realloc in fmtStrFlush
fmtStrFlush: undefined: free in fmtStrFlush
fmtstrinit: undefined: malloc in fmtstrinit
dofmt: undefined: chartorune in dofmt
_fmtcpy: undefined: fullrune in _fmtcpy
_fmtcpy: undefined: runelen in _fmtcpy
_fmtcpy: undefined: runetochar in _fmtcpy
fmtstrcpy: undefined: utflen in fmtstrcpy
xdtoa: undefined: isNaN in xdtoa
xdtoa: undefined: isInf in xdtoa
xdtoa: undefined: tolower in xdtoa
xdtoa: undefined: frexp in xdtoa
xdtoa: undefined: pow10 in xdtoa
xdtoa: undefined: strtod in xdtoa
too many errors
mk: @{  eval ...  : exit status=rc 2050: rc 2052: 6l 2056: error

So I just kept updating the linking with the appropriate objects until it compiled. This is what I ended up with:
@{
	eval `{grep '^[A-Z]' /$cputype/mkfile}
	6c -FTVw -o mkrunetype.6 mkrunetype.c
	6l $LDFLAGS -o 6.mkrunetype mkrunetype.6 getfields.6 strtoul.6 strstr.6 strcmp.6 exits.6 _assert.6 rune.6 utfrune.6 malloc.6 lock.6 atol.6 pool.6 strtol.6 nan.6 strtod.6 toupper.6 frexp.6 pow10.6 utfecpy.6 atexit.6 fabs.6 utflen.6 ctype.6
	6.mkrunetype
}

I think it might be useful to have a proper patch for the mkfile under
libc/port.  Thoughts?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-29 20:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29  7:24 [9front] Beware of 'mk nuke': mkrunetype.c Romano
2023-03-29  7:29 ` Jacob Moody
2023-03-29 14:41   ` unobe
2023-03-29 15:16     ` Jacob Moody
2023-03-29 18:53       ` Jacob Moody
2023-03-29 20:19         ` unobe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).