Hello all,

I tested 5.4.1.pre3 on AIX. This version still needs a fix for dlopen use on
AIX. (AIX dlopen does not support lazy loading. When dlopen is called for a
Net-SNMP library, there cannot be unresolved symbols. Otherwise, dlopen
fails.)

Followings are the build order of Net-SNMP library files.

1. libnetsnmp.so (self-contained)
2. libnetsnmpagent.so (import symbols from 1 and 3) (linked with 1)
3. libnetsnmphelpers.so (import symbols from 1 and 2) (linked with 1 and 2)
4. libnetsnmpmibs.so (import symbols from 1, 2 and 3) (linked with 1, 2 and
3)

The way it builds libs in this version is one-pass build linking with libs
built before. You build 1 first. You build 2 linking with 1 and build 3
linking with 1 and 2 (and so on). Therefore, 2 ( libnetsnmpagent.so) must be
linked with 3 which is missing here. Because of this, 2 has undefined
symbols imported from 3 which results in dlopen failure. However, if we
arrange the order of dlopen (i.e., do dlopen 2 later than 3), then it works
because all symbols can be resolved.

I think followings must be considered for the next version.

A. Make 2 (libnetsnmpagent.so) be linked with 3 (libnetsnmphelpers.so). It
requires the second-pass build.
B. If option A is not feasible, README.aix should include the explanation
about dlopen orders. It should state that 2 ( libnetsnmpagent.so) must be
dlopened later than others.

It seems that restricting dlopen orders is not that good idea. Do you think
it is feasible to incorporate option A in your libtool?

Sincerely,

Sukwoo Kang
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to