DCEmulation

dreamcast development • homebrew software • hardware hacking • indie games • emulators • and more!
Back to main site
It is currently Wed Oct 01, 2014 9:23 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 9:18 am 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
I have come to burden you all with more problems, sorry lol.


I'm trying to get a development environment in Linux working, and still being a noob at all this toolchain/gcc/makefile/repository crap that gets hidden away from me in Windows it's quite frustrating.

I'm following instructions from here:
http://gamedev.allusion.net/softprj/kos/svn.php

It's very well written, however I can't setup a repository because it says:
Website wrote:
Download the latest repository base revision and any incremental ones.

Browse to http://gamedev.allusion.net/svn/.
Grab the latest *_full.dump.bz2
Grab any subsequent *_incr.dump.bz2


However when I browse to http://gamedev.allusion.net/svn/ I get this:
link wrote:
An error has been encountered in accessing this page.

1. Server: gamedev.allusion.net
2. URL path: /svn/
3. Error notes: NONE
4. Error type: 403
5. Request method: GET
6. Request query string: NONE
7. Time: 2011-12-30 16:12:32 UTC (1325261552)


So my question is:
1- Is there any other URL I can visit to get these files?
2- What exactly is these files "*_full.dump.bz2" and "_incr.dump.bz2"?

Sorry if I'm sounding like a complete retard here :(

Thanks!


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 10:59 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
That page is extremely old and doesn't reflect the current state of things at all, unfortunately. Now that you pointed out that its still there like that, I'll go and get rid of it before anyone else gets confused. :wink:

Basically, what you need to do is to get KOS from the SVN:
Code:
svn co https://cadcdev.svn.sourceforge.net/svnroot/cadcdev cadcdev

Then from there, go into the directory where it got downloaded to, look in the kos/utils/dc-chain directory in there and you should find what you need to get things set up. The download.sh script will download the source to GCC, Binutils, and Newlib. The unpack.sh script will untar them. The Makefile can be used to build everything. Take a look at the top of the Makefile and adjust any settings as you see fit. Probably the only ones that you'll need to change are the sh_prefix and arm_prefix if you want to change the directory where things are installed. Once you've done that, it should be as simple as typing "make" to get the toolchain to build.

From there, you'll have to set up your environ script, which isn't particularly hard since KOS comes with an example that should be mostly right to start with. Then build KOS, and you're done.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 11:18 am 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
BlueCrab wrote:
That page is extremely old and doesn't reflect the current state of things at all, unfortunately. Now that you pointed out that its still there like that, I'll go and get rid of it before anyone else gets confused. :wink:

Haha, I had a feeling it was out of date but to what extent I didn't/don't know. :lol:

BlueCrab wrote:
Basically, what you need to do is to get KOS from the SVN:
Code:
svn co https://cadcdev.svn.sourceforge.net/svnroot/cadcdev cadcdev

Then from there, go into the directory where it got downloaded to, look in the kos/utils/dc-chain directory in there and you should find what you need to get things set up. The download.sh script will download the source to GCC, Binutils, and Newlib. The unpack.sh script will untar them. The Makefile can be used to build everything. Take a look at the top of the Makefile and adjust any settings as you see fit. Probably the only ones that you'll need to change are the sh_prefix and arm_prefix if you want to change the directory where things are installed. Once you've done that, it should be as simple as typing "make" to get the toolchain to build.

From there, you'll have to set up your environ script, which isn't particularly hard since KOS comes with an example that should be mostly right to start with. Then build KOS, and you're done.

I'll try this, thanks a bunch!
I'll post back if I have any more issues (let's hope not!) :grin:


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 11:20 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
N64VSNES wrote:
BlueCrab wrote:
That page is extremely old and doesn't reflect the current state of things at all, unfortunately. Now that you pointed out that its still there like that, I'll go and get rid of it before anyone else gets confused. :wink:

Haha, I had a feeling it was out of date but to what extent I didn't/don't know. :lol:
Yeah... Very old. Basically, I'm about the only person left that updates anything with regard to KOS, and I never really got a chance to actually go through and update the documentation on the website at all. At some point (prior to any new release) I intend to do it. When that will be, who knows.

N64VSNES wrote:
I'll try this, thanks a bunch!
I'll post back if I have any more issues (let's hope not!) :grin:
Good luck!


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 12:28 pm 
Offline
Psychotic DCEmu
Psychotic DCEmu

