Re: posix_spawn

2023-12-24 Thread Kirill A. Korinsky
Hello, > On 24. Dec 2023, at 15:17, Camm Maguire wrote: > > "Kirill A. Korinsky" writes: > >> This build was made with local root >> >> It contains patches in addition to posix_spawn which allows to build it on >> macOS 13 arm64 under rosetta: >> >> --- unixport/makefile >> +++ unixport/mak

Re: posix_spawn

2023-12-24 Thread Kirill A. Korinsky
I have wired news: after backporting vfork -> posix_spawn in vsystem to 2.6.14 I can't reproduce this error at all. Before I conclude that it's gone I'd like to build it a few more times. -- wbr, Kirill > On 24. Dec 2023, at 19:51, Camm Maguire wrote: > > Greetings! Could you please run with t

Re: posix_spawn

2023-12-24 Thread Camm Maguire
Greetings! Could you please run with this and leave saving_system alone and let me know the results? Take care, modified gcl/o/gbc.c @@ -1091,8 +1091,11 @@ GBC(enum type t) { if (tm->tm_type==v->type) for (x=pagetochar(page(v)),j=tm->tm_nppage;j--;x+=tm->tm_size) { obje

Re: posix_spawn

2023-12-24 Thread Camm Maguire
Greetings! Can you please post cd o cpp -I../h main.c cpp -I../h gbc.c Take care, "Kirill A. Korinsky" writes: > Hello, > > From another hand I've tried to build it with gcl-2.6.14 which requires > couple of minutes and simplified version of patch works well. > > Simplified version of patch:

Re: posix_spawn

2023-12-24 Thread Kirill A. Korinsky
Hello, From another hand I've tried to build it with gcl-2.6.14 which requires couple of minutes and simplified version of patch works well. Simplified version of patch: > --- o/main.c > +++ o/main.c > @@ -432,7 +432,7 @@ gcl_cleanup(int gc) { >if (gc) { > > -saving_system=TRUE; > +

Re: posix_spawn

2023-12-24 Thread Kirill A. Korinsky
Hello, > On 24. Dec 2023, at 15:31, Camm Maguire wrote: > > "Kirill A. Korinsky" writes: > >> --- o/main.c >> +++ o/main.c >> @@ -432,7 +432,11 @@ gcl_cleanup(int gc) { >> if (gc) { >> >> saving_system=TRUE; >> + >> +/* on macOS it leads to ERROR "Caught fatal error [memory may be damag

Re: posix_spawn

2023-12-24 Thread Camm Maguire
Greetings! "Kirill A. Korinsky" writes: > A file fix-memory-corruption-on-macOS.patch contains two patches. I just > removed the second one (vsystem -> system) in favour of posix_spawn and > applied it on 33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0 which allows me to > build GCL on macOS 12. It

Re: posix_spawn

2023-12-24 Thread Kirill A. Korinsky
Hello! > On 24. Dec 2023, at 15:17, Camm Maguire wrote: > > "Kirill A. Korinsky" writes: > >> Thus, additionaly I've added patch below to catch the real place where it >> crashes: >> >> --- o/main.c >> +++ o/main.c >> @@ -665,10 +665,10 @@ main(int argc, char **argv, char **envp) { >> /* cat

Re: posix_spawn

2023-12-24 Thread Camm Maguire
Greetings! "Kirill A. Korinsky" writes: > This build was made with local root > > It contains patches in addition to posix_spawn which allows to build it on > macOS 13 arm64 under rosetta: > > --- unixport/makefile > +++ unixport/makefile > @@ -68,7 +68,7 @@ $(LSPDIR)/auto_new.lsp: $(LSPDIR)/a

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
Sorry, I've missed the local root: 01ed2e0b2f540031171d2258ddccb951735827e7 -- wbr, Kirill > On 23. Dec 2023, at 19:52, Kirill A. Korinsky wrote: > > This build was made with local root > > It contains patches in addition to posix_spawn which allows to build it on > macOS 13 arm64 under roset

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
A file fix-memory-corruption-on-macOS.patch contains two patches. I just removed the second one (vsystem -> system) in favour of posix_spawn and applied it on 33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0 which allows me to build GCL on macOS 12. It requires something like 3 hours I guess, but I did

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
This build was made with local root It contains patches in addition to posix_spawn which allows to build it on macOS 13 arm64 under rosetta: --- unixport/makefile +++ unixport/makefile @@ -68,7 +68,7 @@ $(LSPDIR)/auto_new.lsp: $(LSPDIR)/auto.lsp echo "(AUTOLOAD 'init-readline '|r

Re: posix_spawn

2023-12-23 Thread Camm Maguire
Just checking my understanding : 'gcl-devel' crashes in a different place, and both of these are only with the posix_spawn patch, right? Take care, "Kirill A. Korinsky" writes: > I did a bit more wired things. I add to each line inside siLheap_report a > printf like this: > > static void > FFN

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
I did a bit more wired things. I add to each line inside siLheap_report a printf like this: static void FFN(siLheap_report)(void) { int i; check_arg(0); printf("1\n");fflush(stdout); vs_check_push(make_fixnum(sizeof(fixnum)*CHAR_SIZE)); printf("2\n");fflush(stdout); vs_push(make_fi

Re: posix_spawn

2023-12-23 Thread Camm Maguire
Greetings, and thanks so much! Could you please put a printf("spawn");fflush(stdout); right before the patch and repeat? This code should not be relevant at this point. Take care, "Kirill A. Korinsky" writes: > Here it is: > > SYSTEM>(init-system) > loading > /opt/local/var/macports/build/_o

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
Here it is: SYSTEM>(init-system) loading /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_catap_macports-ports_lang_gcl/gcl-devel/work/01ed2e0b2f540031171d2258ddccb951735827e7/gcl/unixport/../lsp/gcl_s.lsp loading /opt/local/var/macports/build/_opt_local_var_macports_sour

Re: posix_spawn

2023-12-23 Thread Camm Maguire
Greetings, and thanks again so much. This is so curious, as there is no call to the posix_spawn code at all at the point of your failure. Could you please do the following: cd unixport make raw_pre_gcl ./raw_pre_gcl ./ > Then open up init_raw.lsp in some editor, and copy the forms therein one a

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
and I'd like to correct myself: under rosetta it failed with wrong libboot.so architecture.Here two patches: - flush stdout to make this error visible - fix this error by respect CFLAGS to build libboot.soNow it failed the same way on both machines with stacktrace:Thread 0 Crashed::  Dispatch queue

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
Let me summarise how it crashed on Xcode 15 with macOS 14.To test it I've used two gcl via MacPorts: - gcl which is 2.6.14 - gcl-devel which is the last available commit at master 01ed2e0b2f540031171d2258ddccb951735827e7gcl is build with patches: - dont-override-CC-or-MACOSX_DEPLOYMENT_TARGET.patch

Re: posix_spawn

2023-12-23 Thread Kirill A. Korinsky
well... seems that Xcode 15 with macOS 13+ requires additional patches.attached patch allows to pass configure but build failed at:COMPILER>/bin/sh: line 1: 15229 Illegal instruction: 4 at the attempt to run raw_pre_gcl. I'll try to investigate this (get the stacktrace) in next few days.Here I've a

Re: posix_spawn

2023-12-22 Thread Kirill A. Korinsky
ha, it was false alarm. I've waited for a while and it continue to working until it crashed as: Warning: WILD-PATHNAME-P is being redefined. Warning: SBIT is being redefined. Warning: GETHASH is being redefined. GCL (GNU Common Lisp) 2.7.0 Thu Oct 26 12:00:01 PM EDT 2023 CLtL1git: Version_

Re: posix_spawn

2023-12-22 Thread Camm Maguire
Too bad, because it is working for me and could be a generic solution. Did it eliminate those C compiler warnings? Can you run under gdb and backtrace at the point asking for keyboard input? cd unixport make raw_pre_gcl gdb raw_pre_gcl (gdb) r ./ writes: > something goes wrong here. It stuck li

Re: posix_spawn

2023-12-22 Thread Kirill A. Korinsky
something goes wrong here. It stuck like this: loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmpspecial.lsp loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmplam.lsp loading /Users/catap/src/gcl/gcl/unixport/../cmpnew/gcl_cmplet.lsp loading /Users/catap/src/gcl/gcl/unixport/../c