dmsc / fastbasic

FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
GNU General Public License v2.0
139 stars 20 forks source link

libstdc++.6 removed in ventura. recompile using libstdc++ #65

Closed marianodominguez closed 1 year ago

marianodominguez commented 1 year ago

OSX Ventura Version 13.2.1 (22D68)

➜  fastbasic ./fastbasic
dyld[11264]: Symbol not found: __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcm
  Referenced from: <12850F4E-F3D0-3D80-B367-2EE6DA944F8F> /Users/user/fastbasic/fastbasic
  Expected in:     <31679759-38DC-357A-95C2-542EA70F295F> /usr/lib/libstdc++.6.dylib

this is caused by xcode 10 removing it. I tried to replace by links on /usr/lib/libstdc++*, but it does not include the missing symbol.

tried downgrading xcode, but not able to install anything older then 14

dmsc commented 1 year ago

Hi!

Thanks for the report. Have you tried compiling on your machine?

The binaries I provide are compiled from Linux using osxcross version 1.4, from https://github.com/tpoechtrager/osxcross

Perhaps I can configure osxcross to make binaries compatible with newer systems, but I can´t easily test the results.

Have Fun!

marianodominguez commented 1 year ago

Hello !

Yes. I even created a branch for some syntax errors.

https://github.com/dmsc/fastbasic/compare/master...marianodominguez:fastbasic:compile_osx_ventura ^ src/compiler/synt-parser.cc:81:26: error: no member named 'make_unique' in namespace 'std' std::make_unique< statemachine >(p, name, sl.tok, sl.ext, sl.syms);


src/compiler/synt-parser.cc:81:39: error: 'statemachine' does not refer to
a value
                    std::make_unique< statemachine >(p, name, sl.tok,
sl.ext, sl.syms);
                                      ^
src/compiler/synt-sm.h:31:7: note: declared here
class statemachine

I think we need to add the make unique manually now, tried a couple of
changes, no luck

https://stackoverflow.com/questions/57638743/make-unique-is-not-a-member-of-std

On Thu, Mar 16, 2023 at 12:13 PM dmsc ***@***.***> wrote:

> Hi!
>
> Thanks for the report. Have you tried compiling on your machine?
>
> The binaries I provide are compiled from Linux using osxcross version 1.4,
> from https://github.com/tpoechtrager/osxcross
>
> Perhaps I can configure osxcross to make binaries compatible with newer
> systems, but I can´t easily test the results.
>
> Have Fun!
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/dmsc/fastbasic/issues/65#issuecomment-1472604793>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOXJI4IINX22CGM2JEN4Y3W4NQ7JANCNFSM6AAAAAAV4DBLZQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

-- 
_______________________________

Mariano Domínguez Molina

_______________________________
marianodominguez commented 1 year ago

it seems it was just a typo in flags it compiles now

https://github.com/dmsc/fastbasic/pull/66

On Thu, Mar 16, 2023 at 12:20 PM Mariano DM @.***> wrote:

Hello !

Yes. I even created a branch for some syntax errors.

https://github.com/dmsc/fastbasic/compare/master...marianodominguez:fastbasic:compile_osx_ventura ^ src/compiler/synt-parser.cc:81:26: error: no member named 'make_unique' in namespace 'std' std::make_unique< statemachine >(p, name, sl.tok, sl.ext, sl.syms);


src/compiler/synt-parser.cc:81:39: error: 'statemachine' does not refer to
a value
                    std::make_unique< statemachine >(p, name, sl.tok,
sl.ext, sl.syms);
                                      ^
src/compiler/synt-sm.h:31:7: note: declared here
class statemachine

I think we need to add the make unique manually now, tried a couple of
changes, no luck

https://stackoverflow.com/questions/57638743/make-unique-is-not-a-member-of-std

On Thu, Mar 16, 2023 at 12:13 PM dmsc ***@***.***> wrote:

> Hi!
>
> Thanks for the report. Have you tried compiling on your machine?
>
> The binaries I provide are compiled from Linux using osxcross version
> 1.4, from https://github.com/tpoechtrager/osxcross
>
> Perhaps I can configure osxcross to make binaries compatible with newer
> systems, but I can´t easily test the results.
>
> Have Fun!
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/dmsc/fastbasic/issues/65#issuecomment-1472604793>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOXJI4IINX22CGM2JEN4Y3W4NQ7JANCNFSM6AAAAAAV4DBLZQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

--
_______________________________

Mariano Domínguez Molina

_______________________________

--


Mariano Domínguez Molina


dmsc commented 1 year ago

Hi!

You need to compiled with a compiler supporting C++14 or newer. The Fastbasic Makefile already adds the --std=c++14 option to the command line, so it should work out of the box.

Try doing make Q=

marianodominguez commented 1 year ago

thanks ! . just sent a PR for my changes

dmsc commented 1 year ago

Hi

I updated my osxcross installation. Can you test the attached binaries?

fastbasic-v4.6-31-g5004ef1-dirty-macosx.zip

marianodominguez commented 1 year ago

like a charm !

➜ fastbasic-v4.6-31-g5004ef1-dirty-macosx ./fastbasic hello.bas BAS compile 'hello.bas' to 'hello.asm' ASM assemble 'hello.asm' to 'hello.o' LINK hello.xex

The only issue was to right click and open all the binaries in the folder, so macOS allows them to run. Need to find out a way to whitelist several files by command line

On Fri, Mar 17, 2023 at 4:55 AM dmsc @.***> wrote:

Hi

I updated my osxcross installation. Can you test the attached binaries?

fastbasic-v4.6-31-g5004ef1-dirty-macosx.zip https://github.com/dmsc/fastbasic/files/11000997/fastbasic-v4.6-31-g5004ef1-dirty-macosx.zip

— Reply to this email directly, view it on GitHub https://github.com/dmsc/fastbasic/issues/65#issuecomment-1473720328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOXJI6CN53U5KHIFBN2VILW4RGKNANCNFSM6AAAAAAV4DBLZQ . You are receiving this because you authored the thread.Message ID: @.***>

--


Mariano Domínguez Molina


dmsc commented 1 year ago

Ok, then next release will work on macos :-)

EricCarrGH commented 1 year ago

I just want to also state I tested this on an older Catalina 10.15.5 and it works great! This is awesome, I know others with Macs have been struggling to get it to run. Once a new release is there, I will point them to it.