Page 7 of 9

Posted: Tue Jun 03, 2014 2:42 pm
by onaryc
Hi,

New to the forum, i've tried to use gendev but after the first make command, i ve this error during the link :

Code: Select all

$ svn checkout http://gendev.googlecode.com/svn/trunk/ gendev-read-only 
$ cd gendev-read-only 
$ make 
...
/usr/bin/ld: architecture i386 du fichier d'entrée « ../lib/elf/aplib.a(depack.o) » est incompatible avec la sortie i386:x86-64
/usr/bin/ld: architecture i386 du fichier d'entrée « ../lib/elf/aplib.a(aplib.o) » est incompatible avec la sortie i386:x86-64
I'm on ubuntu 14.04 64bit (obviously).

Posted: Fri Jun 13, 2014 2:09 pm
by Grind
Hello everyone, first post!

Ran into a couple issues getting this running on Arch with GCC 4.9.0 (64bit). Here is what I did to get around them.

First issue is that binutils errors out on warnings. The line that runs the configure script needs --disable-werror added to it in makefile-gen (or makefile-gen.diff).

Code: Select all

cd $(build);  ../$(src_dir)/configure --target=$(target) --prefix=$(prefix) --without-headers --with-newlib --enable-languages=c --disable-libssp --disable-tls $(extra_configure_args) $(to_log) --disable-werror
Second was the same as onaryc's above post. I got around this by replacing the files in 32bit folders with the 64bit versions:

Replaced files in gendev/files/applib/src/32bit with contents of 64bit
Replaced files in gendev/files/applib/lib/elf with contents of elf64

That's a hack and not a fix but I don't know which script references these files.

One additional thing. The latest SGDK (r188 when I did it) doesn't work with that diff patch, so I hardcoded checkout of r176 (version mentioned in the diff) into the Makefile. Maybe whatever is in that diff is part of SGDK now and I could have just commented the patch command but I didn't look into it.

I've been playing with this setup for the past week and everything has been working pretty smoothly so far.

Posted: Fri Jun 27, 2014 10:02 pm
by kubilus1
Apologies for the long delay. I had an error in the detection for 64-bit compilers in the applib Makefile, which I have corrected. (Handy to actually have a 64-bit install to test this on!).

I've also hardcoded a revision of SGDK to compile against (r176), at least until I get the latest changes working.

I haven't got to testing this with GCC 4.9.0 yet, so haven't incorporated those changes yet.

Thanks for the feedback!!

Posted: Sat Jun 28, 2014 1:38 am
by Chilly Willy
I try not to use the first major version of gcc - too many bugs. So I'm using 4.8.3 instead of 4.9.0. One thing I noticed in recompiling my toolchain - nelib 2.1.0 updated all the different architectures to use ssize_t for the return for read/write. However, gcc for the m68k does NOT use that - it still uses int. So you need to edit libgloss/m68k/io_read.c and io_write.c and change the return types to int.

So my toolchain for SH2 and M68K is currently gcc 4.8.3, binutils 2.24, and newlib 2.1.0.

Posted: Sun Jul 06, 2014 4:19 am
by Boddah
Hi,

I've been trying to get this to work with the latest revision of SGDK (192) and I think I'm getting close but now I'm running into the following error that I just can't seem to get around:

Code: Select all

.....
.....
g++  -o out/rescomp out/src/snd_tools.o out/src/bin.o out/src/bitmap.o out/src/image.o out/src/img_tools.o out/src/libpng.o out/src/map.o out/src/palette.o out/src/pcm.o out/src/rescomp.o out/src/spr_tools.o out/src/sprite.o out/src/tfmmusic.o out/src/tile_tools.o out/src/tileset.o out/src/tools.o out/src/vgmmusic.o out/src/wav.o   -s 
make[1]: Leaving directory `/home/boddah/Coding/gendev-read-only/sgdk/sgdk-read-only/tools/rescomp'
cd sgdk-read-only && ln -sf ../files/Makefile.sgdk_lib .
cd sgdk-read-only && make -f Makefile.sgdk_lib 
make[1]: Entering directory `/home/boddah/Coding/gendev-read-only/sgdk/sgdk-read-only'
rescomp res/libres.res res/libres.s
rescomp v1.21

Resource: BITMAP logo_lib "image/logo_lib.png" 1
--> executing plugin BITMAP...
Executing appack c "pack.in" "pack1.out" -s
===============================================================================
aPLib example                   Copyright (c) 1998-2009 by Joergen Ibsen / Jibz
                                                            All Rights Reserved

                                                  http://www.ibsensoftware.com/
===============================================================================

