Ubuntu Development Ide


inksmithy

Still Fresh
Joined
Nov 12, 2006
Messages
37
Age
51
Location
Northumberland UK
Website
www.inksmithy.co.uk
Hello all,

I'll give some background first.

I just formatted my laptop and killed windows completely, which was the plan so I'm not too distressed. I've installed ubuntu edgy with absolutely no problems, this system is humming like a field of beehives, its fantastic.

I've downloaded and installed the gp2xsdk_linux.tar.gz and everything seemed to go well, which with the addition of kdevelop, would seem to indicate that I'm ready to start coding.

However, now I'm lost. I've started a new project in kdevelop and according to what I've read through all the forums and documentation in kdevelop, I need to set the compiler to the arm-gcc I have at /gp2xsdk/Tools/arm-gp2x-linux and then - in theory - I should be able to compile gpe's and test them. However when I go to the project menu in kdevelop and try to change the architecture that the compiler will compile to, there isn't an entry for the arm-gcc.

Even that wouldn't be such an issue, provided I could add the compiler to the architecture list and be able to choose it on a per-project basis, but now matter what I do, I can't find out where to do it, or even if I can do it.

Now I'm not a clever enough coder to be able to just write code with a text editor, so I would prefer an IDE.

Does anyone have any idea how I can set kdevelop up to use the sdk compiler or if not, any ideas of a decent c++ ide which can be linked to the compiler to get things working?

looking forward to hearing from you all,
 
On my Ubuntu 6 machine, I just use gedit, it does code highlighting and etc. But I mostly work in Python. Perhaps you would do better with Code::Blocks
 
On my Ubuntu 6 machine, I just use gedit, it does code highlighting and etc. But I mostly work in Python. Perhaps you would do better with Code::Blocks

Cheers, I've just downloaded Code::Blocks and I'm starting to play with it. I'm finding at the moment that its presenting me with four different compilers its detected, but none of them are the arm-gp2x-linux-gcc compiler I want to use.

I'm sure there is a way for me to add this compiler, I just have to figure out how to do it.

cheers,

Alan
 
Last edited by a moderator:
I know your problem is most likely too different for this to help, but perhaps you can get something out of the Code::Blocks for windows article:

http://wiki.gp2x.org/wiki/Using_CodeBlocks

- Alex
Alex, thats fantastic, I am going through the instructions and trying to match them to linux. The two windows and linux versions are much the same, so in theory I should be able to make it work.

Brilliant, thanks very much!
 
Last edited by a moderator:
Want the *best* GP2X compiler?

Download and install Open2x Toolchain:
Code:
svn co https://svn.sourceforge.net/svnroot/open2x/trunk/toolchain toolchain
cd toolchain
make

Go root and configure environment variables:
Code:
su
[type your root password]
cd /etc/
nano environment

nano will pull up your environment file (where environment variables are stored).
It should look something like this:

Code:
LANGUAGE="en"

LANG=en_US.UTF-8
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"

add open2x to the path:

Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/usr/local/open2x/bin"

Notice that entries are separated by colons " : "

also add the following:

Code:
OPEN2X="/usr/local/open2x"

The final result should look something like this:

Code:
LANGUAGE="en"

LANG=en_US.UTF-8
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/usr/local/open2x/bin"
OPEN2X="/usr/local/open2x"

Now save the file by pressing CTRL+O (thats O as in Okay, not 0 as in zero)

Reboot the system

Test the compiler:
Code:
open2x-gcc

it should output:

Code:
open2x-gcc: no input files

Now the best part of the Open2x toolchain are the precompiled GP2X libraries. To install them do this:

Code:
svn co https://svn.sourceforge.net/svnroot/open2x/trunk/libs libs
cd libs
make

There, you now have the most complete GP2X toolchain availiable.

I think I'll put this on the wiki, I did good :)
 
I think I'll put this on the wiki, I did good :)

You know what, if this works the way it looks like it will, I think I would want to have your babies.

Geographically however that looks to be impossible, so you will just have to settle for my massive gratitude.

thank you so much.

Alan
 
Last edited by a moderator:
Seriously though, if you don't put that on the wiki, I will with full attribution to you, I've been running into loads of problems getting an environment set up - I'm a complete linux newbie so I'm being a bit careful with mucking around with my OS.

In other words, I've searched high and low for easy instructions like that to get things up and running, this stuff looks fantastic.

Alan
 
I get to the point where I need to enter 'make' and I get this in response, any ideas? I was thinking about making a directory in /home/alan/open2x', would that be the go?

