View unanswered posts | View active topics It is currently Fri Dec 14, 2018 11:35 am



Reply to topic  [ 5 posts ] 
 [beginner] Tonc: "My first GBA demo" Makefile failure 
Author Message

Joined: Tue Jun 19, 2018 1:45 am
Posts: 3
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!


Attachments:
Screen Shot 2018-06-19 at 12.36.19 AM.png [32.78 KiB]
Not downloaded yet
Tue Jun 19, 2018 6:39 am
Profile
Online
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1301
Location: UK
It's possible to just copy the terminal output & add it to a post in code tags, like this -
Code:
$ 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!


Can you show me the output of
Code:
env
&
Code:
uname -a
on your system.

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Tue Jun 19, 2018 2:03 pm
Profile ICQ WWW

Joined: Tue Jun 19, 2018 1:45 am
Posts: 3
Output for env:

Code:
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:
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


Thanks again.


Tue Jun 19, 2018 4:24 pm
Profile
Online
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1301
Location: UK
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.
Code:
export PATH=/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH

_________________
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog


Wed Jun 20, 2018 8:08 pm
Profile ICQ WWW

Joined: Tue Jun 19, 2018 1:45 am
Posts: 3
You are a godsend. Thank you so much.


Thu Jun 21, 2018 8:14 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads