error compiling, after building the toolchain

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.
bender
Mental DCEmu
Mental DCEmu
Posts: 399
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

error compiling, after building the toolchain

Post by bender »

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:

Code: Select all

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

thanks
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5661
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

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.
GPF
DC Developer
DC Developer
Posts: 529
Joined: Wed Oct 17, 2001 7:44 pm
Location: Texas
Has thanked: 0
Been thanked: 0
Contact:

Post by GPF »

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.

Troy(GPF)
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

I posted in spanish, sorry :oops: . 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

thanks 8)
GPF
DC Developer
DC Developer
Posts: 529
Joined: Wed Oct 17, 2001 7:44 pm
Location: Texas
Has thanked: 0
Been thanked: 0
Contact:

Post by GPF »

yes you need to patch newlib, or use the prepatched newlib from the KOS homepage http://gamedev.allusion.net/softprj/kos/newlib.php

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.

Troy(GPF)
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

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...

thanks ;-)

Edit: I have newlib 1.14.0 patched, the patch is also here: http://sourceforge.net/project/showfile ... p_id=23791
Now, time to compile again :-)
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY
Has thanked: 0
Been thanked: 0

Post by OneThirty8 »

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...

thanks ;-)

Edit: I have newlib 1.14.0 patched, the patch is also here: http://sourceforge.net/project/showfile ... p_id=23791
Now, time to compile again :-)
The files got moved here.
*edit* eh, nevermind. I read the first part of your post and didn't realize you found what you were looking for.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

bender wrote:Edit: I have newlib 1.14.0 patched, the patch is also here: http://sourceforge.net/project/showfile ... p_id=23791
Now, time to compile again :-)
That patch file contains a serious bug. I recommend you use this one instead: http://svn.allusion.net/svn/kos/kos/uti ... -kos.patch and recompile newlib.
"Nothing works" - Catweazle
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

thanks to all :D

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.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

bender wrote:Another thing, Jim Usetto's build script patches newlib, there's no need to download that patch , or is it a different one?
Well, the patch file of the build script is also broken. ;)
"Nothing works" - Catweazle
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

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 ;-)
GPF
DC Developer
DC Developer
Posts: 529
Joined: Wed Oct 17, 2001 7:44 pm
Location: Texas
Has thanked: 0
Been thanked: 0
Contact:

Post by GPF »

http://jm1200.ifrance.com/jm1200/

you can download the utility there, and/or the source code for it as well.

Troy(GPF)
http://gpf.dcemu.co.uk
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

thanks.
I've downloaded the util but seems that is for DOS. Does it compile in GNU/Linux? I'll try it later :)
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5661
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

If you need a bin2o for linux, there's one included in KallistiOS.

Its a shell script that does all that fun stuff for you, its in kos/utils/bin2o/
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

thanks. Just needed to change 1 line of the Makefile of noiz2sa, the example I'm trying to compile . :-)
This is what I'm getting now , lol

Code: Select all

darkstar noiz2sa # make
/usr/local/dc/sh-elf/bin/sh-elf-gcc -O2 -fomit-frame-pointer -ml -m4-single-only -fno-optimize-sibling-calls -I/usr/local/dc/kos-1.3.0/kos/../kos-ports/include -I/usr/local/dc/kos-1.3.0/kos/include -I/usr/local/dc/kos-1.3.0/kos/kernel/arch/dreamcast/include -I/usr/local/dc/kos-1.3.0/kos/addons/include -D_arch_dreamcast -D_arch_sub_pristine -Wall -g -fno-builtin -fno-strict-aliasing -I/usr/local/dc/kos-1.3.0/kos-ports/include/SDL -I/usr/local/dc/kos-1.3.0/kos-ports/zlib-1.2.1 -I/usr/local/dc/kos-1.3.0/kos-ports/libpng-1.2.5 -Isrc -Isrc/bulletml -DDREAMCAST -DDATA_PREFIX="/rd/" -DFILE_SEPARATOR="/" -DBOOST_NO_EXCEPTIONS -DSCREEN_DIVISOR=2  -ml -m4-single-only -Wl,-Ttext=0x8c010000 -nostartfiles -nostdlib -L/usr/local/dc/kos-1.3.0/kos/lib/dreamcast -L/usr/local/dc/kos-1.3.0/kos/addons/lib/dreamcast -o noiz2sa.elf /usr/local/dc/kos-1.3.0/kos/kernel/arch/dreamcast/kernel/startup.o \
src/noiz2sa.o src/ship.o src/shot.o src/frag.o src/bonus.o src/foe.o src/foecommand.o src/barragemanager.o src/attractmanager.o src/background.o src/letterrender.o src/screen.o src/clrtbl.o src/vector.o src/degutil.o src/rand.o src/soundmanager.o src/bulletml/bulletmlparser.o src/bulletml/bulletmlparser-tinyxml.o src/bulletml/bulletmlrunner.o src/bulletml/bulletmlrunnerimpl.o src/bulletml/bulletmltree.o src/bulletml/calc.o src/bulletml/formula-variables.o src/bulletml/tinyxml/tinyxml.o src/bulletml/tinyxml/tinyxmlerror.o src/bulletml/tinyxml/tinyxmlparser.o romdisk.o -lpng -lz -lSDL_mixer -lSDL_image -lSDL  -lm -lstdc++ -Wl,--start-group -lkallisti -lc -lgcc -Wl,--end-group
/usr/local/dc/sh-elf/lib/gcc/sh-elf/3.4.4/../../../../sh-elf/bin/ld: src/noiz2sa.o: Relocations in generic ELF (EM: 62)
src/noiz2sa.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [noiz2sa.elf] Error 1
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5661
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

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.
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