Joined: Mon Aug 11, 2008 7:34 am
Posts: 577
Location: Nowhere U.S.A.
I'm not trying to totally hijack the thread, but I need to set this up to compile DC KOS binaries.

BlueCrab wrote:
The download.sh script will download the source to GCC, Binutils, and Newlib.


Will manually installing the GCC package cause conflicts in my system? I'm so used to package managers doing the work, and even custom managers for compiling. AUR on Arch Linux...

Out of the three needed packages from the download script, I only have GCC installed.

Code:
# gcc --version
gcc (GCC) 4.6.2 20111125 (prerelease)
Copyright (C) 2011 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.


Do I need to setup a chroot environment to keep them seperate? I've only done that once about a year back, or so.

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 1:15 pm 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
Sorry to be a bother again.

the download.sh script outputs this:
script wrote:
nico@ubuntu:~/cadcdev/kos/utils/dc-chain$ sh download.sh
--2011-12-30 20:13:33-- ftp://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
=> `binutils-2.21.tar.bz2'
Resolving ftp.gnu.org... 140.186.70.20
Connecting to ftp.gnu.org|140.186.70.20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /gnu/binutils ... done.
==> SIZE binutils-2.21.tar.bz2 ... done.
==> PASV ... done. ==> RETR binutils-2.21.tar.bz2 ...
No such file `binutils-2.21.tar.bz2'.


This did fail, right?


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 1:50 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
N64VSNES wrote:
Sorry to be a bother again.

the download.sh script outputs this:
script wrote:
nico@ubuntu:~/cadcdev/kos/utils/dc-chain$ sh download.sh
--2011-12-30 20:13:33-- ftp://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2
=> `binutils-2.21.tar.bz2'
Resolving ftp.gnu.org... 140.186.70.20
Connecting to ftp.gnu.org|140.186.70.20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /gnu/binutils ... done.
==> SIZE binutils-2.21.tar.bz2 ... done.
==> PASV ... done. ==> RETR binutils-2.21.tar.bz2 ...
No such file `binutils-2.21.tar.bz2'.


This did fail, right?
Yes... Odd, I've never seen them take off an older release from the FTP. Regardless, change the references to binutils-2.21 to binutils-2.22 (in download.sh, unpack.sh, and Makefile -- look for the newlib_ver line in there) and you should be good to go.

Stryfe wrote:
I'm not trying to totally hijack the thread, but I need to set this up to compile DC KOS binaries.

BlueCrab wrote:
The download.sh script will download the source to GCC, Binutils, and Newlib.


Will manually installing the GCC package cause conflicts in my system? I'm so used to package managers doing the work, and even custom managers for compiling. AUR on Arch Linux...

Out of the three needed packages from the download script, I only have GCC installed.

Code:
# gcc --version
gcc (GCC) 4.6.2 20111125 (prerelease)
Copyright (C) 2011 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.


Do I need to setup a chroot environment to keep them seperate? I've only done that once about a year back, or so.
You need to build a sh-elf and arm-elf version of GCC, Binutils, and Newlib. The script won't touch your system ones and will install the Dreamcast-related stuff in a different directory from the system stuff anyway.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 2:02 pm 
Offline
Psychotic DCEmu
Psychotic DCEmu

Joined: Mon Aug 11, 2008 7:34 am
Posts: 577
Location: Nowhere U.S.A.
N64VSNES wrote:
This did fail, right?


It did for me, but all the script contains is wget commands.

I downloaded from here 'mirrors.usc.edu/pub/gnu/binutils'. I guess I could have opened the download.sh in a text editor, and changed the line to "wget -c mirrors.usc.edu/pub/gnu/binutils/binutils-2.21.tar.bz2 || exit 1". Everything seemed to compile properly for me. :|

BlueCrab wrote:
You need to build a sh-elf and arm-elf version of GCC, Binutils, and Newlib. The script won't touch your system ones and will install the Dreamcast-related stuff in a different directory from the system stuff anyway.


Oh, okay. Thank you.

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 2:33 pm 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
That worked great, thanks again!

