A Fresh New Toolchain+libs - Compiled On Demand!


Does anyone have a working makefile for the toolchain under linux?

I'm just picking up linux and haven't got a clue about makefiles, squeezing too much into my brain at once :blink:
 
Monkey posted on Mar 2 2006 at 01:35 PM said:
I'm looking for [...] a makefile that will make compile my program [...]
Code:
________________   ________               _____  .____     ________________________________
\_   _____/  _  \  \_____  \             /  _  \ |    |    \_   _____/\______   \__    ___/
 |    __)/  /_\  \  /  / \  \   ______  /  /_\  \|    |     |    __)_  |       _/ |    |
 |     \/    |    \/   \_/.  \ /_____/ /    |    \    |___  |        \ |    |   \ |    |
 \___  /\____|__  /\_____\ \_/         \____|__  /_______ \/_______  / |____|_  / |____|
     \/         \/        \__>                 \/        \/        \/         \/
This is another one of those anoying FAQs that just keeps coming back.

Just Read The Fine Material available (e.g. HERE: http://www.gnu.org/software/make/manual/html_mono/make.html ) instead of asking us to give you a quick incomplete rundown that magically works for all your stuff, and then having to come back 10 times with stupid 'it doesn't work for me'-questions.

And please, do yourself a favour and just use the tools without make for a while before attempting to automate stuff.

P.
 
Last edited by a moderator:
luteijn posted on Mar 2 2006 at 02:32 PM said:
And please, do yourself a favour and just use the tools without make for a while before attempting to automate stuff.
Nonsense.

Why make things harder and more frustrating for yourself?

Start with the basics by all means, but accept that the basics are a .c file, a .h file and a MAKEFILE.

You can find some good info in the wiki:
http://wiki.gp2x.org/wiki/Demo_Program
 
Last edited by a moderator:
FluffyPanda posted on Mar 2 2006 at 03:25 PM said:
Nonsense.
Why make things harder and more frustrating for yourself?
Start with the basics by all means, but accept that the basics are a .c file, a .h file and a MAKEFILE.

I really believe someone that is just starting out using linux and gcc should start compiling his first programs without using make. Just start with gcc -o hello hello.c

Once you get the hang of that, and realize that you're often typing the same sort of things to build your stuff, and have made a script like 'build' to automate it a little, then you go looking for a more general solution and use make + a makefile.

If you start with trying to create a makefile without knowing what -l -L -o -c and friends do, THEN you'll make things harder and more frustrating for yourself, especially if you're new to unix and its wonders, like Monkey. First learn about scripting on unix, so the makefiel format will make more sense.

P.
 
Last edited by a moderator:
Monkey posted on Mar 2 2006 at 03:42 AM said:
I'm just picking up linux and haven't got a clue about makefiles, squeezing too much into my brain at once :blink:
[...]
I can install the toolchain fine, I'm looking for an example of a makefile that will make compile my program with the toolchain
I assumed that he had a non-trivial program to compile and was asking about the linux build environment.

In that case starting to learn about it by typing 3-line GCC commands isn't a great idea.

Sure, you can avoid autoconf and all that stuff, but a makefile is pretty easy to pick up with a good example to read.
 
Last edited by a moderator:
Actually, today I got that even with subversion installed when I was rebuilding all the libs to get newer versions.

The error message was funny. It told me it quit for reason "HTTP 200 (OK)" or something to that effect.
 
theoddbot posted on Mar 2 2006 at 11:08 PM said:
install subversion

it's already installed, seems more like the dowload location is down.
 
Last edited by a moderator:
I had that error as well, just run the script without the Tremor pack, you can get the oggvorbis header files from Guyfalkes' hw libs here.

That should make it work, it makes mine work anyway.
 
Last edited by a moderator:
trying to run ooPo's script on my ubuntu linux desktop, i got this error message:

Code:
$ sudo ./toolchain.pl GP2X

Dependencies:
gcc:           Found!
make:          Found!
wget:          Found!
patch:         Found!
$GP2XDEV:      Found!
path:          Error!

=====================
== ERROR DETECTED! ==
=====================

the problem was sudo has a hardcoded path ... so i had to make the $GP2XDEV directory, change its ownership to myself, and run the script as non-root (replace user:user w/ your own user name in the following command) ;)

Code:
$ sudo mkdir /usr/local/gp2xdev && sudo chown user:user /usr/local/gp2xdev
$ ./toolchain.pl GP2X

it's chugging away on Step 4 of 6 now, here's hoping to compiling some demo code tonight :) big thanks to ooPo for this script and his help!
 
I got through the first two steps in the readme alright, but on the third one I always get errors. It starts off alright, but later on I get the following error:
Code:
Step 3 of 14: libpng-1.2.8
 downloading:   Error!
I have tried this multiple times and I get the same error every time. Am I doing something wrong? Is there an easy way to fix this?

I'm running on ubuntu 6.06 (i don't know if this matters or not).

Thanks,
-ben

EDIT: i'm new to linux, so please try to be clear
 
Just tried it again myself. The file version has changed for libpng so it's looking for a file that is no longer present on the server. It should be possible to change every instance of libpng-1.1.08 to libpng-1.1.10 (or something like that, it was definately minor revision 8 to 10 but the rest of the filename might be wrong...) in the script to make it work again.

I'm at work now, but I'm going to have a go at editing the script when I get home tonight.
 
Hmmm... there's a patch file that is applied to libpng 1.2.8 and I very much doubt that it will work with 1.2.10

Looks like we need to find an alternate ftp source for 1.2.8 or hope that ooPo comes along and updates his build script.

I'll take a look next week when I should have a little bit of time to spare to see if I can't sort it out one way or the other.
 
You can get 1.2.8 on sourceforge. If you can't find it, I should still have the source tarball on my machine here. I actually just built this toolchain last night on this machine. Once you have it downloaded, you have to comment out the download line in the toolchain.pl script, otherwise it will keep trying to download it.

I wasn't able to build Tremor or SDL_svg, though. Not sure why.
 
I managed to get libpng to download by finding the link on sourceforge and modifying the script to download from there. However, I now get the following error after running ./toolchain.pl GP2X-LIBS
Code:
Step 6 of 14: tremor-1.0.0 (prerelease)
 downloading:   Done!
 unpacking:	 Done!
 patching:	  Error!

=====================
== ERROR DETECTED! ==
=====================
Any ideas on how to fix this?
 
Back
Top