You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Chintana Wilamuna <ch...@gmail.com> on 2006/07/12 07:11:35 UTC

Library linking problem

Hi,

I'm trying to develop a Ruby wrapper for Axis2C.  I'm using a library
called Ruby/DLX which allows loading of any C shared library a
painless process.

However I have ran into some problems regarding some of the shared
libraries not getting linked properly.  Following are the troublesome
libraries,

libaxis2_engine.so: undefined symbol: axis2_hash_free_void_arg
libaxis2_http_sender.so: undefined symbol: axis2_stream_free_void_arg
libaxis2_libxml2.so: undefined symbol: xmlFree

All the other shared libraries in my lib folder (after building util,
axiom, and the root folder) loads without any problem.  Any tips
regarding how I could get around the linking problem would greatly be
appreciated.

Thanks in advance,

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Chintana Wilamuna <ch...@gmail.com>.
On 7/12/06, Samisa Abeysinghe <sa...@gmail.com> wrote:

> Please try with the latest svn. There were some linking problems in
> relation to lib loading and were fixed in makefiles.

Indeed.  Now I don't see any problems.  All the libraries load fine!

Thanks,

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Samisa Abeysinghe wrote:

> Chintana Wilamuna wrote:
>
>> On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:
>>
>>> Load libxml2 library here. in my machine it is located at
>>> /usr/lib/libxml2.so. Since this is located in LD_LIBRARY_PATH just
>>> loading libxml2.so (without the full path) will be fine.
>>
>>
>>
>> That worked ok, except now it stops in libaxis2_engine.so complaining
>> about the same old error.
>
>
> You mean libaxis2_engine.so: undefined symbol: axis2_hash_free_void_arg?

Please try with the latest svn. There were some linking problems in 
relation to lib loading and were fixed in makefiles.

Thanks,
Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Chintana Wilamuna wrote:

> On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:
>
>> Load libxml2 library here. in my machine it is located at
>> /usr/lib/libxml2.so. Since this is located in LD_LIBRARY_PATH just
>> loading libxml2.so (without the full path) will be fine.
>
>
> That worked ok, except now it stops in libaxis2_engine.so complaining
> about the same old error.

You mean libaxis2_engine.so: undefined symbol: axis2_hash_free_void_arg?

Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Chintana Wilamuna <ch...@gmail.com>.
On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:

> Load libxml2 library here. in my machine it is located at
> /usr/lib/libxml2.so. Since this is located in LD_LIBRARY_PATH just
> loading libxml2.so (without the full path) will be fine.

That worked ok, except now it stops in libaxis2_engine.so complaining
about the same old error.

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Sahan Gamage <sa...@wso2.com>.
Chintana Wilamuna wrote:

> On 7/12/06, Samisa Abeysinghe <sa...@gmail.com> wrote:
>
>> Here is the correct order:
>> libaxis2_minizip.so
>> libaxis2_util.so
>
Load libxml2 library here. in my machine it is located at
/usr/lib/libxml2.so. Since this is located in LD_LIBRARY_PATH just
loading libxml2.so (without the full path) will be fine.

>> libaxis2_parser.so
>> libaxis2_libxml2.so
>> libaxis2_axiom.so
>> libaxis2_engine.so
>> libaxis2_http_sender.so
>> libaxis2_http_receiver.so
>> libaxis2_wom.so
>> libaxis2_wsdl.so
>
>
> No luck, still stops after giving the message,
>
> libaxis2_libxml2.so: undefined symbol: xmlFree
>
> with 0.92.
>
> Bye,
>
>    -Chintana
>
- sahan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Chintana Wilamuna <ch...@gmail.com>.
On 7/12/06, Samisa Abeysinghe <sa...@gmail.com> wrote:

> Here is the correct order:
> libaxis2_minizip.so
> libaxis2_util.so
> libaxis2_parser.so
> libaxis2_libxml2.so
> libaxis2_axiom.so
> libaxis2_engine.so
> libaxis2_http_sender.so
> libaxis2_http_receiver.so
> libaxis2_wom.so
> libaxis2_wsdl.so

No luck, still stops after giving the message,

libaxis2_libxml2.so: undefined symbol: xmlFree

with 0.92.

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Chintana Wilamuna wrote:

> On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:
>
>> I see. I was thinking that you are writing a Ruby wrapper in C and I was
>> mentioning the Makefile.am of that component. Seems like I have 
>> mistaken :)
>
>
> :-)
>
>> What library (or more specifically the .so file)  you're trying to load
>> ? Axis2 libraries have a dependency hierachy.
>
>
> I'm loading the libraries in the following order,
>
> libaxis2_util.so
> libaxis2_axiom.so
> libaxis2_http_receiver.so
> libaxis2_wom.so
> libaxis2_wsdl.so
> libaxis2_parser.so
> libaxis2_minizip.so
> libaxis2_libxml2.so
> libaxis2_http_sender.so
> libaxis2_engine.so

