Re: no AIX 5 support? I've got some idea what's needed.

2002-11-27 Thread Gary Kumfert
On Tue, 26 Nov 2002, Jeff Trawick wrote:

 Gary Kumfert [EMAIL PROTECTED] writes:
 
  Hi, 
  
  I've found no support for AIX 5 in automake, autoconf, 
  or libtool (not even config.guess!).  
  
  Any libtool developer interested in teaming up to add 
  AIX 5.x support to libtool?  I have a handful 
  of settings that I tweeked by hand to get things working 
  right.  I can just describe what settings are ultimately needed,
  or try to hack the changes into scripts and send the diffs.
 
 what did you find that you had to change?

First I've been doing Linux/Solaris stuff for years.
AIX is new to me and I'm trying to port a multi-language
code with a large test-suite.  The code builds static
and dynamically loadable objects and tests both.
The latter case really is dlopen(), not just shared libraries.
AIX is less being less than cooperative.

Libtool is currently builds shared objects only and
dumps them into *.a files.  This is a problem for me
since I've got #ifdef PIC preprocessor directives in the
code.  Static and dynamic loaded libraries do different
things and shouldn't be mixed in my case.

I'm using the -G option to create dynamic libraries
(similar I think, to -fPIC for gcc).  I think its new 
to AIX5, and supercedes the -bM:SRE etc etc. stuff (not sure).
I also add the -qstaticinline command for C++ code
to suppress warnings about duplicate symbols.
(Which brings up another question: when is libtool 
 gonna support C++?)

I can manually build separate static (*.a) and dynamic (*.so) libraries.
When linking static I used -bstatic.
When linking dynamic I used -bdynamic -brtl.
(Note: -brtl is necessary for linkage editor to include *.so 
files in its search.  Otherwise it only inspects *.a files!?!)

I think that's about it.  Oh and since -DPIC doesn't work
for my preprocessed fortran (-D means something else for xlF), 
I use -WF,-DPIC.

  I'd be willing to work with someone to refine the code 
  if I'm the only one with access to an AIX 5.x box.
 
 You're not.  But I'm perplexed since I've been using libtool and
 autoconf on AIX 5L for some time.
 

Part of the problem was indeed a screwup on our end.  Some
of the files we were using (e.g. config.guess) wasn't being
updated and got out of synch.  (We've been using 
autoconf/automake/libtool for almost three years now.)

Part of the problem is that AIX is just wierd... or at least
different enough from Linux/Solaris/OSF to be annoying.
From what I've learned from our local compiler guru, 
everything that libtool does is probably correct 
for older versions of AIX.
My sense is that in version 5, IBM is taking another step
twords doing things more akin to other Unices...
(at least with the right flags).  Autotools are 
sophisticated enough that they should take advantage 
of that.

... at least that's what I'm wanting/hoping.

Maybe someone knows a reason why I can't simultaneously 
have static *.a and dynamically loadable *.so on AIX...
just like I do for Linux/Solaris?  If so, I'd like to understand
why.

Gary


  Gary Kumfert, Ph.D.   [EMAIL PROTECTED]
  Center for Applied Scientific Computing  phone: 925-424-2580
  Lawrence Livermore National Laboratory   fax:   925-423-9338
  P.O. Box 808,L-551
  Livermore, CA 94551-0808




___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: no AIX 5 support? I've got some idea what's needed.

2002-11-27 Thread Russ Allbery
Gary Kumfert [EMAIL PROTECTED] writes:

 Maybe someone knows a reason why I can't simultaneously have static *.a
 and dynamically loadable *.so on AIX...  just like I do for
 Linux/Solaris?  If so, I'd like to understand why.

AIX traditionally uses a completely different library format than other
systems.  Both the shared and the static objects are supposed to go into
the same .a file, and the linker will chose whichever is appropriate.
This means that .a files on an AIX system may be used at runtime and may
actually be shared libraries.

I don't know how much of that, if any, AIX 5.x changed.

-- 
Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: no AIX 5 support? I've got some idea what's needed.

2002-11-27 Thread Mats Rynge
* Gary Kumfert [EMAIL PROTECTED] [2002-11-27 09:59:45 -0800]:

 Maybe someone knows a reason why I can't simultaneously 
 have static *.a and dynamically loadable *.so on AIX...
 just like I do for Linux/Solaris?  If so, I'd like to understand
 why.

AIX Linking and Loading Mechanisms
http://www-1.ibm.com/servers/esdd/pdfs/aix_ll.pdf

Especially, take a close look at page 10, Run-time Linking, and page
40, Example 4.

Also, make sure that you have libtool-1.4.3

-- 
Mats Rynge
AIX PDSLIB  --  http://aixpdslib.seas.ucla.edu



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool