A Fresh New Toolchain+libs - Compiled On Demand!


Since I was forced to do a fresh install of my OS I took the opertunity to set my gp2x dev system using oopo's toolchain. I've made a few modifications :-
libpng is now 1.2.10
libxml2 is now 2.6.24
SDL is now my most recent version (more recent than svn!), I'll re-modify the script soon to change it to get the source from svn.

I've not tested anything other than my basic SDL test, but it does use libpng!

Thanks ooPo for all your work on this, hope you don't mind me updating (and I hope I've done it correctly :) )
Download here
 
paeryn, will you be distributing the SDL Libs seperately from the toolchain as .a for the GCC compiler? Cheers.
 
yaustar posted on May 16 2006 at 01:11 PM said:
paeryn, will you be distributing the SDL Libs seperately from the toolchain as .a for the GCC compiler? Cheers.
The pre-compiled version is here
You may also want the extra include file here, put that where the rest of SDL's includes are (${GP2XDEV}/include/SDL/ if you built with ooPo's toolchain). You only need to include this file if you want to access the few GP2X specific functions that SDL doesn't natively support such as full-screen scaling, colour & alpha blended cursor and regions. It isn't needed for blitter support, although when I re-write the memory manager to support larger memory sizes (currently 5MB, will be able to handle upto 21MB or more depending on usage) it will be needed.
 
Last edited by a moderator:
paeryn... what have you done? XDD

Step 7 of 14: SDL-1.2.9 (paeryn)
downloading: Done!
unpacking: Done!
patching: Error!

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

##
## Executing the following command:
##
## { cd SDL-1.2.9-GP2X && cat ../patches/SDL-1.2.9-GP2X.patch | patch -p1; }
##
patching file config.sub
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file config.sub.rej
The next patch would create the file src/thread/linux/clone.S,
which already exists! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/thread/linux/clone.S.rej
patching file configure
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.rej


ERROR: Error!
 
Yup, I just got that and was coming here to complain about it too. Hehe.
 
