-
Notifications
You must be signed in to change notification settings - Fork 34
/
README.aix.txt
255 lines (188 loc) · 8.33 KB
/
README.aix.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
DBD::Oracle AIX-specific README
Using Visual Age 7 C Compiler
======================================================================================
- Oracle 9i is only certified as a 64-bit application on AIX 5L (5.1,5.2,5.3) with 32-bit support;
in other words, there is no 9i "32-bit" Oracle client
- Oracle 10g is certified as both a 64-bit application and a 32-bit Oracle client
- This information only pertains to deploying
the DBI (version 1.48)
and DBD-Oracle (version 1.16):
on AIX 5.3
using Oracle 9i (9.2.0.1/9.2.0.5)
using the existing Perl 5.8.2 (no custom-built Perl) which is 32-bit
using Visual Age 7.0 C/C++ compiler
Install the DBI (required for the DBD-Oracle install - no issues here)
Untar the DBD-Oracle bundle
Run Makefile.PL
$ perl Makefile.PL
Edit Makefile with following commands:
1,$s?/lib/ ?/lib32/ ?g
1,$s?-q64??g
1,$s?/lib/sysliblist?/lib32/sysliblist?g
Now perform normal commands to perform the testing/making:
$ make
$ make test
$ make install
I've tested the basics of the DBD-Oracle and it seems fully functional.
Stephen de Vries
Using gcc C Compiler
======================================================================================
DBD::Oracle with gcc and Oracle Instant Client on AIX
--------------------------------------------------------------------------------------
Nathan Vonnahme Dec 15 2005, 4:28 pm Newsgroups: perl.dbi.users
See: http://groups.google.com/group/perl.dbi.users/msg/0bd9097f80f2c8a9
[ with updates 1/31/2006 - DBD::Oracle 1.17 doesn't need makefile hacking
to work with instantclient on AIX ]
Yes! It eluded me last year but I finally got DBD::Oracle working on an
AIX machine using gcc. Here's the short version:
First I had to recompile perl with gcc, using
sh Configure -de -Dcc=gcc
This apparently built a 32 bit perl, someday I will try getting it to go
64 bit.
I was then able to install and build DBI 1.50 with the CPAN shell.
I downloaded the base and sdk packages of the Oracle Instant Client for
AIX -- first I tried the 64 bit but that didn't work with my 32 bit perl
-- the 32 bit version (still at 10.1.0.3) did the trick. I unzipped
them and moved the dir to /usr/local/oracle/instantclient10_1 and made a
symlink without the version at /usr/local/oracle/instantclient , then
set:
export ORACLE_HOME=/usr/local/oracle/instantclient
export LIBPATH=$ORACLE_HOME
Oracle wasn't providing the sqlplus package for 32 bit AIX so I
explicitly told Makefile.PL the version:
perl Makefile.PL -V 10.1
make
My test databases were on other machines so I set these environment variables
to get the tests to run:
export ORACLE_DSN=DBI:Oracle://host/dbinstance
export ORACLE_USERID="user/password"
make test
make install
NOTE: I have an older full version of Oracle on this machine, and the
ORACLE_HOME environment variable is normally set to point to that, so
my perl scripts that use DBD::Oracle have to make sure to first set
$ENV{ORACLE_HOME}='/usr/local/oracle/instantclient';
--------------------------------------------------------------------------------------
The following setup worked to build on AIX 5.2:
gcc-3.3.2 (32-bit) (configure opts [ --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as])
Oracle-9.2.0 ( full install w/32bit support)
perl-5.8.3 (built with above gcc/latest stable as of March 2004)
Followed the directions from Rafael's email below, only set ORACLE_HOME, (and
the appropriate test environmentals).
1) build perl-5.8.3 with gcc
2) install DBI
3) ORACLE_HOME="your oracle home"
ORACLE_USERID..
ORACLE_SID ..
(I ignored ORACCENV, didn't use it.)
4) install DBD::Oracle, after perl Makefile.PL, edit the created Makefile,
changing references to Oracle's ../lib to ../lib32. and change crt0_64.o to
crt0_r.o. Remove the -q32 and/or -q64 options from the list of libraries to
link with.
5) make should be clean, make test should pass.
This setup worked with 8.1.7 w/32 bit support, and with 9.2.0 w/ 32-bit support.
--Adrian Terranova
Using xlc_r C Compiler
======================================================================================
--------------------------------------------------------------------------------------
From: Rafael Caceres <[email protected]>
Date: 22 Jul 2003 10:05:20 -0500
Message-Id: <[email protected]>
The following sequence worked for me on AIX 5.1:
-use Perl 5.8.0 (the latest stable from CPAN)
-use the xlc_r version of IBM's compiler and build a 32 bit Perl
(which xlc_r will do by default). All tests should be successful.
-get and install DBI
-get DBD::Oracle. Edit the Makefile.PL or Makefile for DBD::Oracle,
changing references to Oracle's ../lib to ../lib32. and change crt0_64.o
to crt0_r.o. Remove the -q32 and/or -q64 options from the list of
libraries to link with. Do the make and make test.
-Set up the environment for making DBD::Oracle:
ORACLE_HOME="your oracle home"
ORACCENV = "xlc_r"
ORACLE_USERID..
ORACLE_SID ..
-Run make, all tests should be successfull -against Oracle 9.x at least.
You should have no problems with Oracle 8.1.7, but accessing Oracle 7.x
or previous is not possible (you'll core dump, or simply hang). The same
goes for a Linux build or a Digital build, regarding access of different
Oracle versions.
Rafael Caceres
On Tue, 2003-07-22 at 08:12, [email protected] wrote:
>
> I dont believe I compiled Oracle. During the installation it was linked
> but I am not sure it was compiled
>
> I used a xlc compiler to compile PERL.
> Got this message in the Perl Makefile.PL output
>
> Warning: You will may need to rebuild perl using the xlc_r compiler.
> You may also need do: ORACCENV='cc=xlc_r'; export ORACCENV
> Also see the README about the -p option
>
> this probobly means I need to rebuild PERL with xlc_r??
>
> thanx
>
> Mike Paladino
> Database Administrator
From: Rafael Caceres
>
> Make sure you use the same compiler to build Oracle and Perl. We have
> used xlc_r on Aix 5.1 with no problems. Your Perl build is 32 bit, so
> when building DBD::Oracle, you should use the 32bit libraries (change
> references to .../oracle/lib to .../oracle/lib32 in your Makefile).
> Remove the references to the -q64 or -q32 parameters for ld in Makefile,
> as they shouldn't be there.
>
> Rafael Caceres
From: "cartman ltd" <[email protected]>
Subject: Tip for DBI and DBD::Oracle on AIX 5.1 and Oracle 9.2
Date: Mon, 11 Aug 2003 18:15:38 +0000
Message-ID: <[email protected]>
Here is a tip for compiling DBD::Oracle as a 32 bit application on AIX 5.1
64 bit and Oracle 9.2 64 bit without editting any makefiles. I hope people
find this useful:
First, the versions of products I used:
DBI version 1.32
DBD::Oracle version 1.14
Oracle 9.2.0.2 - default 64 bit application with 32 bit libraries
AIX 5.1 ML03 - 64 bit kernel - ships with Perl as a 32 bit application.
VisualAge C/C++ 5.0.2
Basically DBD must be compiled as 32 bit to link with Perl's 32 bit
libraries.
gunzip -c DBD-Oracle-1.14.tar.gz | tar xvf
cd DBD-Oracle-1.14
perl Makefile.PL -m $ORACLE_HOME/rdbms/demo/demo_rdbms32.mk
make
NB: I think there is a bug in the Oracle 9.2.0.3 file
$ORACLE_HOME/rdbms/lib/env_rdbms.mk
I corrected this (before running the above commands) by replacing the
invalid linker option
LDFLAGS32=-q32
with
LDFLAGS32=-b32
Have fun: KC.
--------------------------------------------------------------------------------------
Date: Wed, 30 Jun 2004 23:34:24 -0500
From: "SCHULTZ, DARYLE (SBCSI)" <[email protected]>
Got it to work. Using dbd 1.16
Perl 5.8.4 built like this, with Visual Age 6.0:
config_args='-Dcc=xlc_r -Dusenm -Dprefix=/appl/datasync/work/perl5
-Dusethreads -Duse64bitall -des'
==============================================
Used DBI 1.42
=============================================
Added this to top of Oracle.h:
#define A_OSF
#include <oratypes.h>
=======================
Set LIBPATH to point to 64bit Oracle libs first.
export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/lib
Use: perl Makefile.PL -nob
Change all references in Makefile of LD_RUN_PATH to be LIBPATH.
Change nothing else, left all flags in Makefile, including -q64.
Passed make, and all tests.
--------------------------------------------------------------------------------------