Bugs item #27256, was opened at 2009-10-08 09:14
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27256&group_id=494

Category: None
Group: None
Status: Open
>Resolution: Accepted
Priority: 3
Submitted By: Joshua Lippiner (jlippiner)
>Assigned to: Charlie Savage (cfis)
Summary: LoadError - Symbol not found: _xmlAddChild 

Initial Comment:
My system appears to have 1.1.2 AND 1.1.3 installed.   Im running Snow Leopard. 
 Also, I cannot uninstall 1.1.2 for whatever reason.

11:11 AM ~/projects/v16 => console
Loading development environment (Rails 2.3.4)
Loading haml-edge gem.
>> require 'xml'
LoadError: 
dlopen(/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle,
 9): Symbol not found: _xmlAddChild
  Referenced from: 
/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle
  Expected in: flat namespace
 in 
/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle - 
/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle
        from 
/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle


----------------------------------------------------------------------

>Comment By: Charlie Savage (cfis)
Date: 2011-04-22 21:47

Message:
Hi guys,

I know this is pretty old - and I have no idea what could be causing it.  Does 
the latest release have the same problem?

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Graeme Mathieson (mathie)
Date: 2010-11-23 06:28

Message:
Hi,

I think I might be stumbling across the same problem. I've had a wee dig around 
and think I might have some further information, but I'm not entirely sure what 
to make of it.

First of all, some background. We have a CI server to verify that the tests are 
passing. It runs through the following process:

* Grab the latest code
* Create an empty RVM gemset
* Use gem bundler to install all the gem dependencies
* Run the test suite.

Sounds good? It is, most of the time. Once in a while, though, when attempting 
to run the test suite, we get:

dlopen(/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle,
 9): Symbol not found: _cXMLNode
 Referenced from: 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle
 Expected in: flat namespace
 in 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle
 - 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle

This doesn't happen on all runs, and re-running the CI build with the same 
commit often makes it work again later, so I'm reasonably(ish!) confident it's 
not an app problem. This is a CI server that I'm not actively messing with 
either, so I'm reasonably happy that the environment is stable.

So, I dug in a little. It's right, that bundle doesn't have the symbol it's 
looking for. In fact, the bundle doesn't have any symbols:

$ nm libxml-ruby-1.1.4-broken/lib/libxml_ruby.bundle 
0000000000000000 t __mh_bundle_header
                 U dyld_stub_binder

That's weird, right? Well, weirder still, none of the object files have any 
symbols:

$ nm libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o

produces nothing. So, gcc is producing a file without any symbols. What kind of 
file is it producing?

$ file libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o
libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o: 80386 COFF executable not 
stripped - version 30821

That's weird, because a correctly built version is a Mach-O 64 bit object file 
as you'd expect:

$ file libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o
libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o: Mach-O 64-bit object x86_64

Apart from the generated objects and bundles, there are no appreciable 
differences between the broken version and the working version:


$ diff -urN libxml-ruby-1.1.4-{broken,working}
diff -urN libxml-ruby-1.1.4-broken/ext/libxml/Makefile 
libxml-ruby-1.1.4-working/ext/libxml/Makefile
--- libxml-ruby-1.1.4-broken/ext/libxml/Makefile        2010-11-23 
12:02:32.000000000 +0000
+++ libxml-ruby-1.1.4-working/ext/libxml/Makefile       2010-11-23 
11:32:32.000000000 +0000
@@ -96,8 +96,8 @@
 
 BINDIR        = $(bindir)
 RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR = 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix)
-RUBYARCHDIR = 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix)
+RUBYLIBDIR = 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix)
+RUBYARCHDIR = 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix)
 
 TARGET_SO     = $(DLLIB)
 CLEANLIBS     = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
diff -urN libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log 
libxml-ruby-1.1.4-working/ext/libxml/mkmf.log
--- libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log        2010-11-23 
12:02:32.000000000 +0000
+++ libxml-ruby-1.1.4-working/ext/libxml/mkmf.log       2010-11-23 
11:32:32.000000000 +0000
@@ -1,7 +1,7 @@
 have_library: checking for socket() in -lsocket... -------------------- no
 
 "gcc -o conftest -I. 
-I/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0 -I.  
-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -g -O2  -pipe -fno-common   conftest.c  
-L. -L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib 
-L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib -L.      -lruby-static -lsocket  
-ldl -lobjc  "
-/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: 
Insecure world writable dir 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-5839/bin in PATH, mode 040777
+/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: 
Insecure world writable dir 
/Users/ci/.rvm/gems/ree-1.8.7-2010.02@cruise-3367/bin in PATH, mode 040777
 conftest.c: In function ‘t’:
 conftest.c:3: error: ‘socket’ undeclared (first use in this function)
 conftest.c:3: error: (Each undeclared identifier is reported only once

The host environment here is Mac OS X 10.6.5, we're using Ruby Enterprise 
Edition 2010.02 (1.8.7), and we're using the Mac OS X-supplied libxml2:

$ which xml2-config
/usr/bin/xml2-config
$ xml2-config --version
2.7.3

I have no idea where to go next while tracking this down! Any suggestions?

----------------------------------------------------------------------

Comment By: Jim Tobin (tobinjim)
Date: 2010-04-18 06:06

Message:
I see this, too.  Both the reporting of 1.1.2 and 1.1.3 installed, and the 
missing symbol.  Curiously, my Leopard machine does not report a missing 
symbol, and it has 1.1.3, 0.9.5 and 0.3.8.4 installed

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27256&group_id=494
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to