devkitPro Makefile errors: set up devkitARM path

support for the ARM toolchain
Post Reply
yonbr
Posts: 2
Joined: Wed Feb 13, 2019 12:32 pm

devkitPro Makefile errors: set up devkitARM path

Post by yonbr » Wed Feb 13, 2019 12:44 pm

I have been recently interested in gba development, so I have been going through TONC's guide. Yet, after getting the packages downloaded I can't successfully use the 'make' file. A picture of the error is provided, as well as my environment variables that don't seem to do anything.
MakeError.png
(51.9 KiB) Not downloaded yet
The error is above, I tried to resolve this by setting the environment variables using 'export' which is shown below
EnvVar.png
(180.52 KiB) Not downloaded yet
Yet, I still receive the error in the first picture after setting the environment variable. I am using MacOS Mojave, with xcode tools downloaded, any help would be great.

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: devkitPro Makefile errors: set up devkitARM path

Post by WinterMute » Wed Feb 13, 2019 1:07 pm

While the TONC guide is the best available for GBA development it unfortunately needs some work to bring it more in line with modern devkitPro standards. We have a libtonc package available through pacman but we haven't yet gone through the examples and refactored those with devkitPro standard Makefiles. This isn't particularly a criticism of Jasper, as he says in the guide our Makefiles didn't exist when he first started - in fact devkitARM started while he was working on it so conforming to our standards isn't something he could have done at the time..

I'm assuming your issue is the same oen found at viewtopic.php?f=37&t=8740&p=16040#p16040 where I advised the simplest way to get the early TONC Makefiles working is to add tools to your PATH manually in the shell.

Code: Select all

export PATH=/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH
Ideally we'd like to package up tonc examples and perhaps merge with libgba as well as building up better documentation. FWIW there's an example using maxmod with libtonc at viewtopic.php?f=37&t=8830&p=16221#p16249
Help keep devkitPro toolchains free, Donate today

Personal Blog

yonbr
Posts: 2
Joined: Wed Feb 13, 2019 12:32 pm

Re: devkitPro Makefile errors: set up devkitARM path

Post by yonbr » Wed Feb 13, 2019 8:45 pm

Yeah I see what you mean, its definitely the best I've found!

I actually found that same thread, and typed out the same line. I again recieved the same error. Here is a code snippet of what happens once I do the export line you provided.

Code: Select all

export PATH=/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH
sudo make
Makefile:6: *** "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM".  Stop.
Could I change the path in the makefile? Could I use the makefile in the link you provided to compile what I am trying to compile? https://www.coranac.com/tonc/text/setup.htm 2.2.2 is where I am stuck specifically

[update]
So I got the ROM built and working on VisualBoyAdvance, but I'm not completely sure why. I was using trying to 'make' the rom within

Code: Select all

/opt/devkitpro/examples/gba/template
But I kept getting the error, I eventually just created a folder in my desktop and copied both the makefile and source folder containing template.c and when I typed in 'make' into the terminal it worked!

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: devkitPro Makefile errors: set up devkitARM path

Post by WinterMute » Thu Feb 14, 2019 12:39 am

Apologies. My assumption about the path was wrong, it's just an issue I've commonly seen on macOS lately.

Your issue was the use of sudo make which uses a different environment which doesn't contain $DEVKITPRO & $DEVKITARM. I presume you've been doing this because the example folders found within /opt/devkitpro/examples/gba are managed by pacman & require root permissions to write. This is done specifically to prevent users from modifying the examples in place, please copy them elsewhere before playing with them. Your home folder is usually a good bet rather than cluttering your desktop.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests