lambdanative icon indicating copy to clipboard operation
lambdanative copied to clipboard

The thing simply does not work...

Open FemtoEmacs opened this issue 5 years ago • 7 comments

I tried com compile a demo:

› cp SETUP.template SETUP › cp PROFILE.template PROFILE › ./configure DemoHelloWorld macosx ==> configured to build DemoHelloWorld for macosx in normal mode == using source in /Users/ed/wrkLisp/src/lambdanative/apps/DemoHelloWorld › make

After a long time, I got the following error message:

ERROR: failed on file /Users/ed/Library/Caches/lambdanative/macosx/build/125670560.c BUILD FAILED

I tried a few other demos, with identical result.

FemtoEmacs avatar Dec 09 '19 19:12 FemtoEmacs

Please configure the app in ./configure DemoHelloWorld macosx verbose mode; clean all modules make clean; and then re-run make and post the complete results as a gist (or the relevant pieces below). Without further detail of where the error happens we can't help you and you omitted any details from the error description.

mgorges avatar Dec 09 '19 19:12 mgorges

Hi, Matthias. Thank you for helping. I discover that the gambit scheme installed by lambdanative is causing segmentation fault:

› ~/Library/Caches/lambdanative/macosx/bin/gsi zsh: segmentation fault ~/Library/Caches/lambdanative/macosx/bin/gsi

I suppose that this is at the root of the problem. Any way, I cleaned all modules:

› make clean === using profile your profile name here [/Users/ed/wrkLisp/src/lambdanative/PROFILE].. === configured to build pngtool version 1.0 for macosx on macosx in normal mode

==> cleaning up build files.. => removing old /Users/ed/Library/Caches/lambdanative/macosx/build..

Then I configured with verbose:

› ./configure Calculator linux verbose ==> configured to build Calculator for linux in normal verbose mode == using source in /Users/ed/wrkLisp/src/lambdanative/apps/Calculator

Finally, make:

› make === using profile your profile name here [/Users/ed/wrkLisp/src/lambdanative/PROFILE].. === configured to build Calculator version 1.0 for linux on macosx in normal mode

ls: /86-linux: No such file or directory ls: /bin/*-gcc: No such file or directory ==> checking for required tools.. => grep.. ok => wget.. ok => zip.. ok => tar.. ok => sed.. ok => tr.. ok => cut.. ok => tail.. ok => head.. ok => find.. ok => autoconf.. ok => make.. ok => gcc.. ok => patch.. ok

At this point, lambdanative has compiled the LaTeX files, without any problem, I believe. Finally, it started with the application:

==> creating libraries needed for pngtool.. => liblambdanative.. gcc -DMACOSX -m64 -fPIC -c *.c -I/Users/ed/Library/Caches/lambdanative/macosx/include ar ru liblambdanative.a *.o ar: creating archive liblambdanative.a ranlib liblambdanative.a => cleaning up.. => exploding library libgambc.. => exploding library liblambdanative.. => exploding library libz.. => exploding library libpng.. => exploding library libfreetype.. => exploding library libjpeg.. => exploding library libgd.. searching supported languages in /Users/ed/wrkLisp/src/lambdanative loading support for scm.. supported languages = scm => compiling scheme payload.. /Users/ed/wrkLisp/src/lambdanative/modules/config/config.scm .. /Users/ed/Library/Caches/lambdanative/macosx/bin/gsc -prelude "(declare (block)(not safe)(standard-bindings)(extended-bindings))(define-cond-expand-feature macosx)" -c -o /Users/ed/Library/Caches/lambdanative/macosx/build/125670560.c /Users/ed/wrkLisp/src/lambdanative/modules/config/config.scm ./scripts/verbose.sh: line 6: 71300 Segmentation fault: 11 /Users/ed/Library/Caches/lambdanative/macosx/bin/gsc -prelude "(declare (block)(not safe)(standard-bindings)(extended-bindings))(define-cond-expand-feature macosx)" -c -o /Users/ed/Library/Caches/lambdanative/macosx/build/125670560.c /Users/ed/wrkLisp/src/lambdanative/modules/config/config.scm ERROR: failed on file /Users/ed/Library/Caches/lambdanative/macosx/build/125670560.c BUILD FAILED make: *** [all] Error 1

FemtoEmacs avatar Dec 09 '19 20:12 FemtoEmacs

Your segfault is in gsc when it tries to build pngtools so even before any other modules are made. I don't know if this has anything to do with the gsi segfault you also observe. You might need to compile with debug enabled and scrub the entire cache to see where this is coming from? For reference, which version of macOS are you on?

mgorges avatar Dec 09 '19 20:12 mgorges

I am using the last update of macOS (MacOS Catalina, 10.15.1) --

› sw_vers ProductName: Mac OS X ProductVersion: 10.15.1 BuildVersion: 19B88

One question -- If I install gsc and gsi from the gambit distribution page, it works. What about replacing the lambdanative gambit version with the official distribution?

FemtoEmacs avatar Dec 09 '19 20:12 FemtoEmacs

Sorry, but there is no way of us switching to the latest version of gambit. Version 4.7.9 was the last sensible version before the focus of development switched to the universal backend, which added a lot of complexity that is not required for the C-backend and thus introduced a lot of risk in terms of reliability. In fact we use 4.7.0 for some safety-critical works of ours.

We appreciate that some users want to use a newer version, so you can switch to 4.8.5 (4.9.3 breaks define-syntax, for which there is an issue) as mentioned in issue #241. I believe this is done by changing libgambc to lib gambit in modules/config/LIBRARIES but didn't test this myself.

mgorges avatar Dec 09 '19 22:12 mgorges

We tested this on MacOS 10.15.6 and both compilation and calling gsi works as expected for both gambit 4.9.2 and 4.7.9. Not quite sure where something in your gambit building goes wrong - can you run gsi in lldb and see where it breaks?

mgorges avatar Sep 02 '20 18:09 mgorges

› ~/Library/Caches/lambdanative/macosx/bin/gsi zsh: segmentation fault ~/Library/Caches/lambdanative/macosx/bin/gsi

From some debugging I did yesterday I believe this may be lack of code signing, as I had a similar problem with some of the tools, which I fixed in e622c12 for those, but we might also need to sign parts of the gambit-build itself?

mgorges avatar Sep 27 '20 07:09 mgorges