Thanks! That worked. I guess the build/dist/pharo-vm/resources/img.image - which I thought would be a minimal functional image - isnât. I was trying to get the startup .st code working first, and didnât try any other image. I get a bunch of stderr log messages about  Cannot locate any of #('libgit2.1.4.4.dylib' 'libgit2.1.0.1.dylib' 'libgit2.1.0.0.dylib' 'libgit2.0.25.1.dylib'). Please check if it installed on your system but I can ignore those easily enough. Thanks, now I can get to my experiment. ../Dave On Sep 15, 2022, 9:40 AM -0400, Guillermo Polito <guillermopolito@gmail.com>, wrote:
Sure, but Iâd need a bit more of information from your side, because from my side, I just compiled latest version and did:
# Compile VM $ git clone ⦠repo $ cmake -B vmbuild -S repo $ cmake âbuild vmbuild âtarget install
#Download a pharo 10 image $ wget -O- https://get.pharo.org/100 | bash
#Create your script
$ tee -a hello.st << EOF Transcript show: 'hello world!!';cr. EOF
$Â ./build/build/dist/Pharo.app/Contents/MacOS/Pharo Pharo.image st hello.st --save --quit hello world!
G
El 15 sept 2022, a las 15:19, David Mason <dmason@ryerson.ca> escribió:
Hi Guille,
Iâm just trying to run the img.image that comes with the pharo-project install.
All I want at this stage is to execute `Transcript show: âhello worldâ;cr.` (and have that show on std-out or std-err) and exit.
../Dave On Sep 15, 2022, 8:53 AM -0400, Guillermo Polito <guillermopolito@gmail.com>, wrote:
Hi Dave,
a couple of quick hints that could lead us to a solution:
- what image are you running on top? what version? - is the image source file close to the image/VM? - if the process seems frozen, you can send it the SIGUSR1 signal so it dumps a log of the execution   kill -SIGUSR1 pid
That dumps  - the native stack  - the smalltalk stacks
That would show you quickly where the problem is, very probably there is an infinite recursion in pharo code.
G
El 14 sept 2022, a las 20:16, David Mason <dmason@ryerson.ca> escribió:
Hi,
Iâve built a stackVM straight out of the box from the instructions at https://github.com/pharo-project/pharo-vm to run some experiments. So Iâm trying for a simple Hello world on stdout/stderr. I assumed on headless Transcript would go to some useful place, so I tried,
I have a hello.st ----- Transcript show: 'hello world!';cr. "(Smalltalk at: #Transcript) show: 'hello world!';cr." ----- and run-test: ----- #! /bin/sh # # Run it with a headless Pharo: # DIR=~/git/pharo-project/stackVM/build VM=$DIR/vm/Debug/Pharo.app/Contents/MacOS/Pharo #IMAGE=$DIR/dist/pharo-vm/resources/img.image IMAGE=img.image ls -l $VM $IMAGE grep . "$@" /dev/null set -x $VM -vm-display-null -headless --logLevel=4 $IMAGE "$@" --save --quit -----
and I get: : Sep14 ; date;./run-test hello.st ;date Wed 14 Sep 2022 14:09:17 EDT -rwxr-xr-x 1 dmason staff 50226 9 Sep 14:08 /Users/dmason/git/pharo-project/stackVM/build/vm/Debug/Pharo.app/Contents/MacOS/Pharo -rw-r--r-- 1 dmason staff 206336 13 Sep 23:21 img.image hello.st:Transcript show: 'hello world!';cr. hello.st:"(Smalltalk at: #Transcript) show: 'hello world!';cr." + /Users/dmason/git/pharo-project/stackVM/build/vm/Debug/Pharo.app/Contents/MacOS/Pharo -vm-display-null -headless --logLevel=4 img.image hello.st --save --quit [DEBUG] 2022-09-14 14:09:17.000 logParameters (src/parameters/parameters.c:341):Image file name: img.image [DEBUG] 2022-09-14 14:09:17.000 logParameters (src/parameters/parameters.c:342):Is default Image: no [DEBUG] 2022-09-14 14:09:17.000 logParameters (src/parameters/parameters.c:343):Is interactive session: no [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:331):vmParameters [count = 5]: [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): /Users/dmason/git/pharo-project/stackVM/build/vm/Debug/Pharo.app/Contents/MacOS/Pharo [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): -vm-display-null [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): -headless [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): --logLevel=4 [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): --headless [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:331):imageParameters [count = 3]: [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): hello.st [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): --save [DEBUG] 2022-09-14 14:09:17.000 logParameterVector (src/parameters/parameters.c:334): --quit [INFO ] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:113):Opening Image: img.image [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:135):Working Directory /Users/dmason/git/AST-Smalltalk/testing [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:137):sizeof(int): 4 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:138):sizeof(long): 8 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:139):sizeof(long long): 8 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:140):sizeof(void*): 8 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:141):sizeof(sqInt): 8 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:142):sizeof(sqLong): 8 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:143):sizeof(float): 4 [DEBUG] 2022-09-14 14:09:17.000 vm_main_with_parameters (src/client.c:144):sizeof(double): 8 [DEBUG] 2022-09-14 14:09:17.000 runOnMainThread (src/client.c:254):Running VM on main thread [DEBUG] 2022-09-14 14:09:17.000 sqAllocateMemory (src/memoryUnix.c:139):Trying to load the image in 0x804000 [DEBUG] 2022-09-14 14:09:17.000 sqAllocateMemory (src/memoryUnix.c:181):Loading the image in 0x106fa4000 [WARN ] 2022-09-14 14:09:17.000 ioLoadModule (src/externalPrimitives.c:102):Failed to load module: SecurityPlugin
and 40 minutes later it exits having been kill -9âed
Once, it exited quickly, but I have no idea what was different that time. Also âsave does seem to do anything.
If it reliably exited, I could experiment, but I have no idea whatâs happening.
Help! (and Thanks in advance)
../Dave _______________________________________________ Pharo-vm mailing list -- pharo-vm@lists.pharo.org To unsubscribe send an email to pharo-vm-leave@lists.pharo.org
_______________________________________________ Pharo-vm mailing list -- pharo-vm@lists.pharo.org To unsubscribe send an email to pharo-vm-leave@lists.pharo.org