Here is the correct order:
libaxis2_minizip.so
libaxis2_util.so
libaxis2_parser.so
libaxis2_libxml2.so
libaxis2_axiom.so
libaxis2_engine.so
libaxis2_http_sender.so
libaxis2_http_receiver.so
libaxis2_wom.so
libaxis2_wsdl.so

If you are using current svn, you also need to add the following at the end
libxml_schema.so
libwoden_wsdl10.so
libwoden_wsdl20.so

This is the ordering used by Firefox XPI

Thanks,
Samisa..

>
> And these are all that there in my deploy/libs folder.  I'm loading
> all of them to get fewer surprises.
>
>> For example :
>> axis2_unix <= axis2_util <= axis2_om (where a <= b means b depends on 
>> a).
>> also
>> libxml2 <= axis2_libxml2 <= axis2_om
>> And the dependency tree continues .....
>
>
> I don't see a library named libaxis2_om.so or libaxis2_unix.so in 0.92
> binary/source, however I can see those in 0.91 binary/source
>
> I tried loading libraries in 0.91 and it gives the exact same error
> message on previously mentioned libraries plus it gives,
>
> libaxis2_parser.so: undefined symbol: xmlFree
>
>> So IMHO you have to load dependencies before loading the required 
>> library.
>
>
> I doubt it because with 0.91 release I could load libaxis2_om.so first
> and then load libaxis2_unix.so without a problem.
>
> To make matters a bit more confusing I could load the
> libaxis2_parser.so library in 0.92 release without a problem!
>
> Bye,
>
>    -Chintana
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: [Axis2]Re: Library linking problem

Posted by Chintana Wilamuna <ch...@gmail.com>.
On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:

> I see. I was thinking that you are writing a Ruby wrapper in C and I was
> mentioning the Makefile.am of that component. Seems like I have mistaken :)

:-)

> What library (or more specifically the .so file)  you're trying to load
> ? Axis2 libraries have a dependency hierachy.

I'm loading the libraries in the following order,

libaxis2_util.so
libaxis2_axiom.so
libaxis2_http_receiver.so
libaxis2_wom.so
libaxis2_wsdl.so
libaxis2_parser.so
libaxis2_minizip.so
libaxis2_libxml2.so
libaxis2_http_sender.so
libaxis2_engine.so

And these are all that there in my deploy/libs folder.  I'm loading
all of them to get fewer surprises.

> For example :
> axis2_unix <= axis2_util <= axis2_om (where a <= b means b depends on a).
> also
> libxml2 <= axis2_libxml2 <= axis2_om
> And the dependency tree continues .....

I don't see a library named libaxis2_om.so or libaxis2_unix.so in 0.92
binary/source, however I can see those in 0.91 binary/source

I tried loading libraries in 0.91 and it gives the exact same error
message on previously mentioned libraries plus it gives,

libaxis2_parser.so: undefined symbol: xmlFree

> So IMHO you have to load dependencies before loading the required library.

I doubt it because with 0.91 release I could load libaxis2_om.so first
and then load libaxis2_unix.so without a problem.

To make matters a bit more confusing I could load the
libaxis2_parser.so library in 0.92 release without a problem!

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


[Axis2]Re: Library linking problem

Posted by Sahan Gamage <sa...@wso2.com>.
Hi,

I see. I was thinking that you are writing a Ruby wrapper in C and I was
mentioning the Makefile.am of that component. Seems like I have mistaken :)
What library (or more specifically the .so file)  you're trying to load
? Axis2 libraries have a dependency hierachy.
For example :
axis2_unix <= axis2_util <= axis2_om (where a <= b means b depends on a).
also
libxml2 <= axis2_libxml2 <= axis2_om
And the dependency tree continues .....

So IMHO you have to load dependencies before loading the required library.

- sahan

P.S: pls put [Axis2] prefix in the subject when discussing about axis2
problems,

Chintana Wilamuna wrote:

