| View previous topic :: View next topic |
| Author |
Message |
MainframeOSX
Joined: 27 May 2004 Posts: 2
|
Posted: Thu May 27, 2004 4:00 am Post subject: pksh under MACOS X 10.3 |
|
|
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 |
|
| Back to top |
|
 |
ole
Joined: 08 May 2004 Posts: 92 Location: Czech Republic
|
Posted: Thu May 27, 2004 4:11 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
mharris
Joined: 25 Jan 2004 Posts: 155 Location: Annapolis, MD, USA
|
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu May 27, 2004 4:55 am Post subject: |
|
|
Unless you need pksh for something specific, there are other clients you could use. I hear ps2client is nice. :)
( http://www.oopo.net/consoledev ) |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Thu May 27, 2004 6:55 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
mharris
Joined: 25 Jan 2004 Posts: 155 Location: Annapolis, MD, USA
|
Posted: Thu May 27, 2004 7:18 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
calvin
Joined: 02 Apr 2004 Posts: 6 Location: Detroit, MI, USA
|
Posted: Wed Jun 02, 2004 12:26 am Post subject: |
|
|
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/downloads/mac/macosx.2.8-gcc331%2BIOP-EE-gcc323%2Bpksh.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. |
|
| Back to top |
|
 |
MainframeOSX
Joined: 27 May 2004 Posts: 2
|
Posted: Tue Jun 08, 2004 5:27 am Post subject: Thanx |
|
|
| Thanx to all where have give my an answers! It work's fine on MacOS X. |
|
| Back to top |
|
 |
blackdroid
Joined: 17 Jan 2004 Posts: 564 Location: Sweden
|
Posted: Tue Jun 08, 2004 6:57 pm Post subject: |
|
|
Ofcourse it works :) _________________ Kung VU |
|
| Back to top |
|
 |
|