From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 18797 invoked from network); 29 Mar 2023 07:25:46 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2023 07:25:46 -0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by 9front; Wed Mar 29 03:24:12 -0400 2023 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id A11F61E66CE for <9front@9front.org>; Wed, 29 Mar 2023 03:24:08 -0400 (EDT) (envelope-from unobe@cpan.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id :to:from:subject:date:mime-version:content-type :content-transfer-encoding; s=sasl; bh=v3gjYB8JtdZWrsu4HKP61Kwch 67q7kc6ssp540VSVGU=; b=XtM6bmyPCRLOJwSVTcr+P+vv1MK3PdesNCzpwgLyu 9C7zx4lfDV7EL0U4TsBXcJIBV3IyRTGzTv1AG77DEbTZWsi+D7SJ9DubXPj3VwUq Jag9iyPxbYIIR55olsViONPUFqR6k4xa70/Bdedaop8xF7bv5cEpHIKxgRlFSjO6 aQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 9A6661E66CC for <9front@9front.org>; Wed, 29 Mar 2023 03:24:08 -0400 (EDT) (envelope-from unobe@cpan.org) Received: from strider.localdomain (unknown [75.204.169.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 43D5A1E66CB for <9front@9front.org>; Wed, 29 Mar 2023 03:24:05 -0400 (EDT) (envelope-from unobe@cpan.org) Message-ID: <6CEA77994DD85DFF25CC9888BE2C71C4@smtp.pobox.com> To: 9front@9front.org From: Romano Date: Wed, 29 Mar 2023 00:24:02 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: AFD3C07E-CE02-11ED-9118-B31D44D1D7AA-09620299!pb-smtp21.pobox.com List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: flexible overflow-preventing core-oriented out-scaling realtime-scale CMS database Subject: [9front] Beware of 'mk nuke': mkrunetype.c Reply-To: 9front@9front.org Precedence: bulk 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?