yabasic icon indicating copy to clipboard operation
yabasic copied to clipboard

MacOS version request

Open dmlogv opened this issue 4 years ago • 10 comments

Hi, @marcIhm !

How about run yabasic on the Mac?

I can try build it on Mojave but I don't know where to start :)

dmlogv avatar Aug 27 '19 12:08 dmlogv

By the way: Yabasic builds smoothly on the mac, which is a regular unix after all :-) Just follow the instructions for building on linux. Having a homebrew recipe would be easier anyway though ...

marcIhm avatar Jan 02 '20 07:01 marcIhm

Well, I try to build it on Mac OS 10.12 Sierra. And something went wrong :( (I don't understand anything in C-development.)

➜  ~ git clone https://github.com/marcIhm/yabasic.git
...
➜  ~ cd yabasic/unix 
➜  unix git:(master) rake
...
cd lang
make bison
cc     bison.c   -o bison
In file included from bison.c:82:
./yabasic.h:29:10: error: 'config.h' file not found with <angled> include; use "quotes" instead
#include <config.h>
         ^~~~~~~~~~
         "config.h"
bison.c:89:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
2 errors generated.
make: *** [bison] Error 1
rake aborted!
Command failed with status (2): [make bison...]
/Users/fasten/pet-projects/yabasic/unix/Rakefile:101:in `block (2 levels) in <top (required)>'
/Users/fasten/pet-projects/yabasic/unix/Rakefile:100:in `block in <top (required)>'
Tasks: TOP => default => check => tests => make
(See full trace by running task with --trace)

dmlogv avatar Jan 13 '20 09:01 dmlogv

Hi Dmitry, it should be  ./runme the rake-task is only for maintainers ... Best regards, Marc

On 13.01.2020 10:45:41, Dmitry Logvinenko [email protected] wrote: Well, I try to build it on Mac OS 10.12 Sierra. And something went wrong :( (I don't understand anything in C-development.) ➜ ~ git clone https://github.com/marcIhm/yabasic.git ... ➜ ~ cd yabasic/unix ➜ unix git:(master) rake ... cd lang make bison cc bison.c -o bison In file included from bison.c:82: ./yabasic.h:29:10: error: 'config.h' file not found with include; use "quotes" instead #include <config.h> ^~~~~~~~~~ "config.h" bison.c:89:10: fatal error: 'malloc.h' file not found #include <malloc.h> ^~~~~~~~~~ 2 errors generated. make: *** [bison] Error 1 rake aborted! Command failed with status (2): [make bison...] /Users/fasten/pet-projects/yabasic/unix/Rakefile:101:in block (2 levels) in <top (required)>' /Users/fasten/pet-projects/yabasic/unix/Rakefile:100:in block in <top (required)>' Tasks: TOP => default => check => tests => make (See full trace by running task with --trace) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/31?email_source=notifications&email_token=AC5EZHW2RSSIEAME4YVGL3LQ5QZ4DA5CNFSM4IQEBZ4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIYCKBA#issuecomment-573580548], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHSN5AD76XEHOQHNGZLQ5QZ4DANCNFSM4IQEBZ4A].

marcIhm avatar Feb 01 '20 17:02 marcIhm

Hi Marc,

i've tried ./runme:

$ ./runme     

Running configure ...

FAILURE, could not configure yabasic

And then I dig deeper:

$ ./configure && make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/Users/dmitry/pet-projects/yabasic/unix/lang/missing: Unknown `--is-lightweight' option
Try `/Users/dmitry/pet-projects/yabasic/unix/lang/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin19.2.0
checking host system type... x86_64-apple-darwin19.2.0
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin19.2.0 file names to x86_64-apple-darwin19.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.2.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for gcc... -Wall
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking alloc.h usability... no
checking alloc.h presence... no
checking for alloc.h... no
checking prctl.h usability... no
checking prctl.h presence... no
checking for prctl.h... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for size_t... (cached) yes
checking for working strtod... yes
checking for strerror... yes
checking for mkstemp... yes
checking for library containing ffi_call... -lffi
checking ffi.h usability... no
checking ffi.h presence... no
checking for ffi.h... no
configure: error: Did not find libffi library and/or header; install them or supply '--disable-use-ffi' to built anyway and without ffi. If you are sure to have both installed and still get this error, you may search for the location of ffi.h (e.g. /usr/local/lib64/libffi-3.2.1/include/ffi.h) and make it visible in /usr/include

And this is the same issue as #41 :(

If you need any help to debug it on Mac, feel free to email me :)

dmlogv avatar Apr 02 '20 12:04 dmlogv

Hi Dmitry, well, 2.86.7 should be more successful, if you have the ffi libararies and headers actually installed; could you please give it a try ? (tar-file appended) best regards, Marc

On 02.04.2020 14:47:57, Dmitry Logvinenko [email protected] wrote: Hi Marc, i've tried ./runme: $ ./runme Running configure ... FAILURE, could not configure yabasic And then I dig deeper: $ ./configure && make checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /Users/dmitry/pet-projects/yabasic/unix/lang/missing: Unknown --is-lightweight' option Try /Users/dmitry/pet-projects/yabasic/unix/lang/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... x86_64-apple-darwin19.2.0 checking host system type... x86_64-apple-darwin19.2.0 checking how to print strings... printf checking whether make supports the include directive... yes (GNU style) checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/local/bin/gsed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert x86_64-apple-darwin19.2.0 file names to x86_64-apple-darwin19.2.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin19.2.0 file names to toolchain format... func_convert_file_noop checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin19.2.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking for gcc... -Wall checking malloc.h usability... no checking malloc.h presence... no checking for malloc.h... no checking alloc.h usability... no checking alloc.h presence... no checking for alloc.h... no checking prctl.h usability... no checking prctl.h presence... no checking for prctl.h... no checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for size_t... (cached) yes checking for working strtod... yes checking for strerror... yes checking for mkstemp... yes checking for library containing ffi_call... -lffi checking ffi.h usability... no checking ffi.h presence... no checking for ffi.h... no configure: error: Did not find libffi library and/or header; install them or supply '--disable-use-ffi' to built anyway and without ffi. If you are sure to have both installed and still get this error, you may search for the location of ffi.h (e.g. /usr/local/lib64/libffi-3.2.1/include/ffi.h) and make it visible in /usr/include And this is the same issue as #41 [https://github.com/marcIhm/yabasic/issues/41] :( If you need any help to debug it on Mac, feel free to email me :) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/31#issuecomment-607824838], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHQBX4OBYKXH4XJJ4F3RKSCPXANCNFSM4IQEBZ4A].

marcIhm avatar Apr 04 '20 13:04 marcIhm

Hi, Mark,

Sorry, but I can't find any attachments (I've checked my mail too) nor 2.86.7 tag

dmlogv avatar Apr 05 '20 08:04 dmlogv

Sorry, github eats attachments :-) You may try http://www.yabasic.de/download/yabasic-2.86.7.tar.gz [http://www.yabasic.de/download/yabasic-2.86.7.tar.gz] (not officially released until someone on macos gives me feedback) regards, Marc

On 05.04.2020 10:46:45, Dmitry Logvinenko [email protected] wrote: Hi, Mark, Sorry, but I can't find any attachments (I've checked my mail too) nor 2.86.7 tag — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/31#issuecomment-609381090], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHVCWQKATPGC5RMM5ULRLBAPHANCNFSM4IQEBZ4A].

