If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Hi!
I have built the toolchain in a GNU/Linux for an amd64 using Jim Ursetto's build script. Everything build's fine but after doing a 'source environ.sh', everytime I try to compile anything, I get allways something like this, no matter if is something from kos or a homebrew app:
bender@darkstar ~/dc/kos/kos-1.3.0/kos $ make
for i in utils libk++ kernel addons ../kos-ports/lib* ../kos-ports/lua ../kos-ports/lwip ../kos-ports/SDL ../kos-ports/zlib examples; do make -C $i || exit -1; done
make[1]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/utils'
for i in genromfs wav2adpcm vqenc gba-crcfix; do make -C $i; done
make[2]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/genromfs'
cc -O2 -Wall -c -o genromfs.o genromfs.c
cc -s genromfs.o -o genromfs
make[2]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/genromfs'
make[2]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/wav2adpcm'
cc -O2 -Wall -g -g wav2adpcm.c -o wav2adpcm
wav2adpcm.c: In function `deinterleave':
wav2adpcm.c:136: aviso: declaraci?n impl?cita de la funci?n `memcpy'
wav2adpcm.c: In function `wav2adpcm':
wav2adpcm.c:194: aviso: declaraci?n impl?cita de la funci?n `memcmp'
wav2adpcm.c: In function `main':
wav2adpcm.c:305: aviso: declaraci?n impl?cita de la funci?n `strcmp'
make[2]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/wav2adpcm'
make[2]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/vqenc'
cc -O2 -Wall -DINLINE=inline -c -o vqenc.o vqenc.c
vqenc.c: In function `create_downscaled_map':
vqenc.c:545: aviso: conversi?n de puntero a entero de tama?o diferente
cc -O2 -Wall -DINLINE=inline -c -o get_image.o get_image.c
cc -O2 -Wall -DINLINE=inline -c -o get_image_jpg.o get_image_jpg.c
cc -O2 -Wall -DINLINE=inline -c -o get_image_png.o get_image_png.c
cc -O2 -Wall -DINLINE=inline -c -o readpng.o readpng.c
cc -o vqenc vqenc.o get_image.o get_image_jpg.o get_image_png.o readpng.o -s -lpng -ljpeg -lz
make[2]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/vqenc'
make[2]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/gba-crcfix'cc -O2 -g -Wall -DINLINE=inline -c -o gba-crcfix.o gba-crcfix.c
cc -s -g gba-crcfix.o -o gba-crcfix
make[2]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/utils/gba-crcfix'
make[1]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/utils'
make[1]: Entering directory `/home/bender/dc/kos/kos-1.3.0/kos/libk++'
kos-c++ -c mem.cc -o mem.o
In file included from /usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/stdio.h:46,
from mem.cc:10:
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:285: error: declaraciones de 'typedef __uint32_t pthread_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:51: error: 'pthread_t' tiene una declaraci?n previa como `typedef struct kthread_t*pthread_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:285: error: la declaraci?n de `typedef __uint32_t pthread_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:51: error: causa conflictos con la declaraci?n previa `typedef struct kthread_t*pthread_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:285: error: la declaraci?n de `typedef __uint32_t pthread_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:51: error: causa conflictos con la declaraci?n previa `typedef struct kthread_t*pthread_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:316: error: declaraciones de 'typedef struct pthread_attr_t pthread_attr_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:38: error: 'pthread_attr_t' tiene una declaraci?n previa como `typedef struct pthread_attr_t pthread_attr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:316: error: la declaraci?n de `typedef struct pthread_attr_t pthread_attr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:38: error: causa conflictos con la declaraci?n previa `typedef struct pthread_attr_t pthread_attr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:316: error: la declaraci?n de `typedef struct pthread_attr_t pthread_attr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:38: error: causa conflictos con la declaraci?n previa `typedef struct pthread_attr_t pthread_attr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:316: error: la declaraci?n de `typedef struct pthread_attr_t pthread_attr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:38: error: causa conflictos con la declaraci?n previa `typedef struct pthread_attr_t pthread_attr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:337: error: declaraciones de 'typedef __uint32_t pthread_mutex_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:52: error: 'pthread_mutex_t' tiene una declaraci?n previa como `typedef struct mutex_t*pthread_mutex_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:337: error: la declaraci?n de `typedef __uint32_t pthread_mutex_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:52: error: causa conflictos con la declaraci?n previa `typedef struct mutex_t*pthread_mutex_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:337: error: la declaraci?n de `typedef __uint32_t pthread_mutex_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:52: error: causa conflictos con la declaraci?n previa `typedef struct mutex_t*pthread_mutex_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:349: error: declaraciones de 'typedef struct pthread_mutexattr_t pthread_mutexattr_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:30: error: 'pthread_mutexattr_t' tiene una declaraci?n previa como `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:349: error: la declaraci?n de `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:30: error: causa conflictos con la declaraci?n previa `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:349: error: la declaraci?n de `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:30: error: causa conflictos con la declaraci?n previa `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:349: error: la declaraci?n de `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:30: error: causa conflictos con la declaraci?n previa `typedef struct pthread_mutexattr_t pthread_mutexattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:353: error: declaraciones de 'typedef __uint32_t pthread_cond_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:53: error: 'pthread_cond_t' tiene una declaraci?n previa como `typedef struct condvar_t*pthread_cond_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:353: error: la declaraci?n de `typedef __uint32_t pthread_cond_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:53: error: causa conflictos con la declaraci?n previa `typedef struct condvar_t*pthread_cond_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:353: error: la declaraci?n de `typedef __uint32_t pthread_cond_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:53: error: causa conflictos con la declaraci?n previa `typedef struct condvar_t*pthread_cond_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:360: error: declaraciones de 'typedef struct pthread_condattr_t pthread_condattr_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:34: error: 'pthread_condattr_t' tiene una declaraci?n previa como `typedef struct pthread_condattr_t pthread_condattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:360: error: la declaraci?n de `typedef struct pthread_condattr_t pthread_condattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:34: error: causa conflictos con la declaraci?n previa `typedef struct pthread_condattr_t pthread_condattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:360: error: la declaraci?n de `typedef struct pthread_condattr_t pthread_condattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:34: error: causa conflictos con la declaraci?n previa `typedef struct pthread_condattr_t pthread_condattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:360: error: la declaraci?n de `typedef struct pthread_condattr_t pthread_condattr_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:34: error: causa conflictos con la declaraci?n previa `typedef struct pthread_condattr_t pthread_condattr_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:364: error: declaraciones de 'typedef __uint32_t pthread_key_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:47: error: 'pthread_key_t' tiene una declaraci?n previa como `typedef struct pthread_key_t pthread_key_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:364: error: la declaraci?n de `typedef __uint32_t pthread_key_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:47: error: causa conflictos con la declaraci?n previa `typedef struct pthread_key_t pthread_key_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:364: error: la declaraci?n de `typedef __uint32_t pthread_key_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:47: error: causa conflictos con la declaraci?n previa `typedef struct pthread_key_t pthread_key_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:369: error: declaraciones de 'typedef struct pthread_once_t pthread_once_t' en conflicto
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:43: error: 'pthread_once_t' tiene una declaraci?n previa como `typedef struct pthread_once_t pthread_once_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:369: error: la declaraci?n de `typedef struct pthread_once_t pthread_once_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:43: error: causa conflictos con la declaraci?n previa `typedef struct pthread_once_t pthread_once_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:369: error: la declaraci?n de `typedef struct pthread_once_t pthread_once_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:43: error: causa conflictos con la declaraci?n previa `typedef struct pthread_once_t pthread_once_t'
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/include/sys/types.h:369: error: la declaraci?n de `typedef struct pthread_once_t pthread_once_t'
/home/bender/dc/kos/kos-1.3.0/kos/include/sys/sched.h:43: error: causa conflictos con la declaraci?n previa `typedef struct pthread_once_t pthread_once_t'
make[1]: *** [mem.o] Error 1
make[1]: Leaving directory `/home/bender/dc/kos/kos-1.3.0/kos/libk++'
make: *** [all] Error 255
gcc version is 3.4.4, binutils 2.16.1, newlib 1.14.0. I have tried with gcc-3.4.5 and latest versions of kos svn (11 and 18 June). I don't know what is really the matter. There's people that has the toolchain running on amd64 but perhaps they did not try to compile the toolchain and are just using precompiled packages. I need to ask them a bit more
The KOS SVN Snapshots haven't been being packaged for a while. The version you have is severely outdated. (Granted, not that much has gone in there in the time period, but it would be a good idea to get a newer version).
I'm gonna guess that one of the patches didn't get applied correctly, and that's why all those errors are coming up.
are you using the kos patched version of newlib? and do you haved the symbolic links to kos withing your sh-elf toolchian directory? i think jim script creates them.
I compiled the gcc 3,4.2 toolchain that a lot of people are using and it works fine on my amd64 box, but it was compiled on a win2000 box, so unless there is an issue ith later gcc 3.4.X toolchians maybe? Another option is to make the toolchian single threaded so you dont run into pthread errors.
i got gcc 4.0.0 to compile but it didnt like most c++ code, and i had to massivly patch KOS to get it to work.
I posted in spanish, sorry . It says something like 'pthread_t' has been defined before as `typedef struct kthread_ t*pthread_t' .
I need to try a newer versions of kos. I have also removed the 'patch-kos' from Jim Ursetto's buildscript, is not possible to build the toolchain if it don't. Newlib version is the newest one but I downloaded it from Redhat's \ftp. Perhaps do I need a version from the kos one?
gcc is the 3.4.4.
I'll try later when I'm at home with a more updated version of kos . I could also try to build it setting up a chroot32 environment if I can't get this to work and see if there are any differences
The paths I think that are fine. The toolchain builds but after the 'source environ.sh' I get all those errors and are the same for all the sources, no matter if I'm compiling a kos example or a homebrew app
When I originally built my gcc 3.4.2 cygwin toolchain thats used on the DC DEV ISO. I was only using KOS svn revision ~165(i think that was the june snapshot), so I dont think KOS 1.3 version is the problem.
So is pretty sure that the problem is because I don't have the newlib patched. I can't seem to be able to download the patch, the link http://gamedev.allusion.net/softprj/kos ... -kos.patch does not work now.If someone can post it here...
bender wrote:So is pretty sure that the problem is because I don't have the newlib patched. I can't seem to be able to download the patch, the link http://gamedev.allusion.net/softprj/kos ... -kos.patch does not work now.If someone can post it here...
I have the environment working on my amd64. The problem was newlib 1.14.0 , after replacing it for 1.12.0, no problem Another thing, Jim Usetto's build script patches newlib, there's no need to download that patch , or is it a different one?
Another thing, kos compiled fine but some examples do no compile. I guess everything is right and this doesn't matter to much.
Last edited by bender on Tue Jan 24, 2006 12:01 pm, edited 1 time in total.
thanks. Seems that I have everything working now. When I try to compile a port, I get a bin2odc command not found, but this is just because that program is just not found. I'll look for it and try then
That's kinda an odd one. It looks like the file src/noiz2sa.o got compiled with a non-dreamcast compiler. Try doing a "make clean", and try "make" again.... That's the only thing I can think of.
darkstar noiz2sa # make
kos-c++ -c src/foe.cc -o src/foe.o
In file included from src/bulletml/boost/config.hpp:35,
from src/bulletml/boost/scoped_array.hpp:17,
from src/bulletml/boost/smart_ptr.hpp:18,
from src/bulletml/bulletmlrunner.h:14,
from src/barragemanager.h:17,
from src/foe.cc:12:
src/bulletml/boost/config/compiler/gcc.hpp:66:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results"
In file included from src/bulletml/boost/shared_ptr.hpp:27,
from src/bulletml/boost/smart_ptr.hpp:19,
from src/bulletml/bulletmlrunner.h:14,
from src/barragemanager.h:17,
from src/foe.cc:12:
src/bulletml/boost/detail/shared_count.hpp: In member function `virtual void* boost::detail::sp_counted_base_impl<P, D>::get_deleter(const std::type_info&)':
src/bulletml/boost/detail/shared_count.hpp:267: error: cannot use typeid with -fno-rtti
In file included from src/bulletml/boost/smart_ptr.hpp:19,
from src/bulletml/bulletmlrunner.h:14,
from src/barragemanager.h:17,
from src/foe.cc:12:
src/bulletml/boost/shared_ptr.hpp: In function `D* boost::get_deleter(const boost::shared_ptr<U>&)':
src/bulletml/boost/shared_ptr.hpp:420: error: cannot use typeid with -fno-rtti
src/foe.cc: In function `void initFoes()':
src/foe.cc:60: warning: unused variable 'j'
src/foe.cc: In function `void closeFoes()':
src/foe.cc:71: warning: unused variable 'j'
src/foe.cc: In function `Foe* addFoe(int, int, double, int, int, int, int, BulletMLParser*)':
src/foe.cc:91: warning: unused variable 'i'
src/foe.cc: In function `void drawFoes()':
src/foe.cc:335: warning: unused variable 'px'
src/foe.cc:335: warning: unused variable 'py'
Seems a problem related to the source code to me but I'm new to this and perhaps I'm wrong. Sorry for asking so much
thanks
Ok. Removed the flag -fno-rtti from the environ_base.sh (i didn't know that this file even existed, I really need to read the kos api ) . Now goes a bit further compiling. It says that it does not find the SDL_mixer.h and then crashes. This is because I need chui's sdl driver and to set the paths in the Makefile, right?