Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: jgrg1 on July 10, 2010, 12:11:23 PM

Title: Attempting to run make fails
Post by: jgrg1 on July 10, 2010, 12:11:23 PM
Hi,

I've just recently downloaded the latest cygwin (as of 10 July 2010), and followed the install steps as set down in the CygwinDevelopment wiki (http://www.rockbox.org/wiki/CygwinDevelopment). This all seemed to install fine, and I updated the PATH in the etc/profile to read:

PATH=/usr/local/bin:/usr/bin:/bin:/opt/sh/bin:/opt/m68k/bin:/opt/arm/bin:$PATH

Again, this all seems fine.

I grabbed the latest rockbox version (r27371), ran the tools/configure tool to create the makefile for the Sansa e200 Simulator build. This succeeded, and I then ran make, and I get the following errors:

    MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
    Error makefile 69: Command syntax error
    *** 1 errors during make ***

The make file contains:

Code: [Select]
## Automatically generated. http://www.rockbox.org/

export ROOTDIR=/home/justin.gan/rockboxsim
export FIRMDIR=$(ROOTDIR)/firmware
export APPSDIR=$(ROOTDIR)/apps
export TOOLSDIR=$(ROOTDIR)/tools
export DOCSDIR=$(ROOTDIR)/docs
export MANUALDIR=${ROOTDIR}/manual
export DEBUG=-DDEBUG
export MODELNAME=sansae200
export ARCHOSROM=
export FLASHFILE=
export TARGET_ID=23
export TARGET=-DSANSA_E200
export CPU=arm
export MANUFACTURER=sandisk
export OBJDIR=/home/justin.gan/rockboxsim
export BUILDDIR=/home/justin.gan/rockboxsim
export LANGUAGE=english
export VOICELANGUAGE=
export MEMORYSIZE=32
export BUILDDATE:=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
export MKFIRMWARE=/home/justin.gan/rockboxsim/tools/scramble -mi4v3 -model=e200 -type=RBOS
export BMP2RB_MONO=/home/justin.gan/rockboxsim/tools/bmp2rb -f 0
export BMP2RB_NATIVE=/home/justin.gan/rockboxsim/tools/bmp2rb -f 4
export BMP2RB_REMOTEMONO=
export BMP2RB_REMOTENATIVE=
export BINARY=rockboxui.exe
export APPEXTRA=recorder:gui:radio
export ENABLEDPLUGINS=yes
export SOFTWARECODECS=yes
export EXTRA_DEFINES=-DSIMULATOR
export HOSTCC=/usr/bin/gcc
export HOSTAR=/usr/bin/ar
export CC=/usr/bin/gcc
export LD=/usr/bin/ar
export AR=/usr/bin/ar
export AS=/usr/bin/as
export OC=/usr/bin/objcopy
export WINDRES=/usr/bin/windres
export DLLTOOL=/usr/bin/dlltool
export DLLWRAP=/usr/bin/dllwrap
export RANLIB=/usr/bin/ranlib
export PREFIX=
export PROFILE_OPTS=
export SIMVER=sdl
export SIMDIR=$(ROOTDIR)/uisimulator/sdl
export GCCOPTS=-W -Wall -g -fno-builtin -I/usr/local/include/SDL -Dmain=SDL_main -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin -I$(SIMDIR) -mmmx
export TARGET_INC=-I$(FIRMDIR)/target/arm/sandisk/sansa-e200 -I$(FIRMDIR)/target/hosted/sdl/ -I$(FIRMDIR)/target/hosted/ -I$(FIRMDIR)/target/arm/sandisk -I$(FIRMDIR)/target/arm
export LOADADDRESS=
export SHARED_FLAG=-shared
export LDOPTS=-lm -mconsole -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin
export GLOBAL_LDOPTS=
export GCCVER=3.4.4
export GCCNUM=304
export UNAME=CYGWIN_NT-5.1
export MANUALDEV=sansae200
export TTS_OPTS=
export TTS_ENGINE=
export ENC_OPTS=
export ENCODER=
export USE_ELF=
export RBDIR=.rockbox
export SDLCONFIG=/usr/local/bin/sdl-config