marcIhm avatar Apr 05 '20 13:04 marcIhm

$ brew install libffi
$ ./configure --with-ffi=/usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/include/ && make
$ ./yabasic example.yab

And woo-hoo!

image

Troubles:

  • Resize of the XQuartz window clears it.
  • Console does not react for the Return key to close an interpreter (Ctrl+C save me).

dmlogv avatar Apr 06 '20 10:04 dmlogv

Great, thanx for testing ! I will look into the remaining troubles. best regards Marc

On 06.04.2020 12:28:33, Dmitry Logvinenko [email protected] wrote: $ brew install libffi $ ./configure --with-ffi=/usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/include/ && make $ ./yabasic example.yab And woo-hoo! [image] [https://user-images.githubusercontent.com/858439/78548783-fc3b3980-7809-11ea-9035-7f31de5dd2bd.png] Troubles:

  • Resize of the XQuartz window clears it.
  • Console does not react for the Return key to close an interpreter (Ctrl+C save me). — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/marcIhm/yabasic/issues/31#issuecomment-609710968], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC5EZHWS5RPR3RCCA4FA2ATRLGVE7ANCNFSM4IQEBZ4A].

marcIhm avatar Apr 06 '20 19:04 marcIhm

On macOS 10.10, to fix the CLOCK_MONOTONIC problem, I have added this to function.c, but it still needs the library rt for the clock_gettime function and it seems this library isn't included in the macOS.

In order to compile those programs which require rt on macOS, it's been suggested that the rt should be disabled, i.e. not be used as a dependency during the configure. But the configure script of yabasic-2.86.8 doesn't seem to have that option.

So how to get around this problem? Any suggestions are appreciated.

tugkan0153 avatar May 13 '20 15:05 tugkan0153