[Spread-users] Spread 3.17.1 on AIX

Theo Schlossnagle jesus at omniti.com
Tue Oct 21 00:38:27 EDT 2003

On Monday, Oct 20, 2003, at 23:57 US/Eastern, Becky Alcorn wrote:

> Hi,
> I'm trying to install Spread 3.17.1 on an AIX 4.3 machine.  The 
> ./configure
> step works fine, however when I try make it dies with the messages 
> below.
> Can anybody help me?

Well, the easiest thing to do is to skip building the shared libraries. 
(don't build libspread.so and libtspread.so)

Just drop libspread.so and libtspread.so from the TARGETS= line of the 
Makefile and install-libspread.so and install-libtspread.so from the 
install: line.

>         cc -shared -o libspread.so alarm.lo events.lo memory.lo sp.lo  
> -lnsl
> cc: 1501-218 file alarm.lo contains an incorrect file suffix
> cc: 1501-218 file events.lo contains an incorrect file suffix
> cc: 1501-218 file memory.lo contains an incorrect file suffix
> cc: 1501-218 file sp.lo contains an incorrect file suffix
> ld: 0706-012 The -h flag is not recognized.
> ld: 0706-012 The -a flag is not recognized.
> make: The error code from the last command is 255.

building shared libraries on AIX is more complicated than on other 
modern unix system.  You _may_ have better luck with a recent version 
of GNU ld.

AIX requires symbol export tables to construct shared libraries 
(someone somewhere was too lazy to automate the most standard case of 
this) so you have to do a bit of work.  If you are familiar with the 
compile, symbolize and link process, you may be able to manually link 
yourself up some shared libraries... Otherwise, I think the task may be 
too daunting.

Maybe something like this:

mkdir scratch
cp alarm.lo events.lo memory.lo sp.lo scratch/
cd scratch
for i in *.lo
   mv $i `echo $i | sed -e 's/\.lo/\.o/;'`
/bin/nm -B -BCpg *.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == 
"B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > 
xlC -o libspread.so -bnoentry -bexport:libspread.exp -G *.o -lnsl

I don't have an AIX box to test that on, but something like that should 
work...  I am sure you can accomplish the same thing with libtool, but 
that is a black art that I do not know.

// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on earth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2379 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20031021/dc09c52c/attachment.bin 

More information about the Spread-users mailing list