USNavalResearchLaboratory / turboWAVE

PIC/hydro simulation code
21 stars 7 forks source link

GCC is not found automatically on my Mac #4

Closed arichar6 closed 2 years ago

arichar6 commented 2 years ago

On my Mac, I've installed gcc via homebrew. However, the easy-install GUI can't find it, and gives this error:

image

I think the problem is the location where brew installs the gcc tools. On my computer, they were installed in /opt/homebrew/bin. So, I ran these commands:

sudo mkdir /usr/local/opt
sudo mkdir /usr/local/opt/gcc
sudo ln -s /opt/homebrew/bin /usr/local/opt/gcc/bin

After that, the "Compile Code" task worked correctly.

I suspect that this problem is related to the search defined here:

https://github.com/USNavalResearchLaboratory/turboWAVE/blob/aff6f77e53cb26068540c5f2fd746c08b5c134c5/tools/twutils/src/twutils/command_line/twinstall.py#L398

dfgordon commented 2 years ago

Is this an "Apple Silicon" Mac by any chance? According to https://docs.brew.sh/Installation the Intel macs use /usr/local while Apple Silicon uses /opt/homebrew. We will have to generalize the search it appears.

arichar6 commented 2 years ago

Yes, this is an M1 (Apple Silicon) Mac.

dfgordon commented 2 years ago

Thanks good to know. It may take some time to fully accommodate them. I personally don't have one yet.

dfgordon commented 2 years ago

Fixed in 4.7.0