thanks, it was that. I compiled the linux version before.

Now I'm getting this:

Code: Select all

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 :-)
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5661
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

Well, as the error says, you can't use typeid with -fno-rtti. Remove it from your KOS_CPPFLAGS (or is it KOS_CXXFLAGS)....
bender
Mental DCEmu
Mental DCEmu
Posts: 399
Joined: Sun May 12, 2002 4:18 pm
Has thanked: 0
Been thanked: 0

Post by bender »

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 :oops: ) . 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?

thanks
GPF
DC Developer
DC Developer
Posts: 529
Joined: Wed Oct 17, 2001 7:44 pm
Location: Texas
Has thanked: 0
Been thanked: 0
Contact:

Post by GPF »

yes here is an example KOS_CFLAGS used in one of my latest releases.

Code: Select all

OPT= -O3 -fstrict-aliasing -fexpensive-optimizations -foptimize-register-move  -freduce-all-givs -frename-registers -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns -fno-sched-interblock -fsched-spec-load -fsingle-precision-constant -fstrength-reduce -fstrict-aliasing -ffast-math -fno-common  -fno-builtin -fno-exceptions -fargument-noalias-global -fomit-frame-pointer# -Wall -g  -ffreestanding

OPT2 = -O9 -fomit-frame-pointer -fno-ident -freorder-blocks -funsigned-char -funsigned-char -funroll-all-loops -frerun-loop-opt  -falign-loops -fstrict-aliasing

OPT3 = -Os -mbigtable -mnomacsave -fschedule-insns2 -fexpensive-optimizations -fomit-frame-pointer -fstrict-aliasing -ffast-math
OPT4 = -DFRAME_POINTER -g3 -O0 -fno-eliminate-unused-debug-types
#KOS_CFLAGS += $(INC) $(OPT2)

KOS_CFLAGS = $(INC) -ml -m4-single-only -D_arch_dreamcast -D_arch_sub_pristine  \
$(OPT4) \
-I$(KOS_BASE)/../../sh-elf/sh-elf/include -I$(KOS_BASE)/../kos-ports/include -I$(KOS_BASE)/include -I$(KOS_BASE)/kernel/arch/dreamcast/include -I$(KOS_BASE)/addons/include-I$(KOS_BASE)/include -I$(KOS_BASE)/addons/include -I$(KOS_BASE)/../kos-ports/include  -I$(KOS_BASE)/../kos-ports/include/zlib-1.2.3 -I$(KOS_BASE)/../kos-ports/include/libpng-1.2.8 -I$(KOS_BASE)/../kos-ports/SDL-1.2.9/include -I$(KOS_BASE)/../kos-ports/SDL_mixer-1.2.6/mikmod -I$(KOS_BASE)/../kos-ports/SDL_mixer-1.2.6 -I$(KOS_BASE)/../kos-ports/SDL_image-1.2.4 -I$(KOS_BASE)/../kos-ports/zlib-1.2.3 -I$(KOS_BASE)/../kos-ports/include/modplug
Post Reply