Export Path?? I have no Idea how to set it up. Please help
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
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:[email protected]:/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.
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:[email protected]:/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.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
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.
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
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)
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)
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.
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.
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
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.
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.
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
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
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
Re: no profile file
/etc/profile <-- system wide profile fileunderagedrinker 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?
~/.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
Makeshift Development
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Re: no profile file
FWIK, ~/.bash_profile is only executed by bash on login shell, .bashrc every time a bash is invoked, so you should be correct. =)Drakonite wrote:/etc/profile <-- system wide profile fileunderagedrinker 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?
~/.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.
You can use echo to check your environment variables, for example "echo $PATH".
http://ccache.samba.org/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.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
Re: no profile file
change -mcpu to -march, the Makefile for starsim is old.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
Kung VU
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
thx for the help
"cc1: unrecognized option '-fnonnull-objects'
This error still comes up.
This error still comes up.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
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.
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.
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.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
ive found this documentation to be of good use in the past, http://www.student.cs.uwaterloo.ca/~isg ... e_toc.html
I know it says gmake 3.70, it still is applicable anyway.
I know it says gmake 3.70, it still is applicable anyway.
Kung VU
-
- Posts: 6
- Joined: Sun Jul 04, 2004 12:25 am
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.
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.