Sudo make install pspsdk problem

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

Moderators: cheriff, TyRaNiD

Post Reply
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Sudo make install pspsdk problem

Post by someone »

When I do sudo make install I get this output: (it's translated)

Making install in src
make[1]: enter to directory `/home/user/pspsdk/src'
Making install in asfparser
make[2]: enter to directory `/home/user/pspsdk/src/asfparser'
make[3]: enter to directory `/home/user/pspsdk/src/asfparser'
test -z "/usr/local/pspdev/psp/sdk/lib" || /bin/mkdir -p "/usr/local/pspdev/psp/sdk/lib"
/usr/bin/install -c -m 644 libpspasfparser.a '/usr/local/pspdev/psp/sdk/lib'
( cd '/usr/local/pspdev/psp/sdk/lib' && psp-ranlib libpspasfparser.a )
/bin/bash: line 5: psp-ranlib: command not found
make[3]: *** [install-libLIBRARIES] Error 127
make[3]: quit from directory `/home/user/pspsdk/src/asfparser'
make[2]: *** [install-am] Error 2
make[2]: quit from directory `/home/user/pspsdk/src/asfparser'
make[1]: *** [install-recursive] Error 1
make[1]: quit from directory `/home/user/pspsdk/src'
make: *** [install-recursive] Error 1
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Post by someone »

Before installing pspsdk I installed psptoolchain without problems. I used the lasts svn versions of both.
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

First isntall the psptoolchain. If it runs without any probles you have the pspsdk.

Did you add the directories in your PATH?

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Post by someone »

Yes
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

If you don't have the file "psp-ranlib" anywhere on your system, the toolchain was not built or installed properly. If you do have "psp-ranlib", then your PATH is not set up correctly to point to it.
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Post by someone »

In ~/.bashrc at the end of file I have:

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

psp-ranlib is in /usr/local/pspdev/bin and libpspasfparser.a in /usr/local/pspdev/psp/sdk/lib
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

sudo doesn't keep your user environment variables though unless you tell it to
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Yeah, thanks for noticing that jsharrad. sudo will clear the PATH and other variables. Try something like:

Code: Select all

sudo env "PATH=$PATH" make install
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Using 'sudo -E' will preserve environment variables.
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Post by someone »

With sudo env "PATH=$PATH" make install it worked please change it in the readme :)
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

ooPo wrote:Using 'sudo -E' will preserve environment variables.
Ubuntu versions prior to Karmic were compiled with SECURE_PATH which overrides the PATH even with -E. On Karmic I think that's fixed, but /etc/sudoers still contains env_reset by default which disables -E. So it's not quite that easy -- the env trick is a more sure-fire way to get it through.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Ahh. I just did a quick test with $PS2DEV, but the path is the important part. :)
Mon Ouïe
Posts: 36
Joined: Sun Jul 05, 2009 10:22 pm

Post by Mon Ouïe »

You could also put your export in the /etc/profile.

According to man sudo, -E work even when there is an env_reset in sudoers :
The -E (preserve environment) option will override the env_reset option in sudoers(5)). It is only available when either the matching command has the SETENV tag or the setenv option is set in sudoers(5)
Anyway, nothing forces you to use sudo instead of su.
Post Reply