In XML::LibXML and XML::LibXSLT we share memory allocation code by simply copying the perl-mm.c files between the two projects (yes this is naive, but it works). This works fine on all OSes except Mac OSX, apparently, where it complains about multiple definitions.
So I tried making the memory allocation code external (this'll work no problem I thought to myself!). But it doesn't like that either because it can't find the code now. Gah!
So has anyone got any idea how I might fix this?
Re:That sounds like what I ran into yesterday
Matts on 2002-08-02T19:25:07
That sounds like it might work. I'll give it a try.Re:That sounds like what I ran into yesterday
sky on 2002-08-02T22:33:43
Not really wrong, however if you are porting alot of code that might not be possible, a good trick then is to disable -flat-namespaceRe:That sounds like what I ran into yesterday
pudge on 2002-08-03T03:23:18
Ahhh. Hm. But I wonder if I can even compile the rest of it without -flat-namespace, as my code is relying on Carbon's flat headers. Bah.
The symbol leaks over when LibXSLT.pm uses LibXML and it just magically works out.
Re:Kill, kill them all
Matts on 2002-08-03T09:07:00
That totally doesn't work for me - I get:
dyld:/usr/bin/perl Undefined symbols:
_PmmSvNode
Which is one of the functions.
(and yes, XML::LibXML is loaded before XML::LibXSLT is bootstrapped).Re:Kill, kill them all
richardc on 2002-08-03T11:39:05
Hmm, I guess this is probably that I'm building against a locally-built 5.8.0 rather than the supplied 5.6.0.Looking at the output of perl -V for both perls their linker flags do differ, which could explain it:
/usr/bin/perl (5.6.0)
Linker and Libraries: ld='cc', ldflags =''perl5.8.0
Linker and Libraries:
ld='cc', ldflags =' -flat_namespace'The Dynamic Linking linker options
lddlflagsall
are the same for both perls, so I suspect it's the differingldflags
that are letting it work for me.Re:Kill, kill them all
richardc on 2002-08-03T11:41:20
doh, hit save rather than preview. I mean lddlflags not lddlflagsall