Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native MacOS build support #399

Merged
merged 5 commits into from
Sep 21, 2020
Merged

Native MacOS build support #399

merged 5 commits into from
Sep 21, 2020

Conversation

ethteck
Copy link
Collaborator

@ethteck ethteck commented Sep 17, 2020

The time of MacOS support is upon us.

I had to make some changes to the Makefile to support the weird diferences in some tools. I also updated the readme to add some Mac setup help and remove the docker-sync stuff.

The spec comment move was necessary due to the empty line left after removing that comment causing some issues in the spec parser.

@i82orbom
Copy link
Contributor

Nice! Unfortunately I'm missing mips-linux-gnu, what'd be the replacement for mac?

@FryJay
Copy link
Contributor

FryJay commented Sep 17, 2020

I'm running into the same issue.

@ethteck
Copy link
Collaborator Author

ethteck commented Sep 17, 2020

@i82orbom @FryJay hey guys, sorry .. knew I was forgetting something. I need to write a guide / script for how to crosscompile mips-linux-gnu-binutils. I'll do that sometime tonight or tomorrow and tag you again when it's in the PR.

@FryJay
Copy link
Contributor

FryJay commented Sep 18, 2020

Thanks for your work on this. It'll be awesome to have it working on my laptop.

@i82orbom
Copy link
Contributor

@ethteck thanks for taking care of this!

@ethteck
Copy link
Collaborator Author

ethteck commented Sep 18, 2020

@FryJay @i82orbom thanks for your patience! Please try https://github.com/zeldaret/oot/blob/64e755080e40ef248b5fd55e4ad2589c79bfcdf0/docs/BUILDING_BINUTILS_MACOS.md

and let me know how it goes / if you encounter any issues!

@FryJay
Copy link
Contributor

FryJay commented Sep 18, 2020

The binutils build seems to work though it ends with "Nothing to be done for 'install' but that might be for a specific subdirectory because a bunch of stuff is installed. When I run gmake setup though, I get a lot of these messages:

tools/ZAP2/ZAP2.out e -i scenes/xml/dungeons/ganon_tou.xml -b baserom/ -o scenes/dungeons/ganon_tou -gsf 1 -sm tools/ZAP2/SymbolMap_OoTMqDbg.txt
sh: tools/ZAP2/ZAP2.out: cannot execute binary file

which also appear if I attempt a gmake -j. Make produces the same error.

@FryJay
Copy link
Contributor

FryJay commented Sep 18, 2020

I also tried the commands in the new guide using gmake in case that made a difference but that only seemed to result in minor output changes but no changes to the outcome.

@FryJay
Copy link
Contributor

FryJay commented Sep 18, 2020

After cleaning and remaking ZAP2 like you suggested, I can now successfully build the project on my laptop.

@i82orbom
Copy link
Contributor

@FryJay did you see this error?

/bin/sh: line 0: cd: testsuite: No such file or directory
make[2]: *** [all-subdir] Error 1
make[1]: *** [all-libiberty] Error 2
make: *** [all] Error 2

I'm currently trying to build, but I can't, I tried to disable libiberty, but it's needed by other stuff...

@FryJay
Copy link
Contributor

FryJay commented Sep 18, 2020

No I don't think I ran into that one.

Copy link
Contributor

@i82orbom i82orbom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! thanks a lot

Makefile Outdated Show resolved Hide resolved
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
@i82orbom
Copy link
Contributor

@ethteck I'm not sure if this is related to the mac build or my setup, but I'm getting issues using the diff script, it can't find any symbol, whereas with the build from the docker it can...

@fig02
Copy link
Collaborator

fig02 commented Sep 20, 2020

have you ran make and updated expected/ lately?

@i82orbom
Copy link
Contributor

Setting this env vars in the bash profile solved the issue:

export LANG="en_US.UTF-8"
export LC_ALL=c

Diff.py is checking for some english fixed strings in the .map file, having a different locale will generate translations for those strings, making the diff script not work.

@fig02 fig02 merged commit 807713a into zeldaret:master Sep 21, 2020
louist103 pushed a commit to louist103/oot that referenced this pull request Jan 3, 2023
* MacOS build OK

* Adding build instructions for building mips-linux-binutils on MacOS

* *

* Update Makefile

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants