Open futurepr0n opened 7 months ago
Thanks for looking into this. Unfortunately I don't have immediate access to a MacOS machine at the moment. Could you try looking at this reply from another repository issue?
The idea is the same as to how I build the Windows tool-chain. It's a Canadian Cross build. That is, first you build a compiler that runs on Linux, that generates MacOS executables. Then the second step is you use the compiler from the first step to target SH-2. At the end you'll end up with a compiler that runs on MacOS and targets SH-2.
Thanks I will check out in detail, but at immediate glance I don't know if this was same thing I ran into. I was able to build cross tool successfully, but not able to build using cross tool due to the local disk being non case sensitive.
futurepr0n@Marks-MacBook-Pro libyaul-build-scripts % unset LIBRARY_PATH
futurepr0n@Marks-MacBook-Pro libyaul-build-scripts % unset CPATH
futurepr0n@Marks-MacBook-Pro libyaul-build-scripts % crosstool-ng/ct-ng build
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20240206.180023
[INFO ] Building environment variables
[WARN ] Directory '/Users/futurepr0n/src' does not exist.
[WARN ] Will not save downloaded tarballs to local storage.
[EXTRA] Preparing working directories
[ERROR] Your file system in '/Users/futurepr0n/.local/x-tools/sh2eb-elf' is *not* case-sensitive!
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_Abort[scripts/functions@488]
[ERROR] >> called from: CT_TestAndAbort[scripts/functions@508]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@329]
Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
1 fixed, continue with next build command
3 abort build
I have been able to use the docker build now and I might admit defeat in this regard unless there is some way to change that out of the crosstool build portion? Could I comment parts out that are strictly checking it? Or can I change the paths where this happens and make the path same as where I am running the build? Or will there be dependencies that are going to need the strict case sensitivity after this part too?
[INFO ] Building environment variables
[WARN ] Directory '/Users/futurepr0n/src' does not exist.
[WARN ] Will not save downloaded tarballs to local storage.
[EXTRA] Preparing working directories
[ERROR] Your file system in '/Users/futurepr0n/.local/x-tools/sh2eb-elf' is *not* case-sensitive!
If I can change this path and if nothing matters after that I may be successful native.
crosstool-ng
looks at .config
. You can change the path by modifying this variable:
CT_PREFIX_DIR="${CT_PREFIX:-${HOME}/.local/x-tools}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}"
You can change it to:
CT_PREFIX_DIR="${CT_PREFIX:-/path/to/your/case-sensitive-volume/x-tools}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}"
tried changing the path and hardcoding it to where would be case sensitive and valid, but new errors during the process came up - it was unable to run with failed current command "mkdir" "-p" - something about this just does not want to work smoothly with mac and thats ok - the docker build seems to be a great alternative. Thank you for the help and trying
Thanks @futurepr0n.
I'll keep this open.
Working through getting the build on OSX, here is what I have done along the way with issues I have encountered and how I managed to get passed some of them.
First problem I had was when building it could not find
objcopy
orgobjcopy
So first I made sure I had
brew install binutils
installed and then I was required to also run the following:Next I re-ran
./configure --enable-local
, things looked good until I encounteredOnce again I ran
brew install help2man
and you may not run into this issue but I could not link itTo get around this
brew link
would not work either, so I found an article where fixing that issue was to runsudo chown -R $(whoami) $(brew --prefix)/*
after that I executed thebrew link help2man
successfully and ran./configure --enable-local
. Successfully.Next, steps:
Still at the moment trying to get passed the next part, as build sh2 part fails