EDIT:
I got past the last problem, but now another compile issue:
make wrote:
cp: accessing `/home/nico/toolchains/dc/sh-elf/sh-elf/include/sys': Not a directory


/home/nico/toolchains/ was a path I changed in the makefile, so it's installing to that correctly. It generated the sh-elf folders etc but there is no include folder after the it stops here.

I started from scratch 3 times, I'm guessing the issue is elsewhere :(


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 4:43 pm 
Offline
Psychotic DCEmu
Psychotic DCEmu

Joined: Mon Aug 11, 2008 7:34 am
Posts: 577
Location: Nowhere U.S.A.
Did you set the paths for where you wanted to install the toolchain in the "*/cadcdev/kos/utils/dc-chain/Makefile"?

As an example, I personally set mine to the following where $HOME would be "/user/USERNAME/", or "/root".
Code:
sh_prefix  := $HOME/Dreamcast/toolchains/dc/$(sh_target)
arm_prefix := $HOME/Dreamcast/toolchains/dc/$(arm_target)


In contradiction to the advice of almost every *nix user out there, I'm running my system as root (I'm the only user of this PC), but I'm betting the issues you are having are related to permissions. Did you create the install directory, and/or run the svn command, as a normal user? Was it initially created in a directory your normal user had permissions to?

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Fri Dec 30, 2011 4:54 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
No, the issue he's having now is that the script didn't exit when the error occurred during newlib's compilation. If you didn't actually FIX the issue with newlib's build, it was that you didn't have the makeinfo program installed. If you don't fix it, you'll likely never get that part working properly (you could also work around it by hacking up the Makefile, but that's a bit more work that I don't remember how to do off the top of my head right now).

I recommend removing the whole /home/nico/toolchains/dc directory and starting over (you should also clean out all of the intermediate directories that the dc-chain makefile made for building the tools), once you install the makeinfo program.

Most Linux distributions will have that in the "texinfo" package, apparently.

Since he's installing in his home directory, it is not likely to be a permissions issue.

Stryfe wrote:
In contradiction to the advice of almost every *nix user out there, I'm running my system as root (I'm the only user of this PC)
Even if you are the only user, you should never run as root for regular use. Not that me stating this will probably change your mind, but from a systems programmer's perspective, that is a REALLY bad idea. One flaw in any of the programs you run on a daily basis (and believe me, I'm sure there are plenty of them), and your system would be toast. Hell, one mistyped command and your system would be toast.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 10:33 am 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
Okay this is getting pretty frustrating now.

Every time I attempt this, it always uses binutils 2.21 instead of 2.22 (if that's worth noting seeing as it seems to be only me with this particular issue)

And I'm still stuck at this error:
Code:
+++ Fixing up sh4 newlib includes...
cp /home/nico/cadcdev/kos/utils/dc-chain/../../../kos/include/pthread.h /home/nico/toolchains/dc/sh-elf/sh-elf/include
cp /home/nico/cadcdev/kos/utils/dc-chain/../../../kos/include/sys/_pthread.h /home/nico/toolchains/dc/sh-elf/sh-elf/include/sys
cp: accessing `/home/nico/toolchains/dc/sh-elf/sh-elf/include/sys': Not a directory
make:


In sh-elf there is a FILE called include, but no directory. So I can see why it's giving this error but I don't know why it tries to access a folder it hasn't yet created.

I've installed texinfo package, ran things as root, made sure no permission issues are present etc. But I'm still getting stuck at this error.

Oh and I've wiped everything clean before restarting the build. Actually downloading a fresh copy from the SVN. So no original files remain when I restart the build.

Any thoughts? :?


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 11:15 am 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
N64VSNES wrote:
Okay this is getting pretty frustrating now.

