lronaldo / cpctelera

Astonishingly fast Amstrad CPC game engine for C developers
http://lronaldo.github.io/cpctelera/
GNU Lesser General Public License v3.0
232 stars 54 forks source link

Can't compile on macOS on M1 processor #162

Open profludic opened 2 years ago

profludic commented 2 years ago

Error:

BFD does not support target arm-apple-darwin21.6.0. Look in bfd/config.bfd for supported targets. make[4]: *** [configure-binutils] Error 1

Note:

I managed to compile it somehow by adding some of the changes from latest sdcc.

lronaldo commented 1 year ago

Hi @profludic

Sorry for not answering earlier (didn't receive a notifcation).

Did you solve this issue? Can you share what you learnt while solving it? That would be very interesting :)

Thank you :)

profludic commented 1 year ago

Hello @lronaldo yes, I have solved it.

I forgot exactly what I did but in general it was solved by using latest sdcc and trying to make it compile - I think it is some kind of "Frankenstein" sdcc - mix between cpctelera version and newer version :)

Since I just wanted to make it work, it is likely that I made some mistake but - it works for me...

I would love to have this in official cpctelera release properly done!

So, here is the source I use which is modified development branch of cpctelera (not sure how old is it):

http://www.osmobit.com/sdcc.patched.zip

You can download it and compare to see all what is changed.

What I did after was: cp -r sdcc.patched/* ./cpctelera/tools/sdcc-3.6.8-r9946

I hope this helps.

teopl

lronaldo commented 1 year ago

Thank you very much for contributing your sources.

The problem for me is that I don't have a MacOS available computer, so I cannot test and know what are the exact changes required for MacOS.

In any case, I'm not completely sure if it is more advisable to just update CPCtelera to the new SDCC version and test if that version properly compiles on MacOS and the newest M1 and M2 ARM CPUs.

Be it as it might, thank you very much. I'm sure that your source can help many other people interested in compiling under MacOS :)

I will try first with the update strategy and then we will see what to do next. If you like, you may test next updated version once we publish it and suggest changes for MacOS :)

Thank you again for your contribution.

profludic commented 1 year ago

Hello @lronaldo, I am glad I can help even a little since I love using cpctelera!

It could be that strategy of updating sdcc is the right way. For some reason I remember I did only partial update.

I would be happy to test new version!

teopl

atzurk commented 1 year ago

Hi there, I've used the sdcc version 3.8.0 with success in the setup.sh, in a M1 Max system. you can refer to issue #145