> On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:
>
>> I assume that the problem is coming when you're trying to build the Ruby
>> wrapper - not the Axis2C
>
>
> Your assumption is correct.  I'm not "building" the wrapper as
> building per se, I'm just loading the C library from a Ruby program
> after building Axis2C.
>
>> see whether you have -laxis2_util in the Makefile.am
>
>
> I'm not sure which Makefile.am you're referring to.
>
> Here's a complete list of Makefile.am's where -laxis2_util is
> specified (test folders are omitted since I'm passing
> --enable-tests=no)
>
> ./rampart/samples/client/echo/Makefile.am
> ./axiom/src/om/Makefile.am
> ./axiom/src/attachments/Makefile.am
> ./woden/samples/Makefile.am
> ./samples/codegen/client/calculator/Makefile.am
> ./samples/codegen/client/interop_doc1/Makefile.am
> ./samples/codegen/client/interop_doc2/Makefile.am
> ./samples/client/echo/Makefile.am
> ./samples/client/math/Makefile.am
> ./samples/client/mtom/Makefile.am
> ./samples/client/google/Makefile.am
> ./samples/client/notify/Makefile.am
> ./samples/user_guide/clients/Makefile.am
> ./modules/core/transport/http/server/simple_axis2_server/Makefile.am
> ./modules/core/transport/http/receiver/Makefile.am
>
>> You need libxml2 - see whether you have -lxml2
>
>
> Here's the complete list of Makefile.am's which have -lxml2
>
> ./axiom/src/parser/libxml2/Makefile.am
> ./axiom/test/unit/Makefile.am
> ./modules/core/transport/http/server/simple_axis2_server/Makefile.am
> ./modules/core/transport/http/server/apache2/Makefile.am
>
> I'm using Axis2C 0.92 on Gentoo.  I tried building Axis2C on Ubuntu as
> well the undefined symbol problem is reproduceable.
>
> Bye,
>
>    -Chintana
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Library linking problem

Posted by Chintana Wilamuna <ch...@gmail.com>.
On 7/12/06, Sahan Gamage <sa...@wso2.com> wrote:

> I assume that the problem is coming when you're trying to build the Ruby
> wrapper - not the Axis2C

Your assumption is correct.  I'm not "building" the wrapper as
building per se, I'm just loading the C library from a Ruby program
after building Axis2C.

> see whether you have -laxis2_util in the Makefile.am

I'm not sure which Makefile.am you're referring to.

Here's a complete list of Makefile.am's where -laxis2_util is
specified (test folders are omitted since I'm passing
--enable-tests=no)

./rampart/samples/client/echo/Makefile.am
./axiom/src/om/Makefile.am
./axiom/src/attachments/Makefile.am
./woden/samples/Makefile.am
./samples/codegen/client/calculator/Makefile.am
./samples/codegen/client/interop_doc1/Makefile.am
./samples/codegen/client/interop_doc2/Makefile.am
./samples/client/echo/Makefile.am
./samples/client/math/Makefile.am
./samples/client/mtom/Makefile.am
./samples/client/google/Makefile.am
./samples/client/notify/Makefile.am
./samples/user_guide/clients/Makefile.am
./modules/core/transport/http/server/simple_axis2_server/Makefile.am
./modules/core/transport/http/receiver/Makefile.am

> You need libxml2 - see whether you have -lxml2

Here's the complete list of Makefile.am's which have -lxml2

./axiom/src/parser/libxml2/Makefile.am
./axiom/test/unit/Makefile.am
./modules/core/transport/http/server/simple_axis2_server/Makefile.am
./modules/core/transport/http/server/apache2/Makefile.am

I'm using Axis2C 0.92 on Gentoo.  I tried building Axis2C on Ubuntu as
well the undefined symbol problem is reproduceable.

Bye,

    -Chintana

-- 
http://chintana.wordpress.com/
http://www.linux.lk/~chintana/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Library linking problem

Posted by Sahan Gamage <sa...@wso2.com>.
Chintana Wilamuna wrote:

> Hi,
>
> I'm trying to develop a Ruby wrapper for Axis2C.  I'm using a library
> called Ruby/DLX which allows loading of any C shared library a
> painless process.
>
> However I have ran into some problems regarding some of the shared
> libraries not getting linked properly.  Following are the troublesome
> libraries,

I assume that the problem is coming when you're trying to build the Ruby
wrapper - not the Axis2C

>
> libaxis2_engine.so: undefined symbol: axis2_hash_free_void_arg
> libaxis2_http_sender.so: undefined symbol: axis2_stream_free_void_arg

see whether you have -laxis2_util in the Makefile.am

> libaxis2_libxml2.so: undefined symbol: xmlFree

You need libxml2 - see whether you have -lxml2

>
> All the other shared libraries in my lib folder (after building util,
> axiom, and the root folder) loads without any problem.  Any tips
> regarding how I could get around the linking problem would greatly be
> appreciated.
>
> Thanks in advance,
>
> Bye,
>
>    -Chintana
>
HTH
- sahan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org