[libxml-devel] Build error: ld duplicate symbol error

Charlie Savage cfis at savagexi.com
Wed Nov 19 12:46:47 EST 2008


Hi Greg,

> I'm trying to build libxml-ruby-0.9.1 on Mac OS X 10.5.5 but am
> encountering a duplicate symbol error.  Specific error is:
> ld: duplicate symbol _INPUT_ATTR in ruby_xml_parser.o and ruby_xml_html_parser.o
> collect2: ld returned 1 exit status
> make: *** [libxml_ruby.bundle] Error 1

Hmm, ruby_xml_parser.c, ruby_xml_html_parser.c and ruby_xml_sax_parser 
all have thise code:

ID INPUT_ATTR;

I'm surprised that is causing an issue though since  the variable is 
only in the c files, and not header files at all.

> Output can be found here:
> http://pastie.org/318853
> 
> How can I get around this?  Thanks.

So can you do an experiment for me and modify the code.  Just put a 
static in front:

static ID INPUT_ATT

Do it for all three files, recompile, and let me know the results.  I 
assume you'll also have to do the same for:

ID CONTEXT_ATTR;

Thanks,

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20081119/79c3a959/attachment.bin>


More information about the libxml-devel mailing list