[Interest] Use Oracle 11g with Qt5.1 on MacOS

Emmanuel Bourgerie manu at bourgerie.fr
Thu Nov 14 12:03:29 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> The preferred way would probably be to use relative paths and put
> the Oracle libs into your app bundle.

That makes more sense, I'll try the doc you gave me.

Thanks :)

Emmanuel Bourgerie
Web developer
Dublin, Ireland
(+353) 8 144 5278
http://bourgerie.fr/

Confus avec "BEGIN PGP SIGNED MESSAGE" ? http://weusepgp.info/fr
Confused with "BEGIN PGP SIGNED MESSAGE"? http://weusepgp.info/

On 13/11/2013 18:10, Till Oliver Knoll wrote:
> Am 13.11.2013 um 15:53 schrieb Emmanuel Bourgerie
> <manu at bourgerie.fr <mailto:manu at bourgerie.fr>>:
> 
>> Turns out those libraries are available in my instantclient
>> folder, which is aliased correctly (DYLD_LIBRARY_PATH).
> 
> Ah, that reminds me: according to e.g. 
> http://forums.macrumors.com/showthread.php?t=956258
> 
> on OS X you do /not/ have a dynamic lookup of shared libs in the
> sense that a predefined order of paths is checked for the existence
> of a certain shared library.
> 
> The path of a given library is always [1] "hard-coded" into the 
> executable/dependent library - that's where the
> "install_name_tool" comes into play which lets you set both a
> "library identifier" for the library as well as the path to it in
> the dependent binaries.
> 
> Refer e.g. to
> 
> http://osiris.laya.com/coding/dylib_linking.html
> 
> Also the Qt docs themselves explain how to "deploy on Mac":
> 
> http://qt-project.org/doc/qt-5.0/qtdoc/deployment-mac.html
> 
> What that means: even if you have a library in /usr/lib/foo.dynlib
> with an "identifier" "foo.dylib" (can't remember what "identifiers"
> usually look like - refer to docs), but that path is not compiled
> into your executable (or the hard-coded path was something else
> like /usr/LOCAL/lib/foo.dynlib) then foo.dynlib /won't/ be found!
> 
> Note that the paths can (and usually are) be relative to each
> other. That's why you can move around application "bundles" and
> they still execute.
> 
> So if you *really* want to have your Oracle libs under
> /usr/lib/wherever *and* you are sure that they will be exactly
> placed at /this/ location on every Mac you intend to deploy your
> application, then you need to change that path in all your
> libraries (including Qt libs, in case they refer to it - e.g. the
> plugin!) and executables that refer to it! -> install_name_tool.
> 
> The preferred way would probably be to use relative paths and put
> the Oracle libs into your app bundle.
> 
> 
> Anyway, that's how I have it roughly in mind. Details might be
> different ;)
> 
> [1] It /might/ be possible to circumvent that "hard-coded library
> path" and use a more flexible/Unix-like lib resolution with some
> linker flags, which would then also honour LD_LIBRARY_PATH and Co -
> but not sure.
> 
> 
> _______________________________________________ Interest mailing
> list Interest at qt-project.org 
> http://lists.qt-project.org/mailman/listinfo/interest
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)

iQEcBAEBAgAGBQJShK4BAAoJEKKGwafy1e1+kLMIAJpf0wC7nRubMB/Y6gt3vRWR
7WQjL9GstFwbKvptRmjvJsA4fJ4V3nzxzrf4Fwsy5N9QXVIuhmDxUA2ixHHi4R48
OCdpZW5I59KoI9p4EMz6vBDISzB8hctvzROULEuBs1rqpDK58CVY2kvxaWQ5ltyP
wtckXcOmpAGgwA/oUX2iShVYPPAOssJDw/t/YVMr5jxP4IFqFQaNZ48aoNOZL3Ab
OTEpa+NTMSArPDstw3Bu4t8BvEuTHMVocsR2muA19aBE3cJTCDXw9g8czejvUV1F
X1l4mVqvyk+VBeHdFRhOlQRo74BkP9bSBj+dUlgLq7JhfqT9y8EDbqQc3PuPV6M=
=LKw7
-----END PGP SIGNATURE-----



More information about the Interest mailing list