syntax:

   compress    :  appack c <file> <packed_file>
   decompress  :  appack d <packed_file> <depacked_file>

make[1]: *** [res/libres.s] Segmentation fault
make[1]: *** Deleting file `res/libres.s'
make[1]: Leaving directory `/home/boddah/Coding/gendev-read-only/sgdk/sgdk-read-only'
make: *** [sgdk-read-only/libmd.a] Error 2
It seems like the -s parameter at the end of the appack c "pack.in" "pack1.out" -s command is causing the issue, but I can't figure out where or which Makefile this is being generated from. Or is this maybe something that rescomp is doing? The version of rescomp is newer than the one used in SGDK r176 that gendev uses by default.

If anyone has any ideas to point me in the right direction it would be much appreciated :)

Posted: Sun Jul 06, 2014 10:24 am
by Stef
SGDK uses a customized version of appack (-s switch is used for silent mode), sources are provided but so you need to recompile it for your system.

Posted: Tue Jul 08, 2014 8:12 am
by Boddah
Thanks for the reply. Yeah, I found the makefile to remove the -s but then got stuck compiling some of the vdp_xxx.c files because rescomp/appack were creating empty resource headers so figured there was a bit more to it. I think I'll leave it for now, the current gendev environment is working well anyway, so now time to start learning how to use it all properly :)

Posted: Mon Nov 17, 2014 11:38 am
by Moon-Watcher
Got this error:
wget http://home.wanadoo.nl/smastijn/sjasm39g6.zip
--2014-11-17 12:09:10-- http://home.wanadoo.nl/smastijn/sjasm39g6.zip
Resolviendo home.wanadoo.nl (home.wanadoo.nl)... 194.134.45.5
Conectando con home.wanadoo.nl (home.wanadoo.nl)[194.134.45.5]:80... conectado.
Petición HTTP enviada, esperando respuesta... 404 Not Found
2014-11-17 12:09:10 ERROR 404: Not Found.

make: *** [sjasm39g6.zip] Error 8

Posted: Mon Nov 17, 2014 6:35 pm
by Chilly Willy
Moon-Watcher wrote:Got this error:
wget http://home.wanadoo.nl/smastijn/sjasm39g6.zip
--2014-11-17 12:09:10-- http://home.wanadoo.nl/smastijn/sjasm39g6.zip
Resolviendo home.wanadoo.nl (home.wanadoo.nl)... 194.134.45.5
Conectando con home.wanadoo.nl (home.wanadoo.nl)[194.134.45.5]:80... conectado.
Petición HTTP enviada, esperando respuesta... 404 Not Found
2014-11-17 12:09:10 ERROR 404: Not Found.

make: *** [sjasm39g6.zip] Error 8
His web page moved. The new url is:

http://home.online.nl/smastijn/sjasm39g6.zip

Posted: Tue Nov 18, 2014 11:32 am
by Moon-Watcher
Now it works, thanks!

Posted: Tue Nov 18, 2014 6:16 pm
by kubilus1
I've updated the sjasm to the new location in the Makefile. Thanks for the heads up!

Posted: Tue Nov 18, 2014 7:06 pm
by Chilly Willy
kubilus1 wrote:I've updated the sjasm to the new location in the Makefile. Thanks for the heads up!
Since it uses a specific version of sjasm, it might be best to keep a copy of that version in the repo for downloading in case the site moves again. I couldn't find anything against that on the site - the program itself uses a BSD-like license and is freely distributed. It's not like you'd be stripping copyright notices or anything - it would be distributed in its original form.

The other thing to think about is whether or not to update. A newer version is available and presumably has bug fixes and new features.

Posted: Mon Nov 24, 2014 2:51 am
by kubilus1
I've taken the previous linux dev environment and tagged this at:

http://gendev.googlecode.com/svn/tags/linux_gendev_v1

I've also taken the latest SGDK and gotten it working I believe with the linux environment. It appears the appack version for linux won't support the -s flag so I had to patch rescomp, among other things. Let me know if there is any trouble!

So the trunk of the linux gendev should be fully up to date with SGDK v1 now!

Posted: Tue Nov 25, 2014 8:09 am
by Chilly Willy
Seems to have built all right. One thing... you might make separate makefiles for sudo vs no sudo. My /opt directory is fine for anyone to write, so I don't need sudo. Didn't realize it was building as root until it asked for a password. Had to chown everything when it was done.

Posted: Sun Nov 30, 2014 11:35 pm
by kubilus1
Hmm, building as root is not my intention. It's supposed to use sudo to create the /opt/toolchains/gen directory and chown it to be buildable by any user. I'll look at a better way of making that happen.

Since I already have that directory setup I never seem to hit that part of the Makefile anymore!