Skip to content

socket.fs isn't available on Apple Silicon build? #51

@anta40

Description

@anta40

I'm on M2 Mac running macOS 15.2, with gforth 0.7.3 installed via homebrew

Running this socket example:

include unix/socket.fs

128 constant size

: (echo) ( sock buf -- sock buf )
  begin
    cr ." waiting..."
    2dup 2dup size read-socket nip
    dup 0>
  while
    ."  got: " 2dup type
    rot write-socket
  repeat
  drop drop drop ;

create buf size allot

: echo-server ( port -- )
  cr ." Listening on " dup .
  create-server
  dup 4 listen
  begin
    dup accept-socket
    cr ." Connection!"
    buf ['] (echo) catch
    cr ." Disconnected (" . ." )"
    drop close-socket
  again ;

12321 echo-server

fails on macOS:

$ gforth serve.fs

*OS command line*:-1: No such file or directory
>>>serve.fs<<<
Backtrace:
$134813EF8 throw
$134810FE8 required
$134818708 execute
$1340151D0
$134018E00
$134011400
$13400D1E0
$1348186D8
$13480F780 catch
$134810F88 execute-parsing-wrapper
$134811048 os-execute-parsing
$134811620 args-required

I also already had libtool installed which can be invoked by running glibtool (otherwise, will invoke libtool provided by XCode). On the other hand, the code seems to run well on Debian x64 system (gforth was installed via apt), like this:

$ gforth serve.fs

Listening on 12321

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions