I don't understand what you mean by "but not, by default, that the .so files 
expect dependancies in another archive(member) search request". It sounds like 
the core of your issue is that you're trying to build AIX shared libraries, so 
you need to configure "shared". If that's producing .so files (which can be 
used in that form on AIX) but you'd prefer them wrapped in a .a archive (which 
is common on AIX), then use the ar command to create a .a containing the .so.

> From: Michael [mailto:regis...@felt.demon.nl]
> Sent: Monday, August 04, 2014 10:00 PM
> 
> I was - perhaps - not clear enough. Want I want is all the .o files
> together in a single file that can be a single member of an archive.
> Using the ./config shared got it to make .so files with everything
> combined - but not, by default, that the .so files expect dependancies
> in another archive(member) search request.
> 
> I hope my post, and the extra bit (to you only) makes that clearer.
> 
> Thanks for your reply to my first message!
> 
> Michael
> 
> On 8/4/2014 7:06 PM, Sands, Daniel wrote:
> > To generate a .a of shared objects instead of static objects, really
> all you do is build the shared object(s) and create an archive out of
> them.  There is no special magic about it beyond creating the shared
> object in the first place.  When linking a new program to an archive of
> shared objects, and if you didn't specify an import file, AIX will just
> use the standard static object rules when it searches an archive for
> likely candidates to link in:  First logical member of the archive that
> has the desired symbol will be chosen for inclusion.  The difference is
> that the static linker will see the "shared" flag and just add that
> member of the archive to the file's dynamic loader table instead of
> statically linking it in.
> >
> >
> > On Mon, 2014-08-04 at 08:45 +0200, Michael wrote:
> >
> >
> > Dear all,
> >
> > I wish I knew better - howto use ld to craft an archive member, but I
> do
> > not. (Below was sent to openssl-dev, if it arrived, please ignore for
> > now - however, once I understand this AND if I figure out a "simple"
> > change, I shall submit a patch for future AIX builds.)
> >
> > ===
> >
> > To be compatible with the standard AIX libraries I would like to
> learn
> > howto generate a single
> > ".so" file that goes into the .a file.
> >
> > FYI: AIX supports multiple versions of the ssl libraries using this
> > convention:
> >
> > root@x093:[/data/prj/openssl/openssl-0.9.8.27]ar tv
> /usr/lib/libcrypto.a
> > | head
> > rwxr-xr-x 370769/647632 2192276 Nov 09 07:44 2009 libcrypto.so.0.9.8
> >
> > michael@x054:[/data/prj/apache/httpd/test]ar tv /usr/lib/libcrypto.a
> > rwxrwxr-x 435159/781431 2965832 May 01 06:57 2014 libcrypto.so.1.0.0
> > rwxrwxr-x 435159/781431 2253655 May 01 06:58 2014 libcrypto.so.0.9.8
> >
> > Members are, as expected, object modules
> > michael@x054:[/data/prj/apache/httpd/test]ar xv /usr/lib/libcrypto.a
> > x - libcrypto.so.1.0.0
> > x - libcrypto.so.0.9.8
> > michael@x054:[/data/prj/apache/httpd/test]file libcrypto*
> > libcrypto.so.0.9.8: executable (RISC System/6000) or object module
> not
> > stripped
> > libcrypto.so.1.0.0: executable (RISC System/6000) or object module
> not
> > stripped
> >
> > Unfortunately, the archive created by the tarball ./config and make
> are
> > individual .o named object modules.
> >
> > Again, for compatibility I would like to have them contained in a .so
> >
> > root@x093:[/data/prj/openssl/openssl-0.9.8.27]ar tv libcrypto.a |
> head
> > rw-r--r--     0/0       6346 Aug 03 15:13 2014 cryptlib.o
> > rw-r--r--     0/0       8585 Aug 03 15:13 2014 dyn_lck.o
> > rw-r--r--     0/0      11602 Aug 03 15:13 2014 mem.o
> > rw-r--r--     0/0       1303 Aug 03 15:13 2014 mem_clr.o
> > rw-r--r--     0/0      13806 Aug 03 15:13 2014 mem_dbg.o
> > rw-r--r--     0/0       2048 Aug 03 15:13 2014 cversion.o
> > rw-r--r--     0/0      13170 Aug 03 15:13 2014 ex_data.o
> > rw-r--r--     0/0       2443 Aug 03 15:13 2014 tmdiff.o
> > rw-r--r--     0/0       1782 Aug 03 15:13 2014 cpt_err.o
> > rw-r--r--     0/0        630 Aug 03 15:13 2014 ebcdic.o
> >
> > And applications expect the .so.$version as member name
> >
> > michael@x054:[/data/prj/apache/httpd/test]dump -H /usr/sbin/sshd
> >
> > /usr/sbin/sshd:
> >
> >                           ***Loader Section***
> >                         Loader Header Information
> > VERSION#         #SYMtableENT     #RELOCent        LENidSTR
> > 0x00000001       0x00000196       0x000008cc       0x0000006f
> >
> > #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
> > 0x00000006       0x00008fc0       0x00000dde       0x0000902f
> >
> >
> >                           ***Import File Strings***
> > INDEX  PATH                          BASE                MEMBER
> > 0      /usr/lib:/lib
> > 1                                    libc.a              shr.o
> > 2                                    libcrypto.a
> libcrypto.so.1.0.0
> > 3                                    libz.a              libz.so.1
> > 4                                    libpam.a            shr.o
> > 5                                    libdl.a             shr.o
> >
> > ===
> >
> > I am going to look in the ./config for a "shared" versus "not-shared"
> > flag that I missed on my first attempt. All suggestions welcome!
> >
> > Thanks for your assistance!
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to