A Fresh New Toolchain+libs - Compiled On Demand!


I just wish if that someone that had sucess compiling the new lib's would just put them up for people to download. :(

Well, most of my gp2x stuff is accessible over the internet under
http://luteijn.xs4all.nl/html/gp2x/
e.g. http://luteijn.xs4all.nl/html/gp2x/newtoolchain/gp2xdev/
It's not a great connection, but if you're desperate enough... Still, if stuff doesn't compile for you, these might not be any help.. Doesn't hurt to try too much though.
 
Last edited by a moderator:
Funny you should say that, I was trying to get oggs to work with Freedroid but it just segv'd so I went back to mods and I get unrecognized file format messages when I try to play them
 
as parkydr mention, if you copy the audio related libs from mine over your current ones it should work fine (i have done this myself with no problems).

regarding making a brand new upto date build, ive got everything compiled apart from the latest audio libs, keep getting the error message i posted a few posts above. if anyone can help let me know and i can then try and release a new set of libs for people to use.
 
I apologize for not having specific pastes, I long since resolved the problem and moved on, just thought it prudent to post here...

When on the tremor-0.0.0 step of libs/makefile, I had a problem with --host not being passed to autogen. I just copied the configure parameters verbatim into the (previously empty) autogen.sh parameters and all was well.
 
I get the same exact same errors, libungif is a dead end. Been downloading toolchains from the archives for a week, no sdk has completly built, at least none of them available in unbroken files that will actually extract whole. Cannot get up to a SDL hello world to save my life. Rather disppointing that such a nice linux device with all the hype doesn't even ship with a working sdk for linux on either one of the two fairly empty cdroms, have to go scraping it together from google. Kudos and thanks to oopos and paeryn for slogging through it, truly heroic efforts.

I get an error on compiling libungif-4.1.4

Code:
make[1]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
make  all-recursive
make[2]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
Making all in lib
make[3]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4/lib'
if gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I..	-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c; \
		then mv -f ".deps/getarg.Tpo" ".deps/getarg.Po"; else rm -f ".deps/getarg.Tpo"; exit 1; fi
