Skip to content

Commit 2a2b25e

Browse files
committed
Add some extra compiler detail
1 parent 18360a7 commit 2a2b25e

File tree

1 file changed

+70
-41
lines changed

1 file changed

+70
-41
lines changed

INSTALL.md

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Oracle Client 11.2 if you need to connect to Oracle Database 9.2.
5454
A compiler is required. Use Visual Studio on Windows, GCC on Linux or
5555
Xcode on macOS. **When building with Node 4 onward, the compiler must
5656
support C++11.** Note the default compiler on Oracle Linux 6 and RHEL 6
57-
does not have the required support. Install a
58-
[newer compiler](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible)
57+
does not have the required support. Install [GCC 4.7 or later](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible)
5958
or upgrade to Oracle Linux 7.
6059

6160
Python 2.7 is needed by node-gyp. If another version of Python occurs
@@ -94,24 +93,36 @@ install Oracle Linux yourself, it is free from
9493

9594
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
9695

97-
### 2.1 Install Node.js
96+
### 2.1 Install Prerequisites
97+
98+
GCC 4.7 (or later) is needed to install because compiling for Node 4
99+
(or later) requires a C++11 compatible compiler.
100+
101+
The default compiler on Oracle Linux 6 and RHEL 6 does not have the
102+
required C++11
103+
support. Install
104+
[GCC 4.7 or later](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible) or
105+
upgrade to Oracle Linux 7.
106+
107+
108+
### 2.2 Install Node.js
98109