Code:
alan@AlansLaptop:~/toolchain$ make
mkdir -p /open2x/include/asm
mkdir: cannot create directory `/open2x': Permission denied
make: *** [/open2x/include/linux/version.h] Error 1

nevermind, I figured out I needed a sudo in there
 
No, I'm still getting an error with this, somewhere through the make operation:

Code:
gcc: gengtype-lex.c: No such file or directory
gcc: no input files
make[2]: *** [build/gengtype-lex.o] Error 1
make[2]: Leaving directory `/home/alan/toolchain/gcc-4.0.2/build-open2x-stage1/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/alan/toolchain/gcc-4.0.2/build-open2x-stage1'
alan@AlansLaptop:/etc$ gcc] Error 2

I'm stumped on this one, any ideas?
 
I get to the point where I need to enter 'make' and I get this in response, any ideas? I was thinking about making a directory in /home/alan/open2x', would that be the go?

Code:
alan@AlansLaptop:~/toolchain$ make
mkdir -p /open2x/include/asm
mkdir: cannot create directory `/open2x': Permission denied
make: *** [/open2x/include/linux/version.h] Error 1

nevermind, I figured out I needed a sudo in there
So why is it trying to create a directory called open2x in the root of the filesystem?

One thing I've learnt many times from trying to build things from source is that it is never as easy as just typing 'make'.
 
Last edited by a moderator:
For me, most of those times are actually times that I typed ./configure -blah beforehand. On SuSE 10.1, a lot of stuff compiled without problems.

I'm building the devkit right now. Not sure if it will work, but i hope so. I'm in VMWare, lol. I need to get linux back onto my harddrive yet again sometime.
 
Damn, it should have worked. Apparently I must not have the same setup as you do. I have installed several things since the initial Ubuntu install.

You might want to try it on a Ubuntu 6 machine, thats the only thing I tested on. It should work though as its just my explanation of the sparse instructions included with Open2x.
 
hi,
in this section here....
svn co https://svn.sourceforge.net/svnroot/open2x/trunk/toolchain toolchain
cd toolchain
make

sling a
export PATH=$PATH:/usr/local/open2x/bin
export OPEN2X="/usr/local/open2x"
and become root before doing the make

or do
export PATH=$PATH:~/open2x/bin
export OPEN2X="~/open2x"
and don't become root :)

besides build-essential being needed, bison seems required too....

(edited for bison and export PATH being required b4 make)
 
You might want to try it on a Ubuntu 6 machine, thats the only thing I tested on. It should work though as its just my explanation of the sparse instructions included with Open2x.
I'm on ubuntu 6.1 edgy eft.

After seeing the script running for a while before the error I can see how its going to work. Its just my complete linux noobishness which is letting me down.

Poddy, I'll be trying this before you reply probably, but I think what you mean is:
Code:
svn co https://svn.sourceforge.net/svnroot/open2x/trunk/toolchain toolchain
cd toolchain
export OPEN2X="~/open2x"
make

yeah? I'm pretty sure 'sling a' isn't a terminal command but thinking about some of the bizarre terminal commands ron this OS its entirely possible it is. I love this OS, I just need to get 15 years of windows out of my head.

Alan
 
hi, sorry, sling a blah blah meant put a blah blah, its not a command, just my crap use of english :)
edited previous post with a bit more info....

good luck :)
 
hi, sorry, sling a blah blah meant put a blah blah, its not a command, just my crap use of english :)
edited previous post with a bit more info....

good luck :)
No worries mate, I thought I better make sure though.

I've just learned (oh how I've learned) that when you put something in the trash folder you may need root permission to empty the trash folder and blah blah blah.

So I'm starting again from the top with that script. I'll have to go to work before its finished downloading, but that just means I will have to start from the second line after all the downloading is done.

I think I can bear that.

Thanks very much for your help so far, I'll keep you up to date.

Alan
 
Last edited by a moderator:
Just one thing to point out, AFAIK Ubuntu 6 = Dapper, not Edgy. I'm on Dapper.

edit: Yep, Dapper is 6.06 and Edgy is 6.10. So what I meant by 6 was Dapper, I was figuring Edgy was 7...lousy Ubuntu naming system.
 
Just one thing to point out, AFAIK Ubuntu 6 = Dapper, not Edgy. I'm on Dapper.

edit: Yep, Dapper is 6.06 and Edgy is 6.10. So what I meant by 6 was Dapper, I was figuring Edgy was 7...lousy Ubuntu naming system.
I shouldn't think that would have made too much of a difference to be honest, but I'm not having a great deal of success with any of the toolchains at the moment. I don't know what the dependancies are or anything, but even following the instructions step by step and so on, I'm getting errors in the make.

Does this have any dependencies that might be unusual? Is there a chance of a .deb file anywhere around? I would prefer to compile it myself, but I really am striking difficulties no matter which way I turn.

Alan
 
Last edited by a moderator:
Back
Top