difficulty with psptoolchain on osx

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

Moderators: cheriff, TyRaNiD

Post Reply
neonstalwart
Posts: 3
Joined: Mon Feb 26, 2007 10:48 am
Location: nashville, tn

difficulty with psptoolchain on osx

Post by neonstalwart »

i have followed the instructions to install the psptoolchain on osx as listed in http://forums.ps2dev.org/viewtopic.php?t=5391 and i had the same problems listed on that page. after searching the forums i changed ./toolchain.sh to use the -r option when making the buildutils as pointed out in http://forums.ps2dev.org/viewtopic.php?t=2792. perhaps this hint should be included in the HOWTO: Compile the SDK on OSX - Consolidated Info.

my next problem is this: amongst all the output/warnings/errors from running ./toolchain.sh i'm still not sure i have completely installed the psptoolchain properly. anything i try to make always seems to give me errors.

here is the specific output when i try to make pcterm (part of the pclink package downloaded from svn://svn.ps2dev.org/psp/trunk/psplink)

Code: Select all

cc -Wall -g -DSERIAL_SUPPORT   -c -o pcterm.o pcterm.c
pcterm.c: In function 'execute_line':
pcterm.c:112: warning: implicit declaration of function 'strlen'
pcterm.c:112: warning: incompatible implicit declaration of built-in function 'strlen'
pcterm.c: In function 'cli_handler':
pcterm.c:141: warning: implicit declaration of function 'strcmp'
pcterm.c:150: warning: passing argument 2 of 'rl_callback_handler_install' from incompatible pointer type
pcterm.c:155: warning: implicit declaration of function 'strncmp'
pcterm.c:171: warning: passing argument 2 of 'rl_callback_handler_install' from incompatible pointer type
pcterm.c: In function 'init_readline':
pcterm.c:235: warning: implicit declaration of function 'META'
pcterm.c:238: warning: passing argument 2 of 'rl_callback_handler_install' from incompatible pointer type
pcterm.c: In function 'parse_args':
pcterm.c:273: warning: implicit declaration of function 'memset'
pcterm.c:273: warning: incompatible implicit declaration of built-in function 'memset'
pcterm.c: In function 'read_socket':
pcterm.c:426: warning: implicit declaration of function 'strchr'
pcterm.c:426: warning: incompatible implicit declaration of built-in function 'strchr'
pcterm.c:435: warning: implicit declaration of function 'strcpy'
pcterm.c:435: warning: incompatible implicit declaration of built-in function 'strcpy'
pcterm.c:442: warning: incompatible implicit declaration of built-in function 'strcpy'
pcterm.c:443: warning: incompatible implicit declaration of built-in function 'strlen'
pcterm.c:451: warning: incompatible implicit declaration of built-in function 'strchr'
pcterm.c:456: warning: incompatible implicit declaration of built-in function 'strcpy'
pcterm.c:462: warning: implicit declaration of function 'strncat'
pcterm.c:462: warning: incompatible implicit declaration of built-in function 'strncat'
pcterm.c:464: warning: incompatible implicit declaration of built-in function 'strlen'
pcterm.c:473: warning: incompatible implicit declaration of built-in function 'strlen'
pcterm.c:480: warning: passing argument 2 of 'rl_callback_handler_install' from incompatible pointer type
pcterm.c: In function 'main':
pcterm.c:732: warning: incompatible implicit declaration of built-in function 'memset'
pcterm.c:743: warning: implicit declaration of function 'strerror'
pcterm.c:743: warning: format '%s' expects type 'char *', but argument 4 has type 'int'
gcc -o pcterm pcterm.o -lreadline -lcurses
/usr/bin/ld: Undefined symbols:
_META
_emacs_standard_keymap
_rl_bind_key_in_map
collect2: ld returned 1 exit status
make: *** [pcterm] Error 1
what have i done wrong? am i using the wrong compiler? could my environment be wrong? is my toolchain not setup properly?

any help would be appreciated.

thanks.
jait
Posts: 2
Joined: Mon Oct 23, 2006 11:41 pm

Post by jait »

To fix that problem, grap readline from ftp://ftp.gnu.org/gnu/readline, compile and install. You'll then next run into a problem with curses. I haven't done it, but the curses with Fink might work for you. The libcurses default with the system (at least on 10.4.8) doesn't work.

Let me know if you find anything else out.
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

pcterm is a part of USBhostfs if i'm right?

this is for PSPlink not for the toolchain

Pcterm doesnt compile on OS X without readline libraries however it is recommended that you use telnet instead if you plan on even bothering with Psplink

example

compile USBhostfs or find tinman's usbhostfs and throw it in /usr/local/bin

run the usbhostfs script by typing sudo usbhostfs -g in the directory you want the program to execute in.

install PSPlink onto your PSP into PSP/game

use telnet to execute the next set of commands in a second window

telnet localhost 10000 works :)

good luck
neonstalwart
Posts: 3
Joined: Mon Feb 26, 2007 10:48 am
Location: nashville, tn

Post by neonstalwart »

Wally: yes i'm trying to compile a program that is not part of the toolchain but i was concerned that the toolchain had not been installed properly since i couldn't compile this properly. my main concern is not about pcterm specifically but thanks for the tip with telnet - it works. i run psplink on the psp and then i telnet (wirelessly - without the usbhostfs) to the psp's IP on port 10000.

jait: your reply was helpful too. after getting readline it removed a lot of the errors and now i need to work through the issue with curses.

however, it seems that i have probably installed the toolchain properly. i am successfully up to lesson 4 at http://www.psp-programming.com/tutorials/

thanks for your help.
Post Reply