Nedit on latest Mac OSX

Greg Edwards gedwards2 at gmail.com
Tue Feb 27 11:22:07 CET 2007


Jim,

Getting there. Have managed to build nedit, but not run. I installed
the xcode package off Install CD 1, which got me gcc and a pile of dev
stuff.

Downloaded Open Motif and Nedit src from same links as yours.

My mods to the makefile were:

# MOTIFDIR=/usr/local
MOTIFDIR=/Users/gedwards/Downloads/OpenMotif-2.2.3/openmotif-2.2.3-intel

as per your webpage, and

MAC_X11_INC=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include
MAC_X11_LIB=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib

CFLAGS=-O -no-cpp-precomp -mdynamic-no-pic -DNO_XMIM -I/usr/X11R6/include \
        -I${MOTIFDIR}/include -I${MAC_X11_INC} -DUSE_DIRENT
-DUSE_LPR_PRINT_CMD -DEDITRES
LIBS= ${EXTRALINKFLAGS}  ${MOTIFLINK} -L${MAC_X11_LIB} -lXp \
        -lXpm -lXext -lXt -lSM -lICE -lX11 -lXmu

My system didn't have /usr/X11R6/{include,lib} at all, but after
install of the xcode developer suite these were at
/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/{include,lib}

Had to drop the hardwired -L/usr/X11R6/lib as the linker complained if
the dir wasn't there. Later I added a symbolic link from
/usr/X11R6/lib to /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib so it
could remain in the link command, and any other stuff that expects it
would be happy

It builds ok but on execution I get:

~/Downloads/Nedit-5.5/nedit-5.5 $ source/nedit
dyld: Library not loaded: /usr/X11R6/lib/libXp.6.dylib
  Referenced from: /Users/gedwards/Downloads/Nedit-5.5/nedit-5.5/source/nedit
  Reason: no suitable image found.  Did find:
        /usr/X11R6/lib/libXp.6.dylib: can't map
Trace/BPT trap
~/Downloads/Nedit-5.5/nedit-5.5 $

Here's some info on the libs

~/Downloads/Nedit-5.5/nedit-5.5 $ file /usr/X11R6/lib/libXp.6.dylib
/usr/X11R6/lib/libXp.6.dylib: symbolic link to `libXp.6.2.dylib'
~/Downloads/Nedit-5.5/nedit-5.5 $ file /usr/X11R6/lib/libXp.6.2.dylib
/usr/X11R6/lib/libXp.6.2.dylib: Mach-O universal binary with 2 architectures
/usr/X11R6/lib/libXp.6.2.dylib (for architecture ppc):  Mach-O
dynamically linked shared library stub ppc
/usr/X11R6/lib/libXp.6.2.dylib (for architecture i386): Mach-O
dynamically linked shared library stub i386
~/Downloads/Nedit-5.5/nedit-5.5 $

cd /usr/X11R6/lib

/usr/X11R6/lib $ pwd
/usr/X11R6/lib
/usr/X11R6/lib $ ls -l libXp*
-rwxr-xr-x   1 root  wheel   19440 Sep 22 09:34 libXp.6.2.dylib
lrwxr-xr-x   1 root  wheel      15 Feb 27 20:12 libXp.6.dylib -> libXp.6.2.dylib
-rw-r--r--   1 root  wheel   88980 Sep 13 01:44 libXp.a
lrwxr-xr-x   1 root  wheel      15 Feb 27 20:12 libXp.dylib -> libXp.6.2.dylib
-rwxr-xr-x   1 root  wheel   25496 Sep 22 09:34 libXpm.4.11.dylib
lrwxr-xr-x   1 root  wheel      17 Feb 27 20:12 libXpm.4.dylib ->
libXpm.4.11.dylib
-rw-r--r--   1 root  wheel  183460 Sep 13 01:44 libXpm.a
lrwxr-xr-x   1 root  wheel      17 Feb 27 20:12 libXpm.dylib ->
libXpm.4.11.dylib
/usr/X11R6/lib $


I'm not an expert on Mac dynamic libs but on the surface it seems it
should be finding everything it wants. Too tired to carry on for
today, just thought I'd document where I'm at, as much for myself as
for anything, you know how these big build witchhunts get, dozens of
windows open and you lose track.

Any thoughts welcome, but I will carry on tomorrow.

Rgds,
Greg Edwards


On 27/02/07, Jim DeVona <jim.devona at gmail.com> wrote:
> On 2/27/07, Greg Edwards <gedwards2 at gmail.com> wrote:
>
> > Hi,
> >
> > Just bought me a new Intel MacBook and looking to get my favourite
> > editor back up. The Mac OSX Intel download unpacks and puts itself in
> > "nedit-5.5-Darwin-i386" ok, but running nc or nedit gives:
> >
> > dyld: Library not loaded: /usr/X11R6/lib/libXp.6.dylib
> >   Referenced from: /Users/gedwards/Downloads/Nedit/nedit-5.5-Darwin-i386/./nedit
> >   Reason: image not found
> > Trace/BPT trap
> >
> > So I started to think about building from source, which I've done fine
> > before, but my new Mac appears to have no compilers, not even a gcc
> > lurking down in Darwin somewhere.
>
> Hi Greg,
>
> It sounds like your Mac doesn't have the developer tools (or X11?)
> installed. I believe you should be able to install these from the
> system disc[s] that came with your machine; that will give you gcc and
> a host of other things. I suspect that once you've done that the
> binary version you downloaded should work.
>
> As far as I know, that binary is the one I built a few months ago (as
> described at http://anoved.net/nedit.html). That was done fairly soon
> after I acquired my own MacBook, so it was a fairly clean slate. Any
> dependencies in that build would presumably be resolved by installing
> all the "developer"/X11 goodies that came with your Mac, as that ought
> to recreate the same environment I had.
>
> Please let us know if that works. I don't specifically know about the
> library reported in your error message, but it makes me curious if it
> would have been possible to build NEdit without any such dependencies.
> In any case, you can see how I built at the page, and take it from
> there if necessary.
>
> Jim
> --
> NEdit Discuss mailing list - Discuss at nedit.org
> http://www.nedit.org/mailman/listinfo/discuss
>


-- 
Greg Edwards
land 9487 6171
mob 0400 102 774


More information about the Discuss mailing list