Newb Confusion

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Newb Confusion

Post by Thrett »

Thanks everyone for the help thus far. I now have the toolchain script running and have compiled the samples. I'm fairly unfamiliar with *nix , meaning I know a few commands, what the X window system is, have installed a few distros of linux, BSD, etc. but don't use *nix as an everyday platform and am totally new to this cygwin and compiling with gcc thing. Hence, the process has left me with a few questions I cannot seem to answer.

From http://wiki.pspdev.org/psp:programming_faq:
When it is done, you will have to add the following lines to your startup configuration:

## PSPDEV PATH SETTINGS
export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin"

Under Cygwin, this will be your ‘c:\cygwin\home\<username>\.bashrc’ file. You can edit it with a standard text editor and add those lines to the end of it.
1 - When I installed Cygwin (On WinXP SP2) I did not have a cygwin\home directory. I created it manually, which didn't seem to cause any problems, but made me uneasy. Is this normal? What may I have done wrong?

2 - I don't have a .bashrc file in my cygwin\home directory. There are bash.bashrc & .bashrc files in the \etc, \etc\skel, \etc\defaults\etc, & \etc\defaults\etc\skel directories. Did I screw something up? Miss a step or three?

3 - I'm dumb and can't figure out where the SDK documentation is, or even what to look for. I assume it's there....somewhere....but I'm just totally lost without a clue on this one. I checked the ps2dev site, and have looked for a sticky or something like that here on the forums. Could someone please point me in the right direction?

4 - Are the cygwin\home directories and the HOME environment variable spoken of at http://cygwin.com/faq.html supposed to be the same? Are they related? Am I way off base?

Okay, I think that about does it for now. Many thanks in advance. If I should be reading some basic how to not suck info on cygwin, gcc, etc. please let me know (and maybe point me to it, lol)

Tnx (^_^) v
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Re: Newb Confusion

Post by Agoln »

Thrett wrote: 1 - When I installed Cygwin (On WinXP SP2) I did not have a cygwin\home directory. I created it manually, which didn't seem to cause any problems, but made me uneasy. Is this normal? What may I have done wrong?
Did you ever start up cygwin? If you did, then your home directory is ~/. Usually located in /home/[username]. I never browse thru Explorer, I always use the command prompt.
Thrett wrote: 2 - I don't have a .bashrc file in my cygwin\home directory. There are bash.bashrc & .bashrc files in the \etc, \etc\skel, \etc\defaults\etc, & \etc\defaults\etc\skel directories. Did I screw something up? Miss a step or three?
You can create that file by doing a 'touch ~/.bashrc', then that will give you the file, and you can edit it. There is also a file called cygwin.bat right off of the cygwin directory, which I *believe* that you can add those to. Not sure about that file though.
Thrett wrote: 3 - I'm dumb and can't figure out where the SDK documentation is, or even what to look for. I assume it's there....somewhere....but I'm just totally lost without a clue on this one. I checked the ps2dev site, and have looked for a sticky or something like that here on the forums. Could someone please point me in the right direction?
do a 'make doxygen-doc' where you downloaded the SDK. it will created the docs in the [sdk source]/doc directory.
Thrett wrote: 4 - Are the cygwin\home directories and the HOME environment variable spoken of at http://cygwin.com/faq.html supposed to be the same? Are they related? Am I way off base?
I am beginning to think that it never set you up with an account... although I do no use cygwin that much, I believe that if you start it up, when you get to your prompt, do a 'pwd' and see what your directory is. It will be something like /home/[something] and that [something] is your home directory.
Lego of my Ago!
Chrighton
Posts: 58
Joined: Wed Jun 15, 2005 8:24 pm

Re: Newb Confusion

Post by Chrighton »

Thrett wrote:1 - When I installed Cygwin (On WinXP SP2) I did not have a cygwin\home directory. I created it manually, which didn't seem to cause any problems, but made me uneasy. Is this normal? What may I have done wrong?
It shouldn't matter the least, it's more of a convenient rule of thumb. You can add an environment path in windows itself or as Agoln says, directly in the cygwin.bat, before the part where it executes the bash shell.

Code: Select all

set path=%path%;c&#58;\<path to your toolchain>\bin;c&#58;\cygwin\bin;
should do just fine. You could add the other path(s) and stuff, but I personally haven't had a need to, most makefiles take care of the sdk paths and such - seems to have worked out for me thus far.
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Okay, got the whole home directory thing sorted out. Thanks for the help on that.