NoobLuck posted on May 26 2006 at 08:30 PM said:
paeryn... what have you done? XDD
Yeah, sorry about that. I noticed it the other day when I tried compiling my dev tree. That's what I get for having 3 seperate source trees of the same program :unsure:
I'm packing up my main tree now (and updating the Open2x version on svn). I'll fix the patch part (it doesn't need the patch anymore) of my version of ooPo's toolchain.
Done. The source is only available via sourceforge, with the following command
Code:
# svn checkout https://svn.sourceforge.net/svnroot/open2x/trunk/libs/SDL-1.2.9
You need to configure it before running make with something resembling this:
Code:
./configure --prefix=${GP2XDEV} --host=arm-gnu --disable-shared
I don't support building it as a shared library as it causes problems. The downside is that you need to get the order of the libraries right when linking or you get errors about functions not being found.
Fopefully I've fixed the toolchain (again), and it's available here (removed date from the filename to make updating easier.
 
Last edited by a moderator:
Hi,

I am doing a fresh build of all the libs and ran into some problems compiling SMPEG (step 10 of Oopos toolchain script). It gives the following error:

Code:
.libs/libsmpeg.so: undefined reference to `operator new[](unsigned int)'
.libs/libsmpeg.so: undefined reference to `operator delete(void*)'
.libs/libsmpeg.so: undefined reference to `__cxa_pure_virtual'
.libs/libsmpeg.so: undefined reference to `operator delete[](void*)'
.libs/libsmpeg.so: undefined reference to `operator new(unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [plaympeg] Error 1
make[1]: Leaving directory `/home/Administrator/newtoolchain/smpeg-0.4.4'
make: *** [all-recursive] Error 1

another person has the same problem so wanted to know if anyone knew how to fix it? im using paeryns modified toolchain script if thats any help.
 
I tried the newer makefile-based toolchain build method, i got the following error when building SDL_svg, can someone help ?

make[1]: entrant dans le répertoire « /usr/src/gp2x/gp2xdev/libs/SDL_svg-1.1.9 »
if /bin/sh ./libtool --mode=compile 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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_svg\" -DVERSION=\"1.1.9\" -DHAVE_LIBXML2=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/include -I/usr/local/gp2xdev/include/SDL -D_REENTRANT -MT SDL_svg.lo -MD -MP -MF ".deps/SDL_svg.Tpo" \
-c -o SDL_svg.lo `test -f 'SDL_svg.c' || echo './'`SDL_svg.c; \
then mv -f ".deps/SDL_svg.Tpo" ".deps/SDL_svg.Plo"; \
else rm -f ".deps/SDL_svg.Tpo"; exit 1; \
fi
mkdir .libs
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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_svg\" -DVERSION=\"1.1.9\" -DHAVE_LIBXML2=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/usr/local/gp2xdev/include -I/usr/local/gp2xdev/include/libxml2 -I/usr/include -I/usr/local/gp2xdev/include/SDL -D_REENTRANT -MT SDL_svg.lo -MD -MP -MF .deps/SDL_svg.Tpo -c SDL_svg.c -fPIC -DPIC -o .libs/SDL_svg.lo
SDL_svg.c: In function '_SDL_SVG_ArcTo':
/usr/include/bits/mathinline.h:541: error: impossible constraint in 'asm'
make[1]: *** [SDL_svg.lo] Erreur 1
make[1]: quittant le répertoire « /usr/src/gp2x/gp2xdev/libs/SDL_svg-1.1.9 »
make: *** [/usr/local/gp2xdev/lib/libSDL_svg.a] Erreur 2
 
I don't know why it worked for me - I'm using the Debian/testing distribution of Linux what's everyone else using?
seems to work fine for me:

luteijn@dollar:~$ cat /etc/issue
Debian GNU/Linux 3.1 \n \l

luteijn@dollar:~$ uname -a
Linux dollar 2.4.27-3-686 #1 Wed Feb 8 12:40:33 UTC 2006 i686 GNU/Linux
luteijn@dollar:~$
 
Last edited by a moderator:
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
getarg.c:239: error: for each function it appears in.)
getarg.c:245: warning: implicit declaration of function 'malloc'
getarg.c:245: warning: incompatible implicit declaration of built-in function 'malloc'
getarg.c:246: warning: incompatible implicit declaration of built-in function 'strcpy'
getarg.c:252: warning: implicit declaration of function 'strlen'
getarg.c:252: warning: incompatible implicit declaration of built-in function 'strlen'
getarg.c: In function 'GAUpdateParameters':
getarg.c:290: warning: incompatible implicit declaration of built-in function 'strlen'
getarg.c: In function 'GAGetParmeters':
getarg.c:337: warning: implicit declaration of function 'sscanf'
getarg.c:337: warning: incompatible implicit declaration of built-in function 'sscanf'
getarg.c: In function 'GAGetMultiParmeters':
getarg.c:434: warning: incompatible implicit declaration of built-in function 'sscanf'
getarg.c:511: error: 'NULL' undeclared (first use in this function)
getarg.c: In function 'GAPrintErrMsg':
getarg.c:579: warning: implicit declaration of function 'fprintf'
getarg.c:579: warning: incompatible implicit declaration of built-in function 'fprintf'
getarg.c:579: error: 'stderr' undeclared (first use in this function)
getarg.c: In function 'GAPrintHowTo':
getarg.c:611: warning: incompatible implicit declaration of built-in function 'fprintf'
getarg.c:611: error: 'stderr' undeclared (first use in this function)
getarg.c:616: warning: incompatible implicit declaration of built-in function 'strlen'
getarg.c: In function 'MyMalloc':
getarg.c:688: warning: incompatible implicit declaration of built-in function 'malloc'
getarg.c:688: error: 'NULL' undeclared (first use in this function)
getarg.c:691: warning: incompatible implicit declaration of built-in function 'fprintf'
getarg.c:691: error: 'stderr' undeclared (first use in this function)
getarg.c:692: warning: implicit declaration of function 'exit'
getarg.c:692: warning: incompatible implicit declaration of built-in function 'exit'
make[3]: *** [getarg.o] Error 1
make[3]: Leaving directory `/home/ryo/gp2xdev/libs/libungif-4.1.4/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ryo/gp2xdev/libs/libungif-4.1.4'
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?
 
Back
Top