Sorry for the delay in response, I have been out of the office ...

Alan Burlison wrote:
> 
> Marc Mettes wrote:
> 
> > Without -Bsymbolic, the app cannot be loaded at runtime.  It is an
> > option used by example makefiles with this CAD api, and it seems
> > that I cannot remove it.
> 
> You need to lose the -Bsymbolic, it is undoubtedly causing the problem.
> -Bsymbolic is an obsolete flag intended ony for use when building ld.so.1
> itself.  I don't know why Dumper.so is trying to look for main(), as it
> certainly doesn't on my version.
> 
> You say that without -Bsymbolic you get errors - what are they exactly?  It
> is likely that you will probably need to add RTLD_GLOBAL to the dlopen flags
> and/or add some run-time linker dependencies to the various .so files, but
> without the exact error in the absence of the -Bsymbolic flag it is not
> possible to suggest a fix.

When I remove the -Bsymbolic option, the main cad executable displays 
a trivial message that the application (my .so with embedded perl) cannot 
be loaded.  No other error messages are displayed unfortunately.

Another developer mentioned similar problems with this same API on linux 
and sgi without attempting to embed perl.  There is a possibility that the 
problem is related to the way the main cad executable uses dlopen() itself, 
and may not be related to perl at all.

I applied the following DynaLoader patch from Meg Crocker, but that did not 
seem to fix the issue:

*** dl_dlopen.xs.dist   Tue May 20 09:19:22 2003
--- dl_dlopen.xs        Tue May 20 09:19:09 2003
***************
*** 174,179 ****
--- 174,182 ----
        }
      }
  #endif
+ #ifdef RTLD_PARENT  /* meg - solaris hack? */
+     mode |= RTLD_PARENT;
+ #endif
  #ifdef RTLD_NOW
      {
        dMY_CXT;


> Useful tools for tracking this sort of problem down on Solaris (should
> really be in a FAQ somewhere!):
> 
> $ ldd isv <file>
> show run-time linker dependencies (works on executables and .so's)
> 
> $ dump -Lv <file>
> Shows dynamic linker section of file (works on executables and .so's)
> Look at NEEDED and RUNPATH/RPATH lines.
> 
> $ LD_DEBUG=libs <executable>
> Show actions of run-time linker as the program runs.
> Use 'LD_DEBUG=help /bin/echo' to see the full range of options available.
> This can be tweaked up to the level where it shows the detailed processing
> for each symbol resolution - but is *very* verbose!

Thanks for these suggestions, I will be looking into this and I will 
report back if anything proves successful.


Marc
-- 
Marc Mettes
CAD Support
Bic Corporation

Reply via email to