Mac OS X Support
Mac OS X Support
I am new to FreeBasic and have done a lot of VBScript on my work computers. I run Mac OS X 10.5.5 Catalina and was wondering if there was going to be support for OS X in the future? I'd love to try it out. I've gone through the manual and really like the improvements to VBScript.
Does anyone have compile instructions for OS X?
Sitrucz
Does anyone have compile instructions for OS X?
Sitrucz
-
- Posts: 789
- Joined: Jul 26, 2018 18:28
Re: Mac OS X Support
You can look here:
viewtopic.php?f=17&t=24027
And here:
http://rpg.hamsterrepublic.com/ohrrpgce ... n_Mac_OS_X
viewtopic.php?f=17&t=24027
And here:
http://rpg.hamsterrepublic.com/ohrrpgce ... n_Mac_OS_X
Re: Mac OS X Support
Thanks for the links. I started to compile and am getting the error below.
I use Macports so I have Xcode installed along with the developer tools and ffi.h is in multiple places.
How can I tell make where to find ffi.h?
Thanks in advance.
Code: Select all
src/rtlib/thread_call.c:33:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^~~~~~~
1 error generated.
make: *** [src/rtlib/obj/darwin-x86_64/thread_call.o] Error 1
Code: Select all
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ffi/ffi.h
/opt/local/lib/libffi-3.2.1/include/ffi.h
Thanks in advance.
Re: Mac OS X Support
Google tells me this is from a library called libffi.
Re: Mac OS X Support
I ran into the same problem, don't remember how I managed to solve the issue, if you install gcc-9.2 from http://hpc.sourceforge.net/ it may solve your problem, note that I ran into permission problems trying to install gcc-9.2, I finally installed it by booting up from a different partition
what version of Mac OS are you running?
if I remember right, I had to edit fbc.bas so that it wouldn't include crt1.o because it's not needed in Mojave, I could be wrong on this but that's what I think I did.
I can upload a version for Mojave if you are interested.
what version of Mac OS are you running?
if I remember right, I had to edit fbc.bas so that it wouldn't include crt1.o because it's not needed in Mojave, I could be wrong on this but that's what I think I did.
I can upload a version for Mojave if you are interested.
Last edited by srvaldez on Jun 28, 2020 14:28, edited 1 time in total.
Re: Mac OS X Support
I'm on 10.15.5 Catalina. I'm going through the process of uninstall Xcode and reinstalling the command line tools.
Re: Mac OS X Support
First, I reinstalled Xcode and the command line tools and still had the same issue. Next, per your suggestion I installed gcc9 from macports.srvaldez wrote:I ran into the same problem, don't remember how I managed to solve the issue, if you install gcc-9.2 from http://hpc.sourceforge.net/ it may solve your problem, note that I ran into permission problems trying to install gcc-9.2, I finally installed it by booting up from a different partition
what version of Mac OS are you running?
if I remember right, I had to edit fbc.bas so that it wouldn't include crt1.o because it's not needed in Mojave, I could be wrong on this but that's what I think I did.
I can upload a version for Mojave if you are interested.
Code: Select all
gcc (MacPorts gcc9 9.3.0_1) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code: Select all
xxxx@xxx FreeBASIC-1.07.1-source % which gcc
/opt/local/bin/gcc
Code: Select all
CC src/rtlib/obj/darwin-x86_64/thread_call.o
src/rtlib/thread_call.c:33:10: fatal error: ffi.h: No such file or directory
33 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
make: *** [src/rtlib/obj/darwin-x86_64/thread_call.o] Error 1
Code: Select all
xxx@xxxx FreeBASIC-1.07.1-source % port installed | grep ffi
libffi @3.2.1_0 (active)
Code: Select all
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/ffi/ffi.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ffi/ffi.h
/opt/local/lib/libffi-3.2.1/include/ffi.h
Code: Select all
make bootstrap
Re: Mac OS X Support
first, I recommend that you download the fbc source from https://github.com/rversteegen/fbc/tree/mac
it has a number of patches specific to the Mac that are not in the official site
second, try installing the gcc-9.2 from http://hpc.sourceforge.net/ not macports
third try compiling with
make FBFLAGS="-asm att" ENABLE_XQUARTZ=1 all
that means you need to install xquartz, I know it's dated but hopefully it will still work
[edit]
the above command will only work if you already have a version of FB installed, I will upload a recent version of FB for mac Catalina shortly
it has a number of patches specific to the Mac that are not in the official site
second, try installing the gcc-9.2 from http://hpc.sourceforge.net/ not macports
third try compiling with
make FBFLAGS="-asm att" ENABLE_XQUARTZ=1 all
that means you need to install xquartz, I know it's dated but hopefully it will still work
[edit]
the above command will only work if you already have a version of FB installed, I will upload a recent version of FB for mac Catalina shortly
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: Mac OS X Support
You could try the suggestions in viewtopic.php?p=174567#p174567, which explain how to compile your own ffi, or to disable it in FB.
Re: Mac OS X Support
yes, libffi compiles with no problems, anyway, just in case you are interested
fbc-mac-mojave.zip
fbc-mac-Catalina
fbc-mac-mojave.zip
fbc-mac-Catalina
Re: Mac OS X Support
Thanks I cloned your source. Put gcc 9.2 into /usr/local. I downloaded libffi source and did a ./configure then a make then a sudo make install and see it in /usr/local/*. I still receive that same error of unable to find ffi.h.srvaldez wrote:yes, libffi compiles with no problems, anyway, just in case you are interested
fbc-mac-mojave.zip
fbc-mac-Catalina
I'm not a mac developer so at this point I have a build of fbc and i'll just write some source code and see how it goes.
Thanks to all for offering suggestions. FYI.. I even tried installing brew and brew install libffi and still the same.
Hopefully down the line there will be an official darwin installation as I really do like Basic.
Re: Mac OS X Support
@sitrucz
I don't know what's going on, somehow the mac fbc and libraries are not in the archive, will check
I don't know what's going on, somehow the mac fbc and libraries are not in the archive, will check
Re: Mac OS X Support
somehow the binaries are deleted while uploading, will post a google drive link shortly
Re: Mac OS X Support
try this fbc-mac-mojave.zip
hopefully everything is there
when I download to my Windows PC the binaries get deleted asap, so I can't verify
hopefully everything is there
when I download to my Windows PC the binaries get deleted asap, so I can't verify
Re: Mac OS X Support
Last edited by srvaldez on Jun 28, 2020 18:33, edited 1 time in total.