[tz] [YBA] TLD make using mawk causes malloc failure
Jonathan Ben Avraham
yba at tkos.co.il
Wed Jan 19 14:06:20 UTC 2022
Hi Ian,
Thanks for the information. A pity I had to go to this length to figure it
all out. It should have been in the tz README or INSTALL documentation.
- yba (Jonathan)
On Wed, 19 Jan 2022, Ian Abbott wrote:
> Date: Wed, 19 Jan 2022 14:00:22 +0000
> From: Ian Abbott <abbotti at mev.co.uk>
> To: Jonathan Ben Avraham <yba at tkos.co.il>, tz at iana.org
> Subject: Re: [tz] [YBA] TLD make using mawk causes malloc failure
>
> On 19/01/2022 10:12, Jonathan Ben Avraham via tz wrote:
>> Dear colleagues,
>> I noticed that on all tz versions up to 2021e running make in the top-level
>> directory results in a malloc failure on Debian 10 which uses the mawk
>> alternate for awk:
>>
>> cc -DTZDIR='"/usr/share/zoneinfo"' -c -o difftime.o difftime.c
>> rm -f libtz.a
>> ar -rc libtz.a localtime.o asctime.o difftime.o strftime.o
>> : libtz.a
>> awk -v DATAFORM=`expr main.zi : '\(.*\).zi'` -f ziguard.awk \
>> africa antarctica asia australasia europe northamerica southamerica
>> etcetera factory backward >main.zi.out
>> malloc(): unsorted double linked list corrupted
>> Aborted
>> make: *** [Makefile:612: main.zi] Error 134
>
> FWIW, in Debian 11 they switched to a different development stream of mawk.
> Debian 10 was using the Mark Brennan's mawk-1.3.3 with Debian patches
> (currently mawk-1.3.3-17, Debian maintainer Steve Langasek). Debian 11 uses
> Thomas Dickey's mawk-1.3.4 plus snapshots (currently mawk-1.3.4.20200120,
> Debian package version mawk-1.3.4.20200120-2, Debian maintainer Boyuan Yang).
>
> Debian's mawk-1.3.4.20200120-2 doesn't have the problem.
>
> The home page for Thomas Dickey's mawk 1.3.4 is:
> https://invisible-island.net/mawk/mawk.html
>
> He maintains it in RCS, but there are snapshots on GitHub at:
> https://github.com/ThomasDickey/mawk-snapshots
>
> I used git bisect (reversing the usual meanings of "good" and "bad") to
> determine that the problem was fixed by the 20100418 snapshot, tagged
> t20100418, commit:
> https://github.com/ThomasDickey/mawk-snapshots/commit/e23bdc528abf8e0752a3c26cd010ab0497eec706
>
> The main changes for this snapshot were to the files "array.c", "array.w"
> ("array.c" is "untangle"d from the "Noweb" source in "array.w"), and
> "types.h".
>
>>
>> This can be corrected by installing gawk and running
>>
>> update-alternatives --config awk
>>
>> to select gawk as the awk alternate. I verified that the make completes
>> without error using either GNU Awk 4.1.4, or GNU Awk 4.2.1.
>
> You could also build tz with
>
> make AWK=gawk
>
> (or edit the Makefile to change the AWK variable).
>
> --
> -=( Ian Abbott <abbotti at mev.co.uk> || MEV Ltd. is a company )=-
> -=( registered in England & Wales. Regd. number: 02862268. )=-
> -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
> -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
>
--
9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm
More information about the tz
mailing list