InstantClientTap / homebrew-instantclient

A tap of Mac Homebrew formulas for Oracle Instant Client.
MIT License
80 stars 39 forks source link

Installation of oracle 19 sqlldr failed #33

Closed domenicp61 closed 4 years ago

domenicp61 commented 4 years ago
$ cat ......./Library/Logs/Homebrew/instantclient-tools/01.install_name_tool
2020-05-06 15:00:06 +1000

/usr/bin/install_name_tool
-add_rpath
......./homebrew/lib
tools

error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: tools (No such file or directory)

HOMEBREW_VERSION: 2.2.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: e1f3b0b971dccb72780b2ef33fafde158cb3909e
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 317b27f86273ad232a54412371f4a4dd8a1900fb
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: ......./homebrew
HOMEBREW_REPOSITORY: ......./homebrew
HOMEBREW_CELLAR: ......./homebrew/Cellar
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.m9kdCle800/org.macosforge.xquartz:0
HOMEBREW_MAKE_JOBS: 12
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => ......./homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 10.0 build 1001
Git: 2.20.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_181, 1.8.0_141, 1.7.0_80
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j12
CMAKE_PREFIX_PATH: ......./homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2:/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:......./homebrew/Library/Homebrew/os/mac/pkgconfig/10.14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
ACLOCAL_PATH: ......./homebrew/share/aclocal
PATH: ......./homebrew/Library/Homebrew/shims/mac/super:/usr/bin:/bin:/usr/sbin:/sbin

$ unzip -v instantclient-tools--19.3.0.0.0dbru.zip
Archive:  instantclient-tools--19.3.0.0.0dbru.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    5780  Defl:N     2374  59% 02-23-2019 11:26 cb5e9337  instantclient_19_3/TOOLS_LICENSE
    1670  Defl:N      837  50% 09-06-2019 19:11 c741ccfd  instantclient_19_3/TOOLS_README
  715336  Defl:N   245148  66% 09-06-2019 19:11 4bf46b91  instantclient_19_3/exp
  228196  Defl:N    74794  67% 09-06-2019 19:11 589916ee  instantclient_19_3/expdp
  385436  Defl:N   136999  65% 09-06-2019 19:11 9cac78ed  instantclient_19_3/imp
  240444  Defl:N    79258  67% 09-06-2019 19:11 aa80b5c0  instantclient_19_3/impdp
   23252  Defl:N     6789  71% 07-04-2019 02:29 e45e5cdf  instantclient_19_3/libnfsodm19.dylib
 1868868  Defl:N   362522  81% 09-06-2019 19:11 eb858e56  instantclient_19_3/sqlldr
 1062136  Defl:N   301566  72% 09-06-2019 19:11 2c63edf7  instantclient_19_3/wrc
--------          -------  ---                            -------
 4531118          1210287  73%                            9 files

! No 'tools'

[stable] $ diff -u ./Library/Taps//instantclienttap/homebrew-instantclient/Formula/instantclient-tools.rb.orig ./Library/Taps//instantclienttap/homebrew-instantclient/Formula/instantclient-tools.rb
--- ./Library/Taps//instantclienttap/homebrew-instantclient/Formula/instantclient-tools.rb.orig 2020-05-07 09:17:44.000000000 +1000
+++ ./Library/Taps//instantclienttap/homebrew-instantclient/Formula/instantclient-tools.rb  2020-05-07 09:15:05.000000000 +1000
@@ -13,9 +13,18 @@

   def install
     if HOMEBREW_PREFIX.to_s != "/usr/local"
-      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "tools"
+      # original system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "tools"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "sqlldr"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "impdp"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "expdp"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "imp"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "exp"
+      system DevelopmentTools.locate("install_name_tool"), "-add_rpath", HOMEBREW_PREFIX/"lib", "wrc"
     end
     lib.install Dir["*.dylib"]
     bin.install %w[impdp expdp exp imp wrc sqlldr]
+    if MacOS.version == :catalina
+      bin.env_script_all_files(libexec, "DYLD_LIBRARY_PATH" => HOMEBREW_PREFIX/"lib")
+    end
   end
 end

[stable] $ brew reinstall instantclient-tools
==> Reinstalling instantclienttap/instantclient/instantclient-tools
==> Downloading https://download.oracle.com/otn_software/mac/instantclient/193000/instantclient-tools-macos.x64-19.3.0.0.0dbru.zip
Already downloaded: ......../Library/Caches/Homebrew/downloads/363ae83a1afaf22e2708b34e45b12efe3805a7ae2d361d5b6d5645368e1fd71e--instantclient-tools-macos.x64-19.3.0.0.0dbru.zip
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib sqlldr
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib impdp
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib expdp
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib imp
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib exp
==> /usr/bin/install_name_tool -add_rpath ......./homebrew/lib wrc
🍺  ......../homebrew/Cellar/instantclient-tools/19.3.0.0.0dbru: 9 files, 4.3MB, built in 2 seconds
kaukas commented 4 years ago

Normally homebrew lives under /usr/local. Your brew location is weird:

HOMEBREW_PREFIX: ......./homebrew

I am sorry, I don't know how to fix your case. If you find a fix yourself please let me know.

domenicp61 commented 4 years ago

Hi

Thanks for the email

Unfortunately I have a corporate mac book and my employer locks the machine down very tightly- my login doesn't have write permissions to /usr/local or sudo to admin. Hence the 'weird' brew location. The ...... were to mask my login on the corporate machine. My employer does not look kindly to user ids roaming around the internet - sorry if that confused you.

In the github issue I thought that I included the following 4 snippets:

For me the issue is resolved - I have a working oracle sqlldr and the data pump export and import binaries. I will just share the fixed brew formula with my work colleagues.

Thanks for your time

domenicp61

On Thu, 7 May 2020 at 16:50, Linas Juškevičius notifications@github.com wrote:

Normally homebrew lives under /usr/local. Your brew location is weird:

HOMEBREW_PREFIX: ......./homebrew

I am sorry, I don't know how to fix your case. If you find a fix yourself please let me know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InstantClientTap/homebrew-instantclient/issues/33#issuecomment-625065076, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPNCE26ZB4AFT6P6NV3W2DRQJK4HANCNFSM4M23U7NA .

kaukas commented 4 years ago

I did not realise that what you provided contains a diff (fixed the formatting now). Thank you very much! I'll apply the changes later.

kaukas commented 4 years ago

Fixed in https://github.com/InstantClientTap/homebrew-instantclient/commit/e8c17c2e2b8b551bd416da03ef55478a6419b387. Please let me know if you have any further issues!