This is very rough and slanted heavily for SCO OpenServer. Comments, 
suggestions, corrections and input welcome and requested.

--------------------------------------------------------------------------------------------------------------------------------------------------------


Compiling Perl with DBI and DBD::Informix in Static Mode

First Things First
    Download Perl - We're using 5.6 but the same works with 5.005

        Create a directory structure to hold your downloads. Here's what we 
use:

     Base Directory:      /src/perl

     Perl goes in /src/perl/perl5.6
     Uninstalled src in /src/perl/uninstalled
     Installed src (after compiling) in /src/perl/installed

On some SCO systems, once DBD::Informix is compiled static, anything 
compiled in afterwards chokes on missing libraries even though the exist. 
When I have time, I'll find out why and fix it. But for a workaround, 
compile everything you want except DBD::Informix and then create a safe 
copy of the perl structure.  Our perl is installed as /usr/local/lib/perl5 
with binaries in /usr/local/perl so once everything but DBD::Informix is 
compiled, we make a safe copy of the structure using the following:

#!/bin/sh
cd /usr/local/bin
rm -f perl*.safe > /dev/null 2>&1
for i in perl*
do
    cp $i $i.safe
done
cd /usr/local/lib
rm -r perl5.safe > /dev/null 2>&1
mkdir perl5.safe
cd perl5
tar cf - . | (cd /usr/local/lib/perl5.safe ; tar xvf - )

If more modules need to be compiled into the static perl later:

mv /usr/local/lib/perl5 /usr/local/lib/perl5.old
mkdir /usr/local/lib/perl5
cd /usr/local/lib/perl5.safe
tar cf - . | (cd /usr/local/lib/perl5 ; tar xvf - )

This effectivly removes DBD::Informix from the structure so that more 
modules can be compiled. After adding new modules, simply make a new 
/usr/local/lib/perl5.safe directory using the above method and then compile 
in DBD::Informix.

If you want to know if your system shows the same problem duriing compile, 
build Perl Static, compile in DBI and then DBD::Informix, then try to 
compile in one other module. If it fails, you'll need to use the above method.


The compile:

We've used both gcc and SCO's Ansi C and find that SCO's Ansc makes for a 
smaller perl binary.

After reading the README file for your system, run Configure

sh ./Configure

Most answers you'll already know. Here are the important ones for static 
(at least on SCO)

If this doesn't make any sense to you, just accept the default 'n'.
Build a threading Perl? [n]

If this doesn't make any sense to you, just accept the default 'n'.
Build Perl for multiplicity? [n]

Directories to use for library searches?
[/usr/local/lib /lib /usr/lib /usr/ccs/lib]

Perl can be built to use the SOCKS proxy protocol library.  To do so,
Configure must be run with -Dusesocks.

If this doesn't make any sense to you, just accept the default 'n'.
Build Perl for SOCKS? [n]

What libraries to use?
[-lintl -lsocket -lnsl -lndbm -ldbm -lld -lm -lc -lcrypt -lsec -lPW -lx]

What optimizer/debugger flag should be used? [-O0]

Any additional cc flags?
[-U M_XENIX -D PERL_SCO -D PERL_SCO5 -w0 -belf -I/usr/local/include]

Any additional ld flags (NOT including libraries)? [ -L/usr/local/lib]

Shall I use /bin/nm to extract C symbols from the libraries? [n]

Do you wish to use dynamic loading? [n]

Use the experimental PerlIO abstraction layer? [n]What extensions do you 
wish to include?
[B ByteLoader Data/Dumper Devel/DProf Devel/Peek Fcntl File/Glob IO 
IPC/SysV NDB
M_File Opcode POSIX SDBM_File Socket Sys/Hostname Sys/Syslog attrs re]


Answer the rest of the questions to your liking, check config.sh to be sure 
it's cool and then run

make

make test

make install

Work with perl as is for a bit to be sure it's really working.  Then 
compile in DBD and any other mods you might want.

Here's the list of what we use and the order they're compiled in:

DBI
CDB_File
Time
File
libnet
Digest-MD5-2.15
MD5-2.02
SQL
TimeDate
MIME-Base64-2.12
URI
HTML-Parser-3.25
HTML-Tagset-3.03
libwww-perl-5.5396
MailTools-1.40
IO-Tty-0.04
IO-Stty-.02
Expect-1.12
NNTPClient-0.37
News-Scan-0.51
FAQ-OMatic-2.711
Net-SNMP-3.6
POP3Client-2.9
Net-TFTP-0.12
------------------------------------perl5.safe created see above 
-----------------------
DBD-Informix-1.00.PC1

For each module, use the same steps

When a Configure command exists
   sh Configure
   check config.sh

Then
make
make test
make install


For DBD::Informix
    Make sure your esqlc is loaded and working. Make sure you can compile 
and run regular esqlc programs and make sure your demo database is up and 
working.

Trick for static:
    cd $INFORMIXDIR/bin
    mv esql esql.bin

    create a new esql:

#!/bin/sh
$INFORMIXDIR/bin/esql.bin -static $*

chmod 755 esql

This makes esql compile static every time. Make sure that's what you want.














-- 
[EMAIL PROTECTED]

Reply via email to