On Sun, Nov 28, 2004 at 01:33:08AM -0500, William Coleda wrote: > 3) cd compilers/pge && make fails: > > c++ -dynamiclib -L/usr/local/lib -flat_namespace -o pge.dylib pge_parse.o > pge_gen.o pge_opt.o pge_parsep5.o pge_parseglob.o > ld: multiple definitions of symbol _pge_cmeta > pge_parse.o definition of _pge_cmeta in section (__DATA,__common) > pge_parseglob.o definition of _pge_cmeta in section (__DATA,__common) > ld: multiple definitions of symbol _pge_ctype > pge_parse.o definition of _pge_ctype in section (__DATA,__common) > pge_parseglob.o definition of _pge_ctype in section (__DATA,__common) > /usr/bin/libtool: internal link edit command failed > make: *** [pge.dylib] Error 1 > > This is on OS X: > > Darwin oolong 7.6.0 Darwin Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT > 2004; root:xnu/xnu-517.9.4.obj~1/RELEASE_PPC Power Macintosh powerpc > > It did work for a little while.
The appended patch makes it compile and pass tests. The change which caused the problem appears to be this one, which added pge_parseglob.c: http://www.nntp.perl.org/group/perl.cvs.parrot/7849 I infer that dylib is not as forgiving of multiply defined symbols as ELF. Nicholas Clark diff -d -u -r1.1 pge_parseglob.c --- compilers/pge/pge_parseglob.c 22 Nov 2004 19:55:49 -0000 1.1 +++ compilers/pge/pge_parseglob.c 28 Nov 2004 13:43:40 -0000 @@ -24,10 +24,6 @@ #include <stdlib.h> #include <string.h> -int pge_ctype[256]; -int pge_cmeta[256]; - - /* Build a regular expression tree from the glob string given by s. */ static PGE_Exp* pge_parseglob(const unsigned char* s)