pksh under MACOS X 10.3

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
MainframeOSX
Posts: 2
Joined: Thu May 27, 2004 3:52 am

pksh under MACOS X 10.3

Post by MainframeOSX »

Need help to compile pksh under Mac OSX. The Dev-Tools are installed
and the readline.h and the other componets are in the include directory.
After i type make into my console it give me an error:

/usr/bin/gcc common.o pukklink.o pksh.o -o pksh -lreadline -lcurses -lncurses -L/usr/local/lib -I/usr/local/include -I/usr/include
ld: can't locate file for: -lreadline
make: *** [pksh] Error 1

What is wrong?

Need i the binary of readline?

Need answers!

Thanx
ole
Posts: 92
Joined: Sat May 08, 2004 11:14 pm
Location: Czech Republic

Post by ole »

Yes you need binary.
-lreadline means that the library called readline should be linked along with other objects. Find the library readline (or compile it) and edit the makefile. Insert the -Ldirectory/to/the/library just before -lreadline.
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

readline is a gnu package. If you need to rebuild it from source, the most recent tarball is at http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz but I do not know if any tweaks are needed for the ps2dev environment. The home page is at http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

There are probably ps2dev binaries around somewhere...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Unless you need pksh for something specific, there are other clients you could use. I hear ps2client is nice. :)

( http://www.oopo.net/consoledev )
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

ooPo: you are good at self promoting, I need to buy your book ;)

MainframeOSX: as ooPo has said you need to let the compiler know where libreadline.a is.usually it is installed in /usr/local/lib, atleast here on my powerbook. ( and that is in the -L path in the Makefile ).
Kung VU
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

mharris wrote:readline is a gnu package. If you need to rebuild it from source, the most recent tarball is at http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz but I do not know if any tweaks are needed for the ps2dev environment. The home page is at http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

There are probably ps2dev binaries around somewhere...
OK, so I'm brain-dead from lack of sleep; you need the lib for OSX, not ps2dev (erm, where's the keyboard...)

Like bd said, you should have it somewhere like /usr/local/lib -- try 'locate libreadline' at a shell prompt. It should find a .a file and some .so files. If they're not there, you'll need to build from source or get a binary package from somewhere.
calvin
Posts: 6
Joined: Fri Apr 02, 2004 4:00 am
Location: Detroit, MI, USA
Contact:

Post by calvin »

On OS X, you can also use the Fink pre-compiled packages.

http://fink.sourceforge.net/

They default to being in /sw/{lib,include}, so for the linking stage, you'd have "-L/sw/lib" as part of your command line along with the "-lreadline"
(translates to look in /sw/lib for libreadline.a).

This is what I did for the compiler chain I built back in October. (Taking a page from ooPo's self-promotion):

http://ps2dev.nextgened.com/ps2dev/down ... ksh.tar.gz

As you can guess from the name, my compile of pksh is in there as well.

However, I've since also included ps2client in my toolbox, and it is quite nice. I still bounce back and forth quite a bit, though. (For no particular reason - they both work and I use which ever comes to mind first. I have ps2client in several of my scripts though).

As soon as I get the SDL port done, I'll re-vamp the Macintosh tool line again to update it with the complete compiler, pksh, ps2client, PS2SDK, and SDL setup. Right now it only includes the compilers and pksh, IIRC.
MainframeOSX
Posts: 2
Joined: Thu May 27, 2004 3:52 am

Thanx

Post by MainframeOSX »

Thanx to all where have give my an answers! It work's fine on MacOS X.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Ofcourse it works :)
Kung VU
Post Reply