Every time I attempt this, it always uses binutils 2.21 instead of 2.22 (if that's worth noting seeing as it seems to be only me with this particular issue)
Update KOS to the latest SVN revision. I've changed it in the SVN to use 2.22 now.

Quote:
And I'm still stuck at this error:
Code:
+++ Fixing up sh4 newlib includes...
cp /home/nico/cadcdev/kos/utils/dc-chain/../../../kos/include/pthread.h /home/nico/toolchains/dc/sh-elf/sh-elf/include
cp /home/nico/cadcdev/kos/utils/dc-chain/../../../kos/include/sys/_pthread.h /home/nico/toolchains/dc/sh-elf/sh-elf/include/sys
cp: accessing `/home/nico/toolchains/dc/sh-elf/sh-elf/include/sys': Not a directory
make:


In sh-elf there is a FILE called include, but no directory. So I can see why it's giving this error but I don't know why it tries to access a folder it hasn't yet created.

I've installed texinfo package, ran things as root, made sure no permission issues are present etc. But I'm still getting stuck at this error.

Oh and I've wiped everything clean before restarting the build. Actually downloading a fresh copy from the SVN. So no original files remain when I restart the build.

Any thoughts? :?
The problem is that Newlib still isn't building properly, so your problem is actually further up the log from what you've posted. If you're not getting the message about makeinfo anymore, I'm not sure what to suggest without seeing what the actual problem is that prevents Newlib from building.

If its still a problem with makeinfo, I have a way that you might be able to work around it... Namely, download and un-gzip the file I've attached to this post, run the download/unpack scripts as normal, then put the "missing" file that came out of the file you downloaded from this post in the newlib-1.18.0 directory, overwriting the existing "missing" file there. Hopefully then it'll work... I can't actually check on my machine, since I don't have the problem that you seem to have with makeinfo.


Attachments:
missing.gz [3.72 KiB]
Downloaded 68 times
Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 12:17 pm 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
First of all, thanks for all the help. I really appreciate your help BlueCrab.

I've tried the new file, and various other things (generally fiddling with the makefile etc).

But I still can't get past this error. Everything seems up to date (svn and whatnot).

I've flushed the output to a file.

EDIT:
Okay, seems I can't paste it here or upload the file. But here is the output from pastebin if it helps:
http://pastebin.com/CrWGd6Y3

I'm not sure what else I could try...


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 3:35 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
Aha! That shows the issue quite well, actually. The problem is that it didn't build sh-elf-gcc properly, because you were missing a dependency for GCC. Install GMP 4.2 or later, MPFR 2.3.1 or later, and MPC 0.8.0 or later from your system's package manager. Make sure to get the -devel packages too, if needed on your distribution.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 4:56 pm 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
BlueCrab wrote:
Aha! That shows the issue quite well, actually. The problem is that it didn't build sh-elf-gcc properly, because you were missing a dependency for GCC. Install GMP 4.2 or later, MPFR 2.3.1 or later, and MPC 0.8.0 or later from your system's package manager. Make sure to get the -devel packages too, if needed on your distribution.

Thanks BlueCrab, you wisdom truly knows no bounds I guess :lol:

I'll install those and have another try, what lines gave it away though? (for general education)


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 5:05 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
This part:
Code:
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.


Also, I just noticed in that log that it didn't actually install binutils either. It complained that it couldn't create the directory /opt/toolchains. You probably need to run make as root to make sure it works right, or give your regular user permission to write to /opt. Either that, or install it somewhere that you do have write permissions, like in your home directory as you were trying to do before.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 6:54 pm 
Offline
DC Developer
DC Developer

Joined: Tue Feb 11, 2003 3:12 pm
Posts: 882
Location: In a Dream
Hi, Bluecrab. I was just wondering about the dc-chain script failing due to missing dependencies during the configure phase. Would it be better to configure all the tools first and report the missing dependencies?

I've rebuilt the toolchain a couple of times after reinstalling linux and found myself restarting the process because GMP et al were not part of the default install.

_________________
behold the mind
inspired by Dreamcast


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 7:10 pm 
Offline
The Crabby Overlord
The Crabby Overlord
User avatar

Joined: Mon May 27, 2002 9:31 am
Posts: 4189
Honestly, my Makefile-fu isn't all that great to actually figure out how to fix it. Really, the problem is that it doesn't exit when there is an error, as a Makefile should... It doesn't actually exit unless a sub-call to make fails, which is what the main issue is.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Sat Dec 31, 2011 7:26 pm 
Offline
DC Developer
DC Developer

Joined: Thu Aug 20, 2009 9:00 am
Posts: 316
BlueCrab wrote:
That page is extremely old and doesn't reflect the current state of things at all, unfortunately. Now that you pointed out that its still there like that, I'll go and get rid of it before anyone else gets confused. :wink:

Basically, what you need to do is to get KOS from the SVN:
Code:
svn co https://cadcdev.svn.sourceforge.net/svnroot/cadcdev cadcdev



Um - when do you plan to add SD support to the "official" repo? Most of us can't use it until you do. I'm using the repo from emuforge as that has SD card support. I'm sure many others are as well. That also has Chui's Allegro port as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group