From b828b727b2c92db448f5412a90934f6b535c9373 Mon Sep 17 00:00:00 2001 From: Thierry Bourrillon Date: Wed, 24 Aug 2016 23:48:46 +0200 Subject: [PATCH 1/2] added ocilib & oracle instant client library --- debian-bootstrap.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 166af4e7..9123bd9c 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -134,3 +134,24 @@ update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10 # GHC 8.0 requires LLVM 3.7 tools (specifically, llc-3.7 and opt-3.7). update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-3.7" 50 update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-3.7" 50 + +# install ocilib dependencies then build and install ocilib +cd /tmp \ + && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \ + && dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \ + && rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \ + && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \ + && dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \ + && rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \ + && wget https://github.com/vrogier/ocilib/archive/v4.2.1.tar.gz \ + && tar xvf v4.2.1.tar.gz \ + && cd /tmp/ocilib-4.2.1 \ + && ./configure --with-oracle-import=linkage \ + --with-oracle-charset=ansi \ + --with-oracle-headers-path=/usr/include/oracle/12.1/client64 \ + --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \ + && make \ + && make install \ + && ldconfig /usr/local/lib \ + && cd \ + && rm -rf /tmp/ocilib-4.2.1 From 299ab5aa47fd851f5b8a0442b3721726ab9b900e Mon Sep 17 00:00:00 2001 From: Thierry Bourrillon Date: Thu, 25 Aug 2016 16:27:51 +0200 Subject: [PATCH 2/2] added ld.so.conf.d files for oracle and ocilib, added missing libaio1 dependency --- debian-bootstrap.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian-bootstrap.sh b/debian-bootstrap.sh index 9123bd9c..384d44b7 100755 --- a/debian-bootstrap.sh +++ b/debian-bootstrap.sh @@ -42,6 +42,7 @@ apt-get install -y \ freeglut3-dev \ git \ libadns1-dev \ + libaio1 \ libasound2-dev \ libblas-dev \ libbz2-dev \ @@ -152,6 +153,8 @@ cd /tmp \ --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \ && make \ && make install \ - && ldconfig /usr/local/lib \ && cd \ - && rm -rf /tmp/ocilib-4.2.1 + && rm -rf /tmp/ocilib-4.2.1 \ + && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \ + && echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \ + && ldconfig