socket.fs isn't available on Apple Silicon build?
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
still running into the issue 7.9 does not build on macOS it segfaults on make
I have access to a Mac Mini with M1 and homebrew installation, and
./configure CC=gcc-14
make -j4
there works. I also tested
./gforth -p.:~+ unix/terminal-server.fs
in the build directory (I have no rights on that machine to install it permanently) and
nc localhost 4444
to talk to it (telnet not available on MacOS, the machine's other ports than ssh blocked), and it worked.
@forthy42 I tried to build from git.
./configure CC=gcc-14
zsh: no such file or directory: ./configure
Where's the configure script?
From git, you need ./autogen.sh to generate the configure script.