I tried "make doxygen-doc" from the PSPSDK folder and get "make: *** No rule to make target 'doxygen-doc'. Stop." Any suggestions?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

Thrett wrote:I tried "make doxygen-doc" from the PSPSDK folder
which folder? the /user/local/pspdev/psp/sdk? Because that's not the folder you want. You want the folder where you downloaded the SDK from.
Lego of my Ago!
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Yeah, I was trying it from /usr/local/pspdev/psp/sdk.

The folder I downloaded the SDK from? Having used the psptoolchain script, which folder would that be? The folder with toolchain.sh in it? ./devel or ./svn under that? Somewhere completely different?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

since you have svn, you can do a 'svn checkout svn://svn.pspdev.org/trunk/pspsdk' and that will checkout the sdk. Then in that folder, do a 'make doxygen-doc' and the docs will be in the 'doc' folder.
Lego of my Ago!
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Okay, I ran that and got a good old fashioned error:

Code: Select all

Clint@wsc-notebook ~
$ svn checkout svn&#58;//svn.pspdev.org/trunk/pspsdk
svn&#58; No repository found in 'svn&#58;//svn.pspdev.org/trunk/pspsdk'
=(

Is there a way to run "toolchain.sh -p" and have it save the downloaded files so that I can make the documentation from them?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

Heh, my bad, wrong url :)

it's svn://svn.pspdev.org/psp/trunk/pspsdk.

You can read the README that is with the toolchain, maybe it has some information on what to do to just download it.
Lego of my Ago!
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Hehe, the new url worked great.

However, running "make doxygen-doc" from the PSPSDK folder that was downloaded still results in:

make: *** No rule to make target `doxygen-doc'. Stop.

=(
boomint
Posts: 80
Joined: Tue Apr 13, 2004 2:21 am
Location: Sheffield, UK

Post by boomint »

have you run ./bootstrap after downloading?
--( someone stole my sig! )--
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

No, what does that do?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

sets stuff up. Do that in the directory that you checked out the information in.
Lego of my Ago!
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Code: Select all

Clint@wsc-notebook ~
$ cd pspsdk

Clint@wsc-notebook ~/pspsdk
$ ./bootstrap
.
/usr/share/aclocal/libsmi.m4&#58;8&#58; warning&#58; underquoted definition of AM_PATH_LIBSM
I
  run info '&#40;automake&#41;Extending aclocal'
  or see http&#58;//sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/share/aclocal/freetype2.m4&#58;7&#58; warning&#58; underquoted definition of AC_CHECK_F
T2
/usr/share/aclocal/cppunit.m4&#58;4&#58; warning&#58; underquoted definition of AM_PATH_CPPU
NIT
configure.ac&#58; installing `./install-sh'
configure.ac&#58; installing `./missing'
sdk/audio/Makefile.am&#58; installing `./depcomp'

Clint@wsc-notebook ~/pspsdk
$ make doxygen-doc
make&#58; *** No rule to make target `doxygen-doc'.  Stop.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

do a:

./configure
make
make doxygen-doc

(not sure if first make is necessary, but just do it any ways)

Read the README file that is in that directory. It should help.
Lego of my Ago!
Thrett
Posts: 14
Joined: Fri Aug 05, 2005 2:34 am

Post by Thrett »

Got the docs, thanks for the help. I'll just hit the README next time and save us all my ineptitude, lol. You guys rock

^_^ v

btw, can anyone recommend a good text viewer for files such as the README that comes with the pspsdk source from subversion? I installed emacs and have *kinda* figured it out, still a ways to go though.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

Thrett wrote:btw, can anyone recommend a good text viewer for files such as the README that comes with the pspsdk source from subversion? I installed emacs and have *kinda* figured it out, still a ways to go though.
Heh, I like your *kinda* figured it out. emacs is more powerful then you could imagine... Once you get more into emacs, you'll realize that it is much like it's own operating system :). emacs and vi(m) are the two biggest text editors in *nix. You can also open them in notepad. But if you find that you are getting little white boxes everwhere instead of line breaks, then you can do a:

Code: Select all

unix2dos &#91;filename&#93; > &#91;new filename&#93;
and that will convert the file from a unix file to a dos file (and similar make it go back with dos2unix). The reason of this is because in *nix, a new line is marked by a \n, while in windows, it is marked by a \r\n.
Lego of my Ago!
Post Reply