99110
Download and extract the [Node.js "Linux Binaries"](http://nodejs.org)
100-
package. For example, if you downloaded version 6.9.1 for 64-bit you
111+
package. For example, if you downloaded version 6.9.4 for 64-bit you
101112
could install Node.js into `/opt`:
102113

103114
```
104115
cd /opt
105-
tar -Jxf node-v6.9.1-linux-x64.tar.xz
116+
tar -Jxf node-v6.9.4-linux-x64.tar.xz
106117
```
107118

108119
Set PATH to include Node.js:
109120

110121
```
111-
export PATH=/opt/node-v6.9.1-linux-x64/bin:$PATH
122+
export PATH=/opt/node-v6.9.4-linux-x64/bin:$PATH
112123
```
113124

114-
### 2.2 Install the free Oracle Instant Client 'Basic' and 'SDK' RPMs
125+
### 2.3 Install the free Oracle Instant Client 'Basic' and 'SDK' RPMs
115126

116127
Download the free **Basic** and **SDK** RPMs from [Oracle Technology Network](http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html) and
117128
[install them](http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst) as the root user:
@@ -125,7 +136,7 @@ If you have a [ULN](https://linux.oracle.com) subscription, you can
125136
alternatively use `yum` to install these packages from the
126137
*Oracle Software for Oracle Linux* channel for your version of Linux.
127138

128-
### 2.3 Install the add-on
139+
### 2.4 Install the add-on
129140

130141
If you are behind a firewall you may need to set your proxy, for
131142
example:
@@ -157,7 +168,7 @@ the Instant Client RPM libraries, for example
157168
Note: A compiler supporting C++11 is required when building with
158169
Node.js 4 or later, otherwise the NAN component will fail to build.
159170

160-
### 2.4 Run an example program
171+
### 2.5 Run an example program
161172

162173
Download the
163174
[example programs](https://github.com/oracle/node-oracledb/tree/master/examples) from GitHub.
@@ -183,24 +194,35 @@ node select1.js
183194

184195
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
185196

186-
### 3.1 Install Node.js
197+
### 3.1 Install Prerequisites
198+
199+
GCC 4.7 (or later) is needed to install because compiling for Node 4
200+
(or later) requires a C++11 compatible compiler.
201+
202+
The default compiler on Oracle Linux 6 and RHEL 6 does not have the
203+
required C++11
204+
support. Install
205+
[GCC 4.7 or later](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible) or
206+
upgrade to Oracle Linux 7.
207+
208+
### 3.2 Install Node.js
187209

188210
Download and extract the [Node.js "Linux Binaries"](http://nodejs.org)
189-
package. For example, if you downloaded version 6.9.1 for 64-bit you
211+
package. For example, if you downloaded version 6.9.4 for 64-bit you
190212
could install Node.js into `/opt`:
191213

192214
```
193215
cd /opt
194-
tar -Jxf node-v6.9.1-linux-x64.tar.xz
216+
tar -Jxf node-v6.9.4-linux-x64.tar.xz
195217
```
196218

197219
Set PATH to include Node.js:
198220

199221
```
200-
export PATH=/opt/node-v6.9.1-linux-x64/bin:$PATH
222+
export PATH=/opt/node-v6.9.4-linux-x64/bin:$PATH
201223
```
202224

203-
### 3.2 Install the free Oracle Instant Client 'Basic' and 'SDK' ZIPs
225+
### 3.3 Install the free Oracle Instant Client 'Basic' and 'SDK' ZIPs
204226

205227
Download the free **Basic** and **SDK** ZIPs from
206228
[Oracle Technology Network](http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html)
@@ -233,7 +255,7 @@ link path. Do this on Linux by creating a file
233255
location `/opt/oracle/instantclient`, and then run `ldconfig` as
234256
the root user.
235257

236-
### 3.3 Install the add-on
258+
### 3.4 Install the add-on
237259

238260
Tell the installer where to find Instant Client:
239261

@@ -267,10 +289,7 @@ npm install oracledb
267289
If you are installing with `sudo`, you may need to use `sudo -E` to
268290
preserve the environment variable values.
269291

270-
Note: A compiler supporting C++11 is required when building with
271-
Node.js 4 or later, otherwise the NAN component will fail to build.
272-
273-
### 3.4 Run an example program
292+
### 3.5 Run an example program
274293

275294
Download the
276295
[example programs](https://github.com/oracle/node-oracledb/tree/master/examples) from GitHub.
@@ -296,6 +315,19 @@ node select1.js
296315

297316
## <a name="instoh"></a> 4. Node-oracledb installation on Linux with a Local Database
298317

318+
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
319+
320+
### 4.1 Install Prerequisites
321+
322+
GCC 4.7 (or later) is needed to install because compiling for Node 4
323+
(or later) requires a C++11 compatible compiler.
324+
325+
The default compiler on Oracle Linux 6 and RHEL 6 does not have the
326+
required C++11
327+
support. Install
328+
[GCC 4.7 or later](https://blogs.oracle.com/opal/entry/getting_a_c_11_compatible) or
329+
upgrade to Oracle Linux 7.
330+
299331
The `ORACLE_HOME` can be either a database home or a full Oracle
300332
client installation installed with Oracle's `runInstaller`.
301333

@@ -305,26 +337,24 @@ version of the database is available on Linux. Applications
305337
developed with XE may be immediately used with other editions of the
306338
Oracle Database.
307339

308-
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
309-
310-
### 4.1 Install Node.js
340+
### 4.2 Install Node.js
311341

312342
Download and extract the [Node.js "Linux Binaries"](http://nodejs.org)
313-
package. For example, if you downloaded version 6.9.1 for 64-bit you
343+
package. For example, if you downloaded version 6.9.4 for 64-bit you
314344
could install Node.js into `/opt`:
315345

316346
```
317347
cd /opt
318-
tar -zxf node-v6.9.1-linux-x64.tar.gz
348+
tar -zxf node-v6.9.4-linux-x64.tar.gz
319349
```
320350

321351
Set your PATH variable to include Node.js:
322352

323353
```
324-
export PATH=/opt/node-v6.9.1-linux-x64/bin:$PATH
354+
export PATH=/opt/node-v6.9.4-linux-x64/bin:$PATH
325355
```
326356

327-
### 4.2 Install the add-on
357+
### 4.3 Install the add-on
328358

329359
Set required Oracle environment variables, such as `ORACLE_HOME` by
330360
executing:
@@ -370,10 +400,7 @@ npm install oracledb
370400
If you are installing with `sudo`, you may need to use `sudo -E` to
371401
preserve the environment variable values.
372402
373-
Note: A compiler supporting C++11 is required when building with
374-
Node.js 4 or later, otherwise the NAN component will fail to build.
375-
376-
### 4.3 Run an example program
403+
### 4.4 Run an example program
377404
378405
Set `LD_LIBRARY_PATH` to the Oracle library directory, if it was not
379406
set by `oraenv` or `oracle_env.sh`:
@@ -474,9 +501,9 @@ Otherwise follow the instructions below for Instant Client 12.1.
474501
475502
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
476503
477-
### 6.1 Install Xcode
504+
### 6.1 Install Prerequisites
478505
479-
Building node-oracledb requires Xcode from the Mac App store.
506+
Install Xcode from the Mac App store.
480507
481508
### 6.2 Install Node.js
482509
@@ -557,20 +584,26 @@ see
557584
558585
## <a name="instwin"></a> 7. Node-oracledb Installation on Windows
559586
587+
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
588+
560589
**Note**: An Oracle Technology Network article
561590
[Installing node-oracledb on Microsoft Windows](https://community.oracle.com/docs/DOC-931127)
562591
has step-by-step Windows installation instructions that you can
563592
alternatively refer to.
564593
565-
Questions and issues can be posted as [GitHub Issues](https://github.com/oracle/node-oracledb/issues).
566-
567-
### 7.1 Install required tools
594+
### 7.1 Install Prerequisites
568595
569596
Install a C/C++ build environment such as Microsoft Visual
570-
Studio 2012. Compilers supported by Oracle libraries are found in
597+
Studio 2013. To build with Node 6 or later, use VS 2015. Compilers supported by Oracle libraries are found in
571598
[Oracle documentation](https://docs.oracle.com/en/database/) for each version, for example
572599
[Oracle Database Client Quick Installation Guide 12c Release 1 (12.1) for Microsoft Windows x64 (64-Bit)](https://docs.oracle.com/database/121/NXCQI/toc.htm#NXCQI108).
573600
601+
The `PATH` variable needs to include the appropriate Visual Studio
602+
redistributables for the Oracle client. This should be part of your VS
603+
install. Specifically, if you use Oracle client 11.2 then
604+
the [Visual Studio 2005 redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=18471) is required. The Oracle client 12.1 requires the
605+
[Visual Studio 2010 redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads#bookmark-vs2010).
606+
574607
Install the Python 2.7 MSI from
575608
[www.python.org](https://www.python.org/downloads). Select the
576609
customization option to "Add python.exe to Path".
@@ -581,7 +614,7 @@ during build and run time. Otherwise use a 64-bit Node.js with a
581614
582615
### 7.2 Install Node.js
583616
584-
Install the 64-bit Node.js MSI (e.g. node-v6.9.1-x64.msi) from
617+
Install the 64-bit Node.js MSI (e.g. node-v6.9.4-x64.msi) from
585618
[nodejs.org](http://nodejs.org/). Make sure the option to
586619
add the Node and npm directories to the path is selected.
587620
@@ -805,10 +838,6 @@ npm install oracledb
805838
806839
Note: The version of `make` should be GNU Make 4.1-1 or above.
807840
808-
Note: A compiler supporting C++11 (such as GCC 4.8) is required when
809-
building with Node.js 4.x or later, otherwise the NAN component will
810-
fail to build.
811-
812841
### 9.4 Run an example program
813842
814843
Download the

0 commit comments

Comments
 (0)