CONFIGURE_OPTIONS=--target=$(MODELNAME) --ram=$(MEMORYSIZE) --rbdir=$(RBDIR) --type=S --prefix=$(PREFIX)

include $(TOOLSDIR)/root.make

So I downloaded rockbox again to a different directory and tried the ./tools/configure for the Sansa e200 Normal build, and this generates the following errors:

Normal build selected
Using source code root directory: /home/user/rockbox
./tools/configure: line 2869: arm-elf-eabi-gcc: command not found
./tools/configure: line 2876: arm-elf-eabi-ld: command not found
[WARNING] The compiler you must use (arm-elf-eabi-gcc) is not in your path!
[WARNING] this may cause your build to fail since we cannot do the
[WARNING] checks we want now.
Using arm-elf-eabi-ld
Created Makefile

I get the same error message as above if I try running make.

Any ideas?
#


Ah... should have read topic: http://forums.rockbox.org/index.php?topic=25059.0 I think it's the same problem.
Title: Re: Attempting to run make fails
Post by: [Saint] on July 11, 2010, 02:04:05 AM
jgrg1,

The CygWin wiki page *really* needs an update, it's been on my todo list for a while now...thanks for the reminder ;)

I'm assuming that you just grabbed the premade packages from download.rockbox.org, and as far as I know there is no prebuilt eabi (the toolchain your target uses) package for CygWin yet.

You'll need to cd to the tools directory in the rockbox source you checked out and run the script rockboxdev.sh to build the new toolchain.
On CygWin this will take some time.

If you want to build a simulator build you'll also need to download the SDL source and build SDL as well.

You will need to delete the toolchains that you installed previously for the rockboxdev.sh script to work porperly, and also remove the path information that you added to your $PATH
(The toolchains are *now* installed in a default path of the CygWin setup, and you don't have to edit the path at all as long as you don't change the directory they are installed to).

You may even find it easier to just delete your cygwin install and start again, (this guarantees there are no "leftovers"), it's a bit brutal, but it's up to you.

Start here if you decided to start fresh
- Download/Install CygWin (*Do* install the packages listed on the wiki, but not the toolchain packages), you'll also want to install the package "curl" (use the search function in the CygWin installer) if you want to download the source code from within cygwin directly, and you'll need it for rockboxdev.sh to complete sucessfully.

- Run CygWin and use it to checkout the rockbox source code.
("svn co svn://svn.rockbox.org/rockbox/trunk rockbox" without the quotes will install it to a folder called rockbox in the current directory)

Start here if you cleaned up your existing install
- cd to the tools directory in the rockbox source (cd <path/to/tools/directory>/tools) and run the rockboxdev.sh script by (again, without the quotes) "./rockboxdev.sh"

- Select the toolchains you want to install, you'll probably only want to install arm-elf-eabi, but that's up to you. Remember, this will take a LONG time.

After this completes, it will give you a string to copy into your $PATH variable, ignore it, you should not need to alter the $PATH at all.
(if you want to confirm this, do "echo $PATH" at the CygWin prompt, you should see that /usr/local/bin:, /usr/bin:, and /bin: are already in the $PATH by default.)

When you get this far and you want to install SDL from source to build a simulator, post back.
That should be in another post to stop this turning into a novel ;)

Also, if I need to explain anything further, please post back.


[St.]
Title: Re: Attempting to run make fails
Post by: jgrg1 on July 11, 2010, 03:09:40 PM
Hi,

thanks for that. I installed the extra cygwin packages and ran ./rockboxdev.sh. You're right, it did take ages. Seemed to work though. Thanks for your help.

Cheers
Justin