| View previous topic :: View next topic |
| Author |
Message |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Wed Jul 14, 2004 4:16 pm Post subject: Export Path?? I have no Idea how to set it up. Please help |
|
|
Hi,
I have Linux installed. I got the new toolchain.sh file in /root. I went to the terminal and typed "sh toolchian.sh" I'm always logged on as root. The files downloaded and everything went fine till i got to
"../configure: line 2209: cc: command not found"
*** The command 'cc -0 conftest -g conftest.c' failed.
I am new to linux and I know that this has to do with me setting the enviotnment variables wrong. I tried the export path, and this is what I can't configure correctly. I opened the file "toochain.sh" and I typed the exact thing that was in that file before I ran it.
export PS2DEV="/usr/local/ps2dev"
export PS2SDK="$PS2DEV/ps2sdk"
export CVSROOT=":pserver:anonymous@cvs.ps2dev.org:/home/ps2cvs"
export PATH="$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin"
I do not know how to set export path, if some one could explain it to me. I searched the forums and it said to put the export path in your profile. I am not sure how to do this. I'm new to this, and i want to set this up so i can code in c++. If someone can help, i'd appriciate it. thank you. I also went to /etc/ folder and opened the file "profile" and i added the code there at the bottom of the document, and that did not solve my problem. |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Wed Jul 14, 2004 8:30 pm Post subject: |
|
|
First of all it seems that you dont have a compiler installed on your linux box.
You need to fix that first.
Exporting a variable is easy, you have already done it, ie from the prompt
export VARIABLE=something
now all you need to do is add the specific variables to your .bash_profile in your home dir. _________________ Kung VU |
|
| Back to top |
|
 |
dnc
Joined: 27 May 2004 Posts: 7
|
Posted: Wed Jul 14, 2004 8:31 pm Post subject: |
|
|
It's not wise to use the root account for things other than configurations and applications installation.
You could build the toolchain with a normal user, better yet, you should do this as a normal user and only use root for the install phase (you only need root if you want to install somewhere on the system directory, and if you're using some packaged distribution, it's still not wise =), anyway your problem seems related to the missing cc not the command path.
If you need to modify the user profile, go in your home dir and modify the .profile or .bash_profile or .bash_rc (this if you use bash as shell, i think this is a fair guess), and remember, every time you make a change you need to relogin (the scripts are executed when logging)...
To summarize,
1st rule: use root the less you can (man group, man addgroup)
2st rule: don't mess with your system, put stuff in your home dir or in /usr/local (this way you don't break your rmp and dpkg) |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Jul 15, 2004 7:44 am Post subject: |
|
|
To summarize: if you are not logged in as root, you cannot do anything below the home directory level other than read and sometimes execute. The script needs to be able to write to the directory it's in.
I did nearly the same thing you did in setting up the PS2Dev software, but what I did after getting Linux installed the way I like was to make a src directory in my home directory. In that directory, I made a ps2dev directory and copied the script there. So the script was in
/home/jlfenton/src/ps2dev/
I have full rights to that directory, so the script was free to read/write/execute there. It then did it's thing just fine. Depending on your group rights, you might need to run the script in root mode for it to be able to make directories or write inside the /usr/local/ directory where the binary files and includes are installed when it reaches the "make install" part of the script. |
|
| Back to top |
|
 |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Thu Jul 15, 2004 8:16 am Post subject: K, it installed. |
|
|
I didn't realize that I needed the compiler installed. LOL. I went to system settings, and packages and installed the dev kit. Also I added a user. "adduser developer" then "passwd developer" and typed the password. I cut all the files from /root that i downloaded into /home/developer/ and then relogged back in with developer user. Then in terminal I typed "su" and the root password to give me administrator rights. Then "sh toolchain.sh" and it kept installing past my error. Yes!! I'm running on a 300mhz, so it took 3 hours to compile. There are also 3 patchets below the file toolchain.sh, how do I run those?
I'm not sure if I need to add the user to any group as DNC had mentioned to lookup "man group" up in linux. Everything is installed in /usr/local/. It looks as if everything installed and went OK.
Thankx blackdroid and dnc for the help, but I will probably come up on some problems soon. thankx again. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Jul 15, 2004 1:15 pm Post subject: |
|
|
3 hours?!?! Good Lord! I think my Opteron took a couple minutes to compile it. :D
Oh well, now that that's done, compiling the individual programs shouldn't be anywhere near as long. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jul 15, 2004 1:24 pm Post subject: |
|
|
| Don't feel bad. My main development machine takes a few hours to compile the toolchain, and I've done it a few times already. |
|
| Back to top |
|
 |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Thu Jul 15, 2004 3:52 pm Post subject: no profile file |
