rust3ds / cargo-3ds

Cargo command to work with Nintendo 3DS project binaries.
Apache License 2.0
59 stars 10 forks source link

Error trying to compile on MacOS #56

Closed blinkuz closed 6 months ago

blinkuz commented 6 months ago

I have created a new project using cargo 3ds new command and I am trying to build using cargo 3ds build but I am getting the following error:

error: linker arm-none-eabi-gcc not found | = note: No such file or directory (os error 2)

I have reviewed all my routes and have configured the ones indicated in the devkitpro installation in this way:

.bash_profile:

export DEVKITPRO=/opt/devkitpro
export DEVKITARM="${DEVKITPRO}/devkitARM"
export DEVKITPPC="${DEVKITPRO}/devkitPPC"
export PATH=/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH

Another thing I have tried to do is copy one of the devkitpro 3ds examples to my desktop and compile it using make and it generated the .3dsx correctly without the linker error.

If I run the command: $DEVKITARM/bin/arm-none-eabi-gcc --version I get this output:

arm-none-eabi-gcc (devkitARM release 63) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm not sure what else to try and although I still have the doubt that it is a problem with the environment variables, I am not sure which of them is the problem, on the other hand I wanted to mention that my version of macos is 12.6.6 with a chip: apple m1.

Meziu commented 6 months ago

Hi, by invoking only arm-none-eabi-gcc in a new bash session, is the shell able to run the linker?

It's possible the environment has not been properly set. Also, it's my personal preference to modify .bashrc in these cases rather than .bash_profile, but I don't believe that's related to the issue.

blinkuz commented 6 months ago

The content of the .bash_profile was correct but in more recent versions of macos apparently it has been changed from bash to ZSH so I had to modify the file ~/.zshrc and I was able to compile without problems, sorry for the inconvenience.