Subject: compile problems with new ksh93u+m codebase

From: Hans Harder <[email-masked]>
Date: Wed, 29 Jul 2020 17:35:24 +0200

Since a few months a number of people have forked the last stable 93u+
2012-08-01 release from AT&T and are doing active bugfixing.
see: https://github.com/ksh93/ksh

I tried to build the last version of the ksh93 version under alpine with
the musl library, but I got some compile errors.
I don't have enough knowledge to fix this and was hoping that someone here
can give me some hints on how to fix these compile errors.

The details are in https://github.com/ksh93/ksh/issues/3

Basically I ran into

In file included from /root/git_remote/ksh/src/lib/libast/include/ast.h:34,
                 from /root/git_remote/ksh/src/lib/libast/misc/state.c:26:
/root/git_remote/ksh/src/lib/libast/include/ast_std.h:300:16: error:
unknown type name 'off64_t'; did you mean 'off_t'?  #define off_t  off64_t
                ^~~~~~~
/usr/include/sys/mman.h:142:17: note: in expansion of macro 'off_t'
 #define off64_t off_t

Looks like a libc/musl incompatibility with off_t
Can anyone give me some hints how to resolve this ?

thx
Hans

---

From: Milan P. Stanić <[email-masked]>
Date: Sat, 1 Aug 2020 11:28:24 +0200

> Can anyone give me some hints how to resolve this ?

Maybe you can add '-Doff64_t=off_t' to make command invocation (simple
fix which works sometimes).

Or patch source to change off64_t to off_t

---

From: Hans Harder <[email-masked]>
Date: Sun, 2 Aug 2020 12:26:13 +0200

thx, tried it, but got the same result.

Tried also to patch source from off64_t to off_t, that worked, but
then I run into of course the other errors...
Basically the libast was designed decades ago and implements a lot of
libc functionality.
The people who did ksh2020 spent a lot of time rewriting and removing
that to get it working with another build system.
,
I think I concentrate for now on the ksh2020 version which at least
builds on musl and works for me flawlessly .

thx for the help

---

From: Martijn Dekker <[email-masked]>
Date: Wed, 27 Jan 2021 01:18:09 +0000

> the musl library, but I got some compile errors.

This should build now, thanks to Lev Kujawski. See:
https://github.com/ksh93/ksh/commit/e245856f

-- 
||	modernish -- harness the shell
||	https://github.com/modernish/modernish
||
||	KornShell lives!
||	https://github.com/ksh93/ksh

---

From: Hans Harder <[email-masked]>
Date: Sat, 6 Feb 2021 15:46:03 +0100

I can confirm that the ksh93 version is now correctly building on alpine

Maybe it is the time to include the ksh93 version into an alpine package
The ksh93 is based on the original ksh93u version and there is a heavy
activity on github by alll kind of people to get the old bugs fixed.

thx Martijn