getarg.c: In function 'GAGetArgs':
getarg.c:174: warning: implicit declaration of function 'strcpy'
getarg.c:174: warning: incompatible implicit declaration of built-in function 'strcpy'
getarg.c: In function 'GATestAllSatis':
getarg.c:239: error: 'NULL' undeclared (first use in this function)
getarg.c:239: error: (Each undeclared identifier is reported only once

[snip...]

The build of the toolchain had no problem, I used gp2xdev-20060525.tar.bz2.
Can anyone help me?
[/quote]
 
Last edited by a moderator:
I just went through downloaded and rebuilt the toolchain on my linux box a few days. I fixed makefile, loaded different version of libs and such to get it to work. I think libsv? was the only fatality but I did get it done. I could see if I can re-tar what I did (after a make clean) and post a link if you think that would help.
 
Ok ... I will re-tar it and post a link now that will be available on Monday mid-morning Eastern Standard time US:

OK IT EXISTS now : 8:48 PM EST USA, An LUA build for GP2XX and my current VBA emulator work (Not Funtional on GP2X yet) are there too because I am too lazy to move them out for the tar.

http://www.ivrtech.net/files/LinuxGp2xBuildTree.tar.gz

Size is 144,617,538 bytes

NOTE: I have put the link here BEFORE I put the files in it. When the file is ready I will re-edit this message and note that fact.

*** I tried a make clean and the make files deleted my development libraries for I manually (find . -name "*.o" -exec rm {} ; -print
removed the object files to make things smaller. I hope this helps and does not create too much greef for me.
 
Last edited by a moderator:
I look at the make output:

gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I.. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c

pretty dirty, stop that stuttering and it's:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c
getarg.c:206: error: syntax error before '--' token
getarg.c:212: warning: type defaults to 'int' in declaration of 'Option'
getarg.c:212: error: 'argv' undeclared here (not in a function)
getarg.c:212: warning: data definition has no type or storage class
getarg.c:213: error: syntax error before 'if'

Looking at the line above the error I see what's not defined and if we change it to:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -DHAVE_STDARG_H -c -o getarg.o getarg.c

It builds sweetly. Not sure exactly where to plug in HAVE_STDARG_H, but it's not being defined I think is our problem.

I get an error on compiling libungif-4.1.4

The build of the toolchain had no problem, I used gp2xdev-20060525.tar.bz2.
Can anyone help me?
 
Last edited by a moderator:
Sphinxter posted on Oct 1 2006 at 09:23 PM said:
I look at the make output:

gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I.. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c

pretty dirty, stop that stuttering and it's:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c
getarg.c:206: error: syntax error before '--' token
getarg.c:212: warning: type defaults to 'int' in declaration of 'Option'
getarg.c:212: error: 'argv' undeclared here (not in a function)
getarg.c:212: warning: data definition has no type or storage class
getarg.c:213: error: syntax error before 'if'

Looking at the line above the error I see what's not defined and if we change it to:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -DHAVE_STDARG_H -c -o getarg.o getarg.c

It builds sweetly. Not sure exactly where to plug in HAVE_STDARG_H, but it's not being defined I think is our problem.

I get an error on compiling libungif-4.1.4

The build of the toolchain had no problem, I used gp2xdev-20060525.tar.bz2.
Can anyone help me?

There is at least one wrong include directive here "-I/usr/X11R6/include" that could cause problems (not that it is). I generally look at the Makefiles generated by the "./configure" and see if I should add command line options or edit the generated makefile to correct the potential issues.

That is also why I have the paths for cross platform developement totally isolated from each other. My gp2x stuff is aall rooted at /gp2xdev/... so I can look for /usr or /lib and change them to point where I need.
 
Last edited by a moderator:
Curiouser and curiouser... next error in libungif is:

gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I.. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT dgif_lib.lo -MD -MP -MF .deps/dgif_lib.Tpo -c dgif_lib.c -fPIC -DPIC -o .libs/dgif_lib.o
In file included from dgif_lib.c:40:
gif_lib_private.h:46: error: syntax error before 'FILE'
gif_lib_private.h:46: warning: no semicolon at end of struct or union
gif_lib_private.h:53: error: syntax error before '}' token
gif_lib_private.h:53: warning: type defaults to 'int' in declaration of 'GifFilePrivateType'
[snip...]

If I clean up that command line up to:

gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I.. -Wall -MT dgif_lib.lo -MD -MP -MF .deps/dgif_lib.Tpo -c dgif_lib.c -fPIC -DPIC -o .libs/dgif_lib.o

it builds fine with a few signedness warnings only. So it seems the autoconf is mangling the command lines? Not sure what to think about this.

Sphinxter posted on Oct 2 2006 at 01:23 AM said:
I look at the make output:

gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I.. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c

pretty dirty, stop that stuttering and it's:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c
getarg.c:206: error: syntax error before '--' token
getarg.c:212: warning: type defaults to 'int' in declaration of 'Option'
getarg.c:212: error: 'argv' undeclared here (not in a function)
getarg.c:212: warning: data definition has no type or storage class
getarg.c:213: error: syntax error before 'if'

Looking at the line above the error I see what's not defined and if we change it to:

gp2x-gcc -O2 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -I. -I.. -Wall -O2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -DHAVE_STDARG_H -c -o getarg.o getarg.c

It builds sweetly. Not sure exactly where to plug in HAVE_STDARG_H, but it's not being defined I think is our problem.

I get an error on compiling libungif-4.1.4

The build of the toolchain had no problem, I used gp2xdev-20060525.tar.bz2.
Can anyone help me?
 
Last edited by a moderator:
Are you building from the set I put the URL on or are you build from the archives?

When I did the tools build I sourced the following file prior to the build:
Code:
GP2XDEV="/gp2xdev"
export GP2XDEV

PATH="$PATH:$GP2XDEV/bin"

export PATH
LIBDIR=$GP2XDEV/lib
export LIBDIR

CC=gp2x-gcc
CPP=gp2x-gcc
CXX=gp2x-g++

export CC CXX CPP

CFLAGS=-I$GP2XDEV/include
CPPFLAGS=-I$GP2XDEV/include
CXXFLAGS=-I$GP2XDEV/include

export CFLAGS CPPFLAGS CXXFLAGS

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR
export LD_LIBRARY_PATH


LD_RUN_PATH=$LD_RUN_PATH:$LIBDIR
export LD_RUN_PATH

Of course in my case I was putting the tools in "/gp2xdev/..." Which is not what the directions state because I do not like mixing my cross compiling tools with my platform tools. I am built my tools on Fedora Core 5 with LOTS of developement tools loaded (and it's my web server).
 
I will try adding that to my environment, seems to be calling all the right tools from the right places. I am working from the gp2xdev-20060525.tar.bz2 downloaded here http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1609
Seems to be the cleanest, most complete I've seen so far. I'm trying to build on

beavis etc # uname -an
Linux beavis 2.6.17-gentoo-r8 #1 SMP Fri Sep 15 23:53:03 PST x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ GNU/Linux

this could be my problem here:

beavis etc # gcc --version
gcc (GCC) 4.1.1 (Gentoo 4.1.1)
Copyright © 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Gary Miller posted on Oct 2 2006 at 02:34 AM said:
Are you building from the set I put the URL on or are you build from the archives?

When I did the tools build I sourced the following file prior to the build:
Code:
GP2XDEV="/gp2xdev"
export GP2XDEV

PATH="$PATH:$GP2XDEV/bin"

export PATH
LIBDIR=$GP2XDEV/lib
export LIBDIR

CC=gp2x-gcc
CPP=gp2x-gcc
CXX=gp2x-g++

export CC CXX CPP

CFLAGS=-I$GP2XDEV/include
CPPFLAGS=-I$GP2XDEV/include
CXXFLAGS=-I$GP2XDEV/include

export CFLAGS CPPFLAGS CXXFLAGS

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR
export LD_LIBRARY_PATH


LD_RUN_PATH=$LD_RUN_PATH:$LIBDIR
export LD_RUN_PATH

Of course in my case I was putting the tools in "/gp2xdev/..." Which is not what the directions state because I do not like mixing my cross compiling tools with my platform tools. I am built my tools on Fedora Core 5 with LOTS of developement tools loaded (and it's my web server).
 
Last edited by a moderator:
Try commenting out the line:

AM_CFLAGS = @CFLAGS@ $(X_CFLAGS) -Wall

in both gp2xdev/libs/libungif-4.1.4/libs/Makefile.am and gp2xdev/libs/libungif-4.1.4/util/Makefile.am
I have not finished building or tried the results yet, looks like it's setting am_flags to cflags and then using them both. Ah man, other window just blew up in SDL_svg-1.1.9, looks like same problem.

I get an error on compiling libungif-4.1.4

Code:
make[1]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
make  all-recursive
make[2]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
Making all in lib
make[3]: Entering directory `/home/ryo/gp2xdev/libs/libungif-4.1.4/lib'
if gp2x-gcc -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -L/usr/local/gp2xdev/lib -DHAVE_CONFIG_H -I. -I. -I..	-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/X11R6/include -Wall -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -MT getarg.o -MD -MP -MF ".deps/getarg.Tpo" -c -o getarg.o getarg.c; \
		then mv -f ".deps/getarg.Tpo" ".deps/getarg.Po"; else rm -f ".deps/getarg.Tpo"; exit 1; fi
getarg.c: In function 'GAGetArgs':
getarg.c:174: warning: implicit declaration of function 'strcpy'
getarg.c:174: warning: incompatible implicit declaration of built-in function 'strcpy'
getarg.c: In function 'GATestAllSatis':

make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
make: *** [/usr/local/gp2xdev/lib/libungif.a] Error 2

I know that strcpy should be defined in string.h which is included by getarg.c, configure seems to be ok:

Code:
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes

The build of the toolchain had no problem, I used gp2xdev-20060525.tar.bz2.
Can anyone help me?
 
Last edited by a moderator:
SDL_svg-1.1.9 little different, in Makefile.in change COMPILE, LTCOMPILE and LINK to:

COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(CFLAGS)

LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@

It then gets a collision with the X includes, doesn't seem to care for --without-X so I changed ac_x_header_dirs in configure to:

configure:
ac_x_header_dirs='
'

so it won't find any X headers. Now SDL_ttf has blown up, looks like the X headers again.
 
Last edited by a moderator:
I changed configure to disappear the X headers and SDL_ttf-2.0.7 built and looks like the rest finished, now to try writing a makefile to build a test something with it. Is there like, a test suite for this?

[/quote]

It then gets a collision with the X includes, doesn't seem to care for --without-X so I changed ac_x_header_dirs in configure to:

configure:
ac_x_header_dirs='
'

so it won't find any X headers. Now SDL_ttf has blown up, looks like the X headers again.
[/quote]
 
Last edited by a moderator:
The new toolchain+libs is really great, took me a few messing with the order of everything to static link.but it works now, not sure how or if anything I'll do is big enough for autoconf so I just hacked a makefile together, how does everyone else do this, any of the libs out of order, would automake figure it out for me?

#
# $Id: Makefile,v 0.1 2006/10/09 16:35:00 Sphinxter $
#

VER = 0.1
PROG = demo.gpe
PREFIX = tmp
CFLAGS += -g -O2 -Wall -Werror $(shell ../bin/sdl-config --cflags)
LDFLAGS = -static \
-lSDLmain \
-lSDL_mixer \
-lSDL_svg \
-lSDL_ttf \
-lSDL_image \
-lbz2 \
-lform \
-lform_g \
-lfreetype \
-lhistory \
-liberty \
-lid3tag \
-ljpeg \
-lmad \
-lmenu \
-lmenu_g \
-lmikmod \
-lncurses++ \
-lncurses \
-lncurses_g \
-lpanel \
-lpanel_g \
-lpng \
-lpng12 \
-lreadline \
-lsmpeg \
-ltiff \
-ltiffxx \
-lungif \
-logg \
-lvorbis \
-lvorbisidec \
-lvorbisenc \
-lvorbisfile \
-lxml2 \
$(shell ../bin/sdl-config --libs) \
-lz

OBJET = demo.o
CCODE = $(shell ls *.c)
HEAD = $(shell ls *.h)

all: $(PROG)

$(PROG): $(OBJET)
../bin/gp2x-g++ -o $@ $^ $(LDFLAGS)

%.o: %.c $(HEAD)
../bin/gp2x-gcc $(CFLAGS) -c -o $@ $<

clean:
rm -f *.o *~ $(PROG)

cleanzip: cleantmp
rm -f $(PROG)-$(VER).zip

cleantmp:
rm -rf tmp

zip: all cleanzip cleantmp
mkdir -p $(PREFIX)/$(shell basename $(PROG) .gpe)
rm -rf bmp/.xvpics
cp -a bmp $(PREFIX)/$(shell basename $(PROG) .gpe)
cp -a wav $(PREFIX)/$(shell basename $(PROG) .gpe)
cp -a doc $(PREFIX)/$(shell basename $(PROG) .gpe)
cp -a $(PROG) $(PREFIX)/$(shell basename $(PROG) .gpe)
mkdir -p $(PREFIX)/$(shell basename $(PROG) .gpe)/src
cp -a $(CCODE) $(HEAD) Makefile $(PREFIX)/$(shell basename $(PROG) .gpe)/src
cd $(PREFIX); zip -r ../$(PROG)-$(VER).zip $(shell basename $(PROG) .gpe)
 
Back
Top