The Tonc page I am referencing can be found here http://www.coranac.com/tonc/text/first.htm.
I have followed the correct procedure to install the devkitARM toolchain through pacman (on OSX), and the gcc compiler is definitely in my /opt/devkitpro/devkitARM/bin directory as expected. I also copied the "first.c" file and corresponding Makefile exactly as shown in the Tonc page. However when I attempt to make, it fails giving the error in the screencapture below.
I've been pulling my hair out for hours trying to figure this out but to no avail. I have checked that the environment var DEVKITPRO holds the proper value, and have no reason to suspect that the given makefile is incorrect. Both the makefile and first.c are given in the tonc page, and I copied them exactly. I realize this is probably more a Unix path problem than GBA development but I would really appreciate the help. Thanks!
[beginner] Tonc: "My first GBA demo" Makefile failure
[beginner] Tonc: "My first GBA demo" Makefile failure
- Attachments
-
- Screen Shot 2018-06-19 at 12.36.19 AM.png
- (32.78 KiB) Not downloaded yet
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: [beginner] Tonc: "My first GBA demo" Makefile failure
It's possible to just copy the terminal output & add it to a post in code tags, like this -
Can you show me the output of & on your system.
Code: Select all
$ make
arm-none-eabi-gcc -c first.c -mthumb-interwork -mthumb -O2 -Wall -fno-strict-aliasing -o first.o
arm-none-eabi-gcc first.o -mthumb-interwork -mthumb -specs=gba.specs -o first.elf
arm-none-eabi-objcopy -v -O binary first.elf first.gba
copy from `first.elf' [elf32-littlearm] to `first.gba' [binary]
ROM fixed!
Code: Select all
env
Code: Select all
uname -a
Re: [beginner] Tonc: "My first GBA demo" Makefile failure
Output for env:
Output for uname -a:
Thanks again.
Code: Select all
DEVKITARM=/opt/devkitpro/devkitARM
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/h7/2y_pc6x15tl3ftrl7jr02h2m0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.HjFKsWY4pP/Render
TERM_PROGRAM_VERSION=388.1.1
TERM_SESSION_ID=755836E9-FDC8-4E99-A887-BB0FFD03BF0E
USER=Louis
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.w4FOahVSni/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/Louis
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/Louis
LOGNAME=Louis
_=/usr/bin/env
Output for uname -a:
Code: Select all
Darwin Louiss-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: [beginner] Tonc: "My first GBA demo" Makefile failure
OK, I managed to replicate this on a Macbook running High Sierra and I'm really quite flummoxed.
It seems like you can't actually set the PATH in a Makefile on OSX this way although it will work with the recursive devkitPro Makefiles that descend into a build folder before calling the tools. For these early simple Makefiles in Tonc it'll probably be better to just add the toolchain and supplementary tools to PATH before building.
It seems like you can't actually set the PATH in a Makefile on OSX this way although it will work with the recursive devkitPro Makefiles that descend into a build folder before calling the tools. For these early simple Makefiles in Tonc it'll probably be better to just add the toolchain and supplementary tools to PATH before building.
Code: Select all
export PATH=/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH
Re: [beginner] Tonc: "My first GBA demo" Makefile failure
You are a godsend. Thank you so much.
Who is online
Users browsing this forum: No registered users and 0 guests