|
|
K, I do not have a Profile file in my home directory /home/developer/ There is no files there. Only the ones that toolchain downloaded. Do i just make my own?
I tried 2 compile the stars Demo. I extracted the files into a folder, and then went to the termianl and just went inside the folder and i typed "make" and this is the error I got.
"cc1: unrecognized option '-fnonnull-objects'
/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option '-mcpu=r5900'
make: *** [main.o] Error 1 |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Thu Jul 15, 2004 7:45 pm Post subject: Re: no profile file |
|
|
| underagedrinker wrote: | | K, I do not have a Profile file in my home directory /home/developer/ There is no files there. Only the ones that toolchain downloaded. Do i just make my own? |
/etc/profile <-- system wide profile file
~/.bashrc <--- user specific profile file (~/ is shorthand for /home/<currentusernamehere>/)
~/.bash_profile <--- user specific profile file, but only sourced by login shells
There is a slim chance I have .bashrc and .bash_profile mixed up. _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Thu Jul 15, 2004 7:47 pm Post subject: |
|
|
ls -la should show a bunch of .<filename> files
otherwise just create a .profile ( small letters ) with the export lines in it. _________________ Kung VU |
|
| Back to top |
|
 |
dnc
Joined: 27 May 2004 Posts: 7
|
Posted: Thu Jul 15, 2004 8:18 pm Post subject: Re: no profile file |
|
|
| Drakonite wrote: | | underagedrinker wrote: | | K, I do not have a Profile file in my home directory /home/developer/ There is no files there. Only the ones that toolchain downloaded. Do i just make my own? |
/etc/profile <-- system wide profile file
~/.bashrc <--- user specific profile file (~/ is shorthand for /home/<currentusernamehere>/)
~/.bash_profile <--- user specific profile file, but only sourced by login shells
There is a slim chance I have .bashrc and .bash_profile mixed up. |
FWIK, ~/.bash_profile is only executed by bash on login shell, .bashrc every time a bash is invoked, so you should be correct. =)
You can use echo to check your environment variables, for example "echo $PATH". |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Fri Jul 16, 2004 2:43 am Post subject: |
|
|
| ooPo wrote: | | Don't feel bad. My main development machine takes a few hours to compile the toolchain, and I've done it a few times already. |
http://ccache.samba.org/ |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Fri Jul 16, 2004 7:13 am Post subject: |
|
|
| Sounds like a nifty idea, but... caches are for flushing, aren't they? |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Fri Jul 16, 2004 7:52 am Post subject: |
|
|
| Yes, once you've sufficiently dirtied them. |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Fri Jul 16, 2004 8:36 am Post subject: Re: no profile file |
|
|
| underagedrinker wrote: |
I tried 2 compile the stars Demo. I extracted the files into a folder, and then went to the termianl and just went inside the folder and i typed "make" and this is the error I got.
"cc1: unrecognized option '-fnonnull-objects'
/usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option '-mcpu=r5900'
make: *** [main.o] Error 1 |
change -mcpu to -march, the Makefile for starsim is old. _________________ Kung VU |
|
| Back to top |
|
 |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Fri Jul 16, 2004 9:21 am Post subject: thx for the help |
|
|
"cc1: unrecognized option '-fnonnull-objects'
This error still comes up. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Fri Jul 16, 2004 9:32 am Post subject: |
|
|
| Have you tried removing it? |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Fri Jul 16, 2004 9:37 am Post subject: |
|
|
as I said, the Makefile for starsim is old and was made in the days of gcc-2.9 and alot of options from 2.9 to 3.x has changed or been removed completely, you just have to exercise your brain. _________________ Kung VU |
|
| Back to top |
|
 |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Mon Jul 19, 2004 12:25 pm Post subject: |
|
|
This is hard. I keep messing with the makefile, and i keep getting errors, and once I make one error disappear, another one shows up. Is there anyplace where they teach you to make the makefiles? I read the tutorial#1 on the tutorials section, but there isn't a lot about how to make the makefiles. I also googled, but it wasn't to direct.
The Demo that was included with it compiled correctly, and it worked when i loaded it on my ps2. I also tried to compile a couple of other sources, but it's just one error after another, but I will keep trying to get them to work. Also is there a good place to look up the error so that I can kind of fix it in the code. thx4dHelp. |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Tue Jul 20, 2004 2:52 am Post subject: |
|
|
| Both the manuals for GNU make and GNU GCC are online. GCC at least is at gcc.gnu.org, I'm not sure where make's home page is, but you can start at www.gnu.org. |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
|
| Back to top |
|
 |
underagedrinker
Joined: 04 Jul 2004 Posts: 6
|
Posted: Wed Jul 21, 2004 3:30 am Post subject: K, i know somewhat about the makefile now |
|
|
I took the tutorial2b, and i added paddle support for it, I had problems compiling. Later on I figured it out that in the makefile, the LIBS order was messed up. So i reordered it a couple of times, and it compiled fine. Now i'm trying to add CD support and i have to add like 6 libs so it can work. I do not know what the rule is for ordering it. Can somebody explain this to me, thx. These are the libs I need to add.
LIBS1 = $(PS2DEV)/ps2sdk/ee/lib/libpad.a
LIBS2 = $(PS2DEV)/ps2sdk/ee/lib/libkernel.a
LIBS3 = $(PS2DEV)/ps2sdk/ee/lib/libsyscall.a
LIBS4 = $(PS2DEV)/ee/ee/lib/libm.a
LIBS5 = $(PS2DEV)/ee/ee/lib/libc.a
LIBS6 = $(PS2DEV)/ee/lib/libcdvd.a
when i have it in this order, the least amount of error comes up. |
|
| Back to top |
|
 |
|