| View previous topic :: View next topic |
| Author |
Message |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Sat Mar 20, 2010 1:49 pm Post subject: Compiling on linux |
|
|
alright so i made my first c++ Hello world.
Now i have my makefile. | Code: |
TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
When i go in terminal and type "make"
i get this
| Code: | make: psp-config: Command not found
makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop. |
what can i do to fix this?
-------------edit 1-------------
Also heres my helloworld file
http://pastebin.com/3sysu2UT
and this is supposed to be a "main.c" right?
-------------edit 2-------------
this wouldnt be such an issue if programmers weren't so into windows. All tutorials that i find are always how to do it in windows and CYGWIN. Which is lame. So thats why this is such a problem.
Also, i have PSPSDK installed no worries.
-------------edit 3-------------
this is my dir for this file:
home/chikitory/psptoolchain/build/pspsdk/src/base/build.mak
i change it to this:
| Code: | TARGET = hello
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $ home/chikitory/psptoolchain/build/pspsdk/src/base/build.mak |
still doesnt work :( |
|
| Back to top |
|
 |
NoEffex
Joined: 27 Nov 2008 Posts: 108
|
Posted: Sat Mar 20, 2010 3:03 pm Post subject: |
|
|
The PSPSDK is intended for Linux (And the BSD's AFAIK..basically all but Windows/Dos-based stuff and MacOS)..
I don't think that your path is set.
Make sure that in your startup scripts you have like
export PSPDEV=/whatever/it/is
export PATH=$PATH:$PSPDEV/bin _________________ Programming with:
Geany + Latest PSPSDK from svn |
|
| Back to top |
|
 |
coyotebean
Joined: 05 Dec 2009 Posts: 26
|
Posted: Sat Mar 20, 2010 5:38 pm Post subject: |
|
|
1. PSPSDK could not be set because "psp-config" could not be executed to set the variable. You either missing "psp-config" or PATH is not set properly.
2. Do you mean "/home/..." , it's a big difference. _________________ GBASP x1, GBM x2, NDSL x2, PSP 100X x3, PSP 200X x5, PSP 300X x3, PSP Go x2, Wii x1 |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Sun Mar 21, 2010 2:31 pm Post subject: |
|
|
i tried /home/bla/bla/etc
ill keep you guys updated.
how do i edit my start up script? ill prob figure it out. but wont hurt to ask
------edit 1-------
is this what you mean?
Add the following lines at the end of file, save then close.
| Code: |
export PSPDEV=”/usr/local/pspdev”
export PSPSDK=”$PSPDEV/psp/sdk”
export PATH=”$PATH:$PSPDEV/bin:$PSPSDK/bin” |
if soo, it doesnt work :( |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Sun Mar 21, 2010 4:59 pm Post subject: |
|
|
alright so i looked over this:
http://ps2dev.org/psp/Tools/Toolchain/Installing_the_toolchain_on_Ubuntu
And noticed
source ~/.bashrc
Which when i did it, nothing happened. Meaning my bashrc isnt being installed (so to speak).
I googled the issue and found that source (script) isnt working on the new release of ubuntu (in my case mint). So my question is how do i get source (script) working? |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Sun Mar 21, 2010 5:26 pm Post subject: |
|
|
| Code: | > Does your .bash_profile contain something like:
>
> if [ -f ~/.bashrc ]; then
> . ~/.bashrc
> fi
> |
i already did this and added the same to .profile
Not working :( |
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Mon Mar 22, 2010 5:24 am Post subject: |
|
|
| Quote: | | Which when i did it, nothing happened. |
Standard POSIX procedure is not giving any message when process has been succesfully completed. Which means, if nothing happened, then it worked.
To be sure your paths are set, issue an echo $PSPDEV command, same for the other environment paths you're trying to use.
You might also check this noobish script for installing PSPSDK: http://advancedpsp.tk/foro_es/viewtopic.php?f=22&t=154
(I don't mean you're noob, but the script is a noobish one xD) _________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Mon Mar 22, 2010 8:35 am Post subject: |
|
|
This is the file that i use always I need to install the SDK, toolchain and libraries.
Just run all the commands in order (except for the comments with //)
Hope it is useful:
| Code: | sudo su
//PSPTOOLCHAIN:
apt-get install autoconf autogen automake1.9 bison gcc make libtool build-essential flex subversion libncurses5-dev patch texinfo wget build-essential autoconf automake bison flex libncurses5-dev doxygen libreadline5-dev libusb-dev texinfo libgmp3-dev libmpfr-dev subversion gcc-4.2 gcc-4.3 libtool
svn co svn://svn.ps2dev.org/psp/trunk
gedit ~/.bashrc
//Add these lines to the end
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
source ~/.bashrc
cd trunk/psptoolchain/
./toolchain-sudo.sh
echo 'export PATH="/usr/local/pspdev/bin:$PATH"' >> ~/.bash_profile
//PSPSDK:
cd ../pspsdk/
./bootstrap
./configure
make
make install
//LIBRERIAS:
apt-get install libtool
cd ../psplibraries/
./libraries-sudo.sh
|
|
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Mon Mar 22, 2010 8:51 am Post subject: |
|
|
It's basically the same as my script xD _________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Tue Mar 23, 2010 12:40 am Post subject: |
|
|
Haha thats probable.
It is just the same anyway you install it xD |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Fri Apr 02, 2010 8:18 am Post subject: |
|
|
i did everything you posted completely nothing missed.
and when i do "make" nothing works. :(
| Code: | make: psp-config: Command not found
makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop.
|
|
|
| Back to top |
|
 |
Alberto
Joined: 12 Feb 2007 Posts: 57 Location: Sofia
|
Posted: Sat Apr 03, 2010 5:08 am Post subject: |
|
|
| chi kitory wrote: |
(...)
| Code: | make: psp-config: Command not found
|
|
that's your _main_ issue: psp-cofig cannot be found int the path, hence the /lib/build.mak thing (which is supposed to be something like /usr/local/pspdev/.../lib/build.mak)
Look in your installation where psp-config is, and add its folder to the path (inside your ~/.bashrc maybe)
Once you can get this fixed you should have no further issues.
Just my 2c
Cheers, A. |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Sun Apr 04, 2010 1:52 pm Post subject: |
|
|
| any have skype? i can show you my desktop and you can tell me what to do. Cause im not able to figure this :( but im not giving up! |
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Sun Apr 04, 2010 11:50 pm Post subject: |
|
|
Really easy
just:
sudo make
The toolchain is installed under root, so only root can use it.
I don't know how to use it under not-root... sorry |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Tue Apr 06, 2010 5:01 am Post subject: |
|
|
chikitory@Chi-laptop ~/PSPCoding $ sudo make
make: psp-config: Command not found
makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop.
chikitory@Chi-laptop ~/PSPCoding $ make
make: psp-config: Command not found
makefile:12: /lib/build.mak: No such file or directory
make: *** No rule to make target `/lib/build.mak'. Stop.
Doesnt work both ways...
=================
carl0sgs
can you give me your make file? |
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Tue Apr 06, 2010 8:12 am Post subject: |
|
|
Here it is:
| Code: | TARGET = targetfilename
OBJS = main.o
LIBS =
LIBDIR =
BUILD_PRX = 1
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = HB name
PSPSDK=$(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
include $(PSPSDK)/lib/build.mak |
|
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Tue Apr 06, 2010 3:04 pm Post subject: |
|
|
arg notworking.. but still not giving up..
does it have to with this.
im adding this:
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
but when i look at the makefile
i see this:
PSPSDK=$(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
include $(PSPSDK)/lib/build.mak
should it be PSPDEV or PSPSDK?
are those giving me the issue? |
|
| Back to top |
|
 |
coyotebean
Joined: 05 Dec 2009 Posts: 26
|
Posted: Tue Apr 06, 2010 8:41 pm Post subject: |
|
|
chi kitory, how and where did you INSTALL PSPSDK? _________________ GBASP x1, GBM x2, NDSL x2, PSP 100X x3, PSP 200X x5, PSP 300X x3, PSP Go x2, Wii x1 |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Tue Apr 06, 2010 9:33 pm Post subject: |
|
|
how: carl0sgs's way
Where: Root... |
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Tue Apr 06, 2010 10:52 pm Post subject: |
|
|
Your problem is not on your Makefiles. You should in fact export both PSPDEV and PSPSDK:
| Code: | export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin |
_________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Wed Apr 07, 2010 12:05 am Post subject: |
|
|
| m0skit0 wrote: | Your problem is not on your Makefiles. You should in fact export both PSPDEV and PSPSDK:
| Code: | export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin |
|
| Code: | chikitory@Chi-laptop ~/PSPCoding $ sudo make
[sudo] password for chikitory:
make: psp-config: Command not found
make: psp-config: Command not found
make: psp-config: Command not found
psp-gcc -I. -I/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -L. -L/lib main.o -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o targetfilename
make: psp-gcc: Command not found
make: *** [targetfilename] Error 127
|
Now i get this. looks alot healthier right?[/code] |
|
| Back to top |
|
 |
carl0sgs
Joined: 10 Dec 2009 Posts: 41
|
Posted: Wed Apr 07, 2010 1:56 am Post subject: |
|
|
| I would download and install everything again. |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Thu Apr 08, 2010 7:18 am Post subject: |
|
|
| damn iit, i installed this like 5 times already. What do i need to do delete my linux and switch to windows to get dev undergoing? |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Thu Apr 08, 2010 7:43 am Post subject: |
|
|
Treat it as a test. If you can't diagnose and fix problems like this then it's going to be seriously tough going programming the PSP on any platform.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Apr 08, 2010 9:41 am Post subject: |
|
|
You need to set up your environment variables (those are the export lines) and run make without using sudo because sudo clears out the environment variables before it runs the command.
Try this:
| Code: | export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin
make |
|
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
Posted: Thu Apr 08, 2010 11:47 am Post subject: |
|
|
Jim im not a idiot. I know Java and Lua like i know how to speak english or korean. Im new to linux, theres a big between Linux and programming...
| Code: | chikitory@Chi-laptop ~/PSPCoding $ make
make: *** /usr/local/pspdev/psp/sdk: Is a directory. Stop. |
is what i get now.
----------
i am doing this:
http://advancedpsp.tk/foro_es/viewtopic.php?f=22&t=154
should have done it from the start ill tell you what happens after wards.
even if nothing happens. im not giving up! |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Apr 08, 2010 1:07 pm Post subject: |
|
|
| It sounds like you've possibly introduced some errors into the makefile. Can you get a fresh copy of what you're trying to compile? |
|
| Back to top |
|
 |
coyotebean
Joined: 05 Dec 2009 Posts: 26
|
Posted: Thu Apr 08, 2010 3:25 pm Post subject: |
|
|
You PSPSDK is not properly installed or environment variables are not properly set.
If you do not get a proper response to command like "psp-gcc", "psp-config" in the prompt, "make" will never work.
"PSPDEV" points to the directory of the development tools. you should see many "psp-xxx" files in the "bin" sub-directory. This "bin" directory should be in your "PATH".
"PSPSDK" points to the sdk libraries. You should see many "pspxxx.h" in the "include" sub-directory, "build.mak" & "build_prx.mak" in the "lib" directory.
Also linux is case-sensitive. "PSPSDK" and "pspsdk" are different in linux. _________________ GBASP x1, GBM x2, NDSL x2, PSP 100X x3, PSP 200X x5, PSP 300X x3, PSP Go x2, Wii x1 |
|
| Back to top |
|
 |
chi kitory
Joined: 17 Mar 2010 Posts: 28
|
|
| Back to top |
|
 |
m0skit0
Joined: 02 Jun 2009 Posts: 226
|
Posted: Fri Apr 09, 2010 10:22 am Post subject: |
|
|
And the Makefile, please? _________________
| The Incredible Bill Gates wrote: | | The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers. |
|
|
| Back to top |
|
 |
|