Jump to content
  • 0

X16-XCI compilation: Minimal GCC config on OS X


kull
 Share

Question

Hi, I'm trying to build the sdk in the project and it fails attempting to use clang CLI tools.  I brew installed gcc, which left me w/ a gcc-10 in my path.  I edited the Makefile to have it use gcc-10 to see where it got me, but while it got a little further, it still fails on what I think is due to the xtools/clang libs still appearing earlier in the path (Or maybe I should just look into fixing LIBRARY_PATH).  In any event, I'm intentionally omitting the specific failures for the time being as I'm quite certain that is the cause.

Just wondering, what are others doing to manage multiple gcc installations in OS X Big Sur (I also happen to be on Apple Silicon, but so far I've had no problems retrieving natively compiled bins w/ brew for the most part)?

 

Thanks,

Kull

Edited by kull
grammar
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I don't have a Mac anymore, so I haven't tried building XCI on one. If you can build the X16 emulator and ROM, you should have your environment set up correctly to build all of XCI. If you do find a change to the makefiles that works better for Mac, please feel free to do a pull request and I'll take a look at it. But it definitely sounds like you don't have the gcc toolchain set up properly, most likely with some sort of PATH or other environment issue.

Link to comment
Share on other sites

  • 0

Hi Matt.  Thanks for the reply.  The XCI looks slick...look forward to tinkering with it.  

Yes, the emulator and rom builds fine using the xtools-cli-provided gcc, no need to even install gcc proper with brew, but xci doesn't...upon closer inspection, this is only due to a trivial naming conflict with the OS X sdk. A small change allowed it to build with warning w/ the Apple toolchain and I was able to build and run the example as well. I drafted this PR in case you want to retain that (unsure if you necessarily want to support that build configuration, but it appears to work and would constitute the laziest possible OS X build setup I think):

https://github.com/SlithyMatt/x16-xci/pull/14/files

I did notice that clicking the white door in the hallway of the example sometimes crashed me to BASIC.  Unsure if that is known bug or perhaps in fact indicative of a problem with my resulting program, but just thought I'd mention it.  Also, I find it neat to see this stuff running on the M1 w/o Rosetta (the irony!):
339609725_ScreenShot2021-02-18at9_56_38PM.thumb.png.41236d3b5b8a3fe35d6eec61dfa4b8df.png

  • Like 1
Link to comment
Share on other sites

  • 0

Thanks for the PR, I'll check it out. Not sure why that trigger would crash the engine, and I haven't seen that on Linux or Windows. If you could attach the XCI.PRG and all the .BINs you built in a zip to the PR, I could see if something got generated differently, either the engine itself or the game binaries. They should all be bit-perfect with the other platforms.

  • Like 1
Link to comment
Share on other sites

  • 0

Oh, I was building off of master as of a few days ago.  I also checked out the most recent release tag to see if it happened there, think it was v0.8b, and no change.  The video makes it look worse than it is, though. I was able to give it a full play through when doing things in the proper order and don't recall any other issues; just avoid attempting that door first.  The screwdriver left me a bit parched, though.

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use