title: Linux shared library that uses a shared library undefined symbol
body: <p>two shared libraries liba.so and libb.so.  liba.so uses libb.so.  All c files are compiled with -fPIC.  Linking uses -shared.  When we call dlopen on liba.so it cannot find symbols in libb.so...we get the "undefined symbol" error.  We can dlopen libb.so with no errors.  We know that liba is finding libb because we don't get a file not found error.  We get a file not found error when we delete libb.so.  We tried -lutil and no luck.</p>
  
  <p>Any ideas????</p>
  
  <p>oh yeah.  gcc 4.1.2</p>
  
  <p>update:  We use rpath when linking liba so it can find libb.</p>
  
  <p>ldd liba.so returns:</p>
  
  <pre><code>linux-gate.so.1 =&gt; (0xffffe000)  
  libb.so =&gt; ./libb.so (0xf6ef9000)  &lt;-------- LIBB 
  libutil.so.1 =&gt; /lib/libutil.so.1 (0xf6ef5000)  
  libdl.so.2 =&gt; /lib/libdl.so.2 (0xf6ef1000)  
  libm.so.6 =&gt; /lib/libm.so.6 (0xf6ec9000)  
  libpthread.so.0 =&gt; /lib/libpthread.so.0 (0xf6eb1000)  
  librt.so.1 =&gt; /lib/librt.so.1 (0xf6ea8000)  
  libc.so.6 =&gt; /lib/libc.so.6 (0xf6d62000)  
  /lib/ld-linux.so.2 (0x007d0000)   
  </code></pre>
  
  <p>is it significat that there is no .# at the end of libb???</p>