Discussion:
C++ binding on AIX
(too old to reply)
Nicod Thomas
2007-09-05 08:55:35 UTC
Permalink
Hi everybody,

I'm currently trying to bind my CXX application to a simple Perl script using XS.
I have carefully followed all the instructions given on the perl "XStut" page ()http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlxstut.pod to create a simple architecture including the "mylib" sub-directory.

Now I would like to switch to C++.
I managed to include simple personal headers from my project. It only works if I switch file extensions to CXX and HXX (compilation errors otherwise).
Creation of the Makefile and Compilation phases work fine.
But when I try to execute the "test.pl" script, I'm facing the following error:

Can't load 'Montest2AIX.so' for module Montest2AIX: rtld: 0712-001 Symbol invoke was referenced from module Montest2AIX.so(), but a runtime definition of the symbol was not found.
rtld: 0712-002 fatal error: exiting. at DynaLoader.pm line 230. at test.pl line 13

My config: xlC_r on AIX 5.3

Thanks for your advices.
Reinhard Pagitsch
2007-09-10 13:45:01 UTC
Permalink
Hello,
Post by Nicod Thomas
Hi everybody,
I'm currently trying to bind my CXX application to a simple Perl script using XS.
I have carefully followed all the instructions given on the perl "XStut"
page ()http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlxstut.pod to
create a simple architecture including the "mylib" sub-directory.
Now I would like to switch to C++.
I managed to include simple personal headers from my project. It only
works if I switch file extensions to CXX and HXX (compilation errors
otherwise).
Creation of the Makefile and Compilation phases work fine.
Can't load 'Montest2AIX.so' for module Montest2AIX: rtld: 0712-001
Symbol invoke was referenced from module Montest2AIX.so(), but a runtime
definition of the symbol was not found.
rtld: 0712-002 fatal error: exiting. at DynaLoader.pm line 230. at test.pl line 13
I am not an Unix (AIX) expert, but I think it is better to ask this
question in a Unix (AIX: comp.unix.aix) group.
But I found this regarding undefined symbols:
http://groups.google.com/group/comp.unix.aix/browse_thread/thread/fba475bd0df7269a/5eab735128139dc6?q=rtld&rnum=5&hl=en#5eab735128139dc6

Maybe it also helps to look with "dump -Tv name.so" into the library to
see if the symbol is defined in it, as stated in the link above?

regards,
Reinhard

--
Nicod Thomas
2007-09-11 11:31:01 UTC
Permalink
Hello,

I've finnaly figured out why this was not working.
When I was building the Shared Object using the H2XS file architecture, I was just trying to include a Static Library (".a" file) and a simple object (".o" file) into a ".so" file (which is obviously not working... At with my configuration!).

Anyway thanks for your answer.
Regards,

Thomas

Loading...