G++ shared object under AIX 4.1.4

Andrey Slepuhin pooh@msu.ru
Wed Jun 2 01:47:00 GMT 1999


On 01-Jun-99 Desmond Kirkpatrick wrote:
> David Edelsohn wrote:
> 
>>         All of these are warnings, so I do not understand why this would
>> cause problems for dlopen().  The debug output looks like the linker is
>> creating a file example.so.  The dlopen() error message is "Permission
>> denied", so maybe something else is wrong.
> 
> Yes -- the 'permission denied' problem is what initiated this thread, but
> the warnings were something that Andrey Slepuhin was concerned about (well,
> he couldn't replicate, so he asked me to explain).
> 
> Other items:  I have tried this with both shared and unshared (archive)
> versions of libstdc++ and get the same dlopen() error.  I've attached a dump
> of the object, though I would need some direction in giving you more clues.
> 
> Desmond

Hi Desmond,
To check whether dlopen works correctly, please try the following
program, replacing <your_path> by actual example.so path

--------------- test.cc ------------------------------
#include <dlfcn.h>
#include <iostream>

void main ()
{
  void* ptr=dlopen("<your_path>/example.so",RTLD_NOW);
  if (ptr==NULL) cout<<dlerror()<<endl;
}
------------------------------------------------------
g++ -o test test.cc -ldl
./test

If this program will not print any error, then dlopen()
works correctly and an error is somewhere in TCL. In this
case try to debug what parameters are actually passed to
dlopen() when you do load 'example.so' inside TCL.

One more note: as you found that duplicated __builtin_delete
come from libTCL8.0.a, I guess that this library was not
compiled with egcs 1.1.x. I strongly recommend to rebuild
all C++ libraries with current compiler.

Regards,
Andrey.



More information about the Gcc mailing list