8<---When an executable is built with all its dependent dynamic shared
libraries, it is typically stripped with: % strip -u -r executablewhich saves all undefined symbols (usually defined in the dynamic shared libraries) and all global symbols defined in the executable ref- erenced by the dynamic libraries (as marked by the static link editor when the executable was built). This is the maximum level of striping for an executable that will still allow the program to run correctly
with its libraries. ---->8 On Feb 5, 2008, at 7:25 AM, Simon Burge wrote:
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 nvidirectly 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.unixYour 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.4onwards) as it removes undefined symbols from shared libraries. I gotbitten by this trying to install PostgreSQL using "install-strip", andended up with complaints about missing symbols when I tried toinitialise 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.phpI've confirmed that "strip -x" works for nvi as well. Does this meanthe correct fix is to use "-x" instead of "-s" in the _STRIPFLAG_INSTALLline 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.
-- William J. Coldwell (Cryo) Custodial Engineer Warped Communications, Inc. http://www.warped.com
Attachment:
PGP.sig
Description: PGP signature