tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: nvi on MacOS
Chris Wareham wrote:
> Simon Burge said on 5/2/08 02:32:
> > With editors/nvi (from pkgsrc-2007Q4) on MacOS 10.5.1 I get the
> > following:
> >
> > mini:pkgsrc/editors/nvi 83% nvi
> > dyld: Symbol not found: ___global_list
> > Referenced from: /Volumes/NetBSD/pkg/lib/libvi.0.dylib
> > Expected in: flat namespace
> >
> > Trace/BPT trap
> > Exit 133
> >
> > If I remove the strip option from the install command (or run nvi
> > directly from the work directory), nvi then appears to work normally.
> >
> > Is the following an acceptable patch to fix this?
> >
> > Cheers,
> > Simon.
> > --
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvsroot/pkgsrc/editors/nvi/Makefile,v
> > retrieving revision 1.26
> > diff -d -p -u -r1.26 Makefile
> > --- Makefile 3 Nov 2007 13:23:53 -0000 1.26
> > +++ Makefile 5 Feb 2008 02:27:56 -0000
> > @@ -27,6 +27,7 @@ CONFIGURE_ENV+= vi_cv_include_sys_selec
> > .elif ${OPSYS} == "Darwin"
> > CONFIGURE_ENV+= vi_cv_sys5_pty=no
> > LDFLAGS+= -flat_namespace
> > +INSTALL_UNSTRIPPED= yes
> > .endif
> >
> > WRKSRC= ${WRKDIR}/${DISTNAME}/build.unix
> >
>
> Your problem with nvi sounds very similar to one I encountered yesterday
> with PostgreSQL 8.3. Strip is dangerous on Mac OS X (at least from 10.4
> onwards) as it removes undefined symbols from shared libraries. I got
> bitten by this trying to install PostgreSQL using "install-strip", and
> ended up with complaints about missing symbols when I tried to
> initialise the database. The details of the problem can be found here,
> along with a possible solution:
>
> http://archives.postgresql.org/pgsql-hackers/2007-10/msg01470.php
I've confirmed that "strip -x" works for nvi as well. Does this mean
the correct fix is to use "-x" instead of "-s" in the _STRIPFLAG_INSTALL
line in mk/platform/Darwin.mk? Or even to never strip on MacOS?
Sizewise there's not much difference between unstripped, -s and -x:
-rwxr-xr-x 1 simonb staff 34528 Feb 5 10:50 nvi*
-rwxr-xr-x 1 simonb wheel 33060 Feb 5 13:28 nvis*
-rwxr-xr-x 1 simonb wheel 33980 Feb 5 21:41 nvix*
but it looks like a good chunk of the code ended up in some funny
"dylib" file in .../pkg/lib.
Cheers,
Simon.
Home |
Main Index |
Thread Index |
Old Index