I tried to install libxml2 yesterday for a Ruby side project of mine.
First I tried it with MacPorts but my MacPorts wouldn't work so I tried to download the source for libxml2 and "make" the install which ran with some errors but nothing that stopped the install.
That still didn't work for my Ruby coding (was trying to use the nokogiri library) so I got MacPorts working and installed libxml2 via that which eventually worked fine.
After that I went back to my MonoTouch iPhone development and noticed that MonoTouch would no longer work.
Now I don't actually get any error and am working with the MonoTouch people to figure that out, but if I try to use Interface Builder in OS X it errors when I try to create a new .xib file with this message (pastbin link).
The most important part of the message is this:
• Thread 0 Crashed: Dispatch queue: com.apple.main-thread
• 0 libxml2.2.dylib 0x00000001004f9b88 __xmlRaiseError + 888 (error.c:614)
• 1 libxml2.2.dylib 0x00000001004fa5b7 xmlErrEncodingInt + 151 (parserInternals.c:206)
• 2 libxml2.2.dylib 0x00000001004fc326 xmlCurrentChar + 550 (parserInternals.c:707)
• 3 libxml2.2.dylib 0x0000000100507168 xmlParseCharData + 904 (parser.c:4232)
• 4 libxml2.2.dylib 0x000000010051264e xmlParseTryOrFinish + 2014 (parser.c:10990)
• 5 libxml2.2.dylib 0x00000001005139bb xmlParseChunk + 411 (parser.c:11611)
• 6 com.apple.Foundation 0x00007fff8759bca8 -[NSXMLParser parse] + 294
As you see, it errors on libxml2.
I REALLY need to figure out what is going on here. My knowledge in this area is not strong and I have no clue what is going wrong.
I have tried reinstalling libxml2 and MacPorts and have tried uninstalling libxml2 via MacPorts and no luck.
Please help.
:(
In the future you should ensure that you install any locally-built software like libxml2 to a location other than /usr to avoid overwriting the system versions.