Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
0
votes
0
answers
430
views
Why does my DYLD_LIBRARY_PATH makes dynamic linker see a dylib that`ls` does not show me?
How did adding `/usr/lib/` to my DYLD_LIBRARY_PATH cause this dynamic linking problem on my MacOS Ventura M1 MBP? I had set `export DYLD_LIBRARY_PATH="...:/usr/lib:..."` in my `.bash_profile`. ``` $ xz --version dyld[52238]: Symbol not found: _lzma_cputhreads Referenced from: /opt/homebrew/Cellar/xz...
How did adding
/usr/lib/
to my DYLD_LIBRARY_PATH cause this dynamic linking problem on my MacOS Ventura M1 MBP?
I had set export DYLD_LIBRARY_PATH="...:/usr/lib:..."
in my .bash_profile
.
$ xz --version
dyld: Symbol not found: _lzma_cputhreads
Referenced from: /opt/homebrew/Cellar/xz/5.4.3/bin/xz
Expected in: /usr/lib/liblzma.5.dylib
Abort trap: 6
$ otool -L /opt/homebrew/Cellar/xz/5.4.3/bin/xz
/opt/homebrew/Cellar/xz/5.4.3/bin/xz:
/opt/homebrew/Cellar/xz/5.4.3/lib/liblzma.5.dylib (compatibility version 10.0.0, current version 10.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
Unsetting this variable fixed my immediate problem.
$ DYLD_LIBRARY_PATH="" xz --version
xz (XZ Utils) 5.4.3
liblzma 5.4.3
However, looking in /usr/lib
, I cannot find why my system thinks there was a version of liblzma in /usr/lib
at all.
$ ls /usr/lib | grep 'liblzma'
$ find /usr/lib -name '*liblzma*'
$
I could understand seeing these symptoms if there was a version of liblzma in that directory, but there does not appear to be. /usr/lib
was neither the first nor the last path in that list, so I don't understand why the failure would manifest that way in particular. So why did having that directory on my DYLD_LIBRARY_PATH
cause my system trying to link to a dylib in that directory, even though said dylib does not exist at that location?
Jason Hemann
(123 rep)
Jun 29, 2023, 12:39 PM
• Last activity: Jun 30, 2023, 07:35 AM
1
votes
2
answers
1081
views
Find a shared library that isn't in its stated location
I am writing c++ code, and using cmake to compile the application. I want to add the dylib (libraries) to the Frameworks folder. Macdeployqt does not find them all. I have written my own python script to try and find most, but a few still elude me. Here is a short list of what I still can't find: De...
I am writing c++ code, and using cmake to compile the application. I want to add the dylib (libraries) to the Frameworks folder. Macdeployqt does not find them all.
I have written my own python script to try and find most, but a few still elude me.
Here is a short list of what I still can't find:
Dependency Not Found! /usr/lib/libz.1.dylib
Dependency Not Found! /usr/lib/libiconv.2.dylib
Dependency Not Found! /usr/lib/libbz2.1.0.dylib
Dependency Not Found! /usr/lib/libexpat.1.dylib
Dependency Not Found! /usr/lib/libresolv.9.dylib
Dependency Not Found! /usr/lib/libxml2.2.dylib
Dependency Not Found! /usr/lib/libsasl2.2.dylib
I usually use brew to install (which I assume is in /usr/local/Cellar by brew --prefix and Cellar), I have so far recursively searched:
/usr/local/opt/**/{lib_name}
/usr/local/Cellar/**/{lib_name}
Where the "**" can be any set of folders and names. Where else can I look, it is not in /usr/local/lib where it states it should be. Even a symlink would be useful.
I need to find these files, how can I do that, even manually would be okay, but i'd prefer some script? Somehow the application can find these on my own computer when run, but otool lists me places (/usr/local/lib) where it cannot be found!
msj121
(163 rep)
Apr 20, 2023, 04:33 PM
• Last activity: Apr 20, 2023, 10:20 PM
1
votes
0
answers
83
views
g++ setting proper @rpath when building SFML
I'm trying to build an SFML sample without xcode (for reasons :-)). The prebuilt samples comes with: ``` pong> otool -L pong pong: @rpath/sfml-audio.framework/Versions/2.5.1/sfml-audio (compatibility version 2.5.0, current version 2.5.1) @rpath/sfml-graphics.framework/Versions/2.5.1/sfml-graphics (c...
I'm trying to build an SFML sample without xcode (for reasons :-)).
The prebuilt samples comes with:
pong> otool -L pong
pong:
@rpath/sfml-audio.framework/Versions/2.5.1/sfml-audio (compatibility version 2.5.0, current version 2.5.1)
@rpath/sfml-graphics.framework/Versions/2.5.1/sfml-graphics (compatibility version 2.5.0, current version 2.5.1)
@rpath/sfml-window.framework/Versions/2.5.1/sfml-window (compatibility version 2.5.0, current version 2.5.1)
@rpath/sfml-system.framework/Versions/2.5.1/sfml-system (compatibility version 2.5.0, current version 2.5.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 19.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
When I build it myself (build command follows), I rather obtain:
pong> otool -L a.out
a.out:
@rpath/libsfml-system.2.5.dylib (compatibility version 2.5.0, current version 2.5.1)
@rpath/libsfml-window.2.5.dylib (compatibility version 2.5.0, current version 2.5.1)
@rpath/libsfml-graphics.2.5.dylib (compatibility version 2.5.0, current version 2.5.1)
@rpath/libsfml-audio.2.5.dylib (compatibility version 2.5.0, current version 2.5.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
This prevents my built version from running, as it fails to load the library. How would I tell g++
to generate the same @rpath
s as those prebuilt?
The build command I used is:
g++ Pong.cpp -I ../../include -L ../../lib/ -lsfml-system -lsfml-window -lsfml-graphics -lsfml-audio
In case this makes any difference, this is on Ventura.
Jeffrey
(111 rep)
Mar 25, 2023, 06:49 PM
• Last activity: Mar 25, 2023, 08:33 PM
2
votes
1
answers
1251
views
How to debug missing libraries on macOS?
I'm trying to figure out why a binary isn't linking a shared library. On Linux the standard way to do this is `LD_DEBUG=libs` that shows the path of all linked libraries, but this isn't producing any output for me. I've read several articles recommending this on macOS, so was it removed or is there...
I'm trying to figure out why a binary isn't linking a shared library. On Linux the standard way to do this is
LD_DEBUG=libs
that shows the path of all linked libraries, but this isn't producing any output for me. I've read several articles recommending this on macOS, so was it removed or is there some trick to using it? I'm running on Catalina and I've tried both bash and zsh shells.
Example from macOS:
$ LD_DEBUG=libs uptime
19:18 up 10:06, 4 users, load averages: 2.00 2.21 2.04
Example from Linux:
$ LD_DEBUG=libs uptime
25453: find library=libprocps.so.7 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libprocps.so.7
25453:
25453: find library=libdl.so.2 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libdl.so.2
25453:
25453: find library=libc.so.6 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libc.so.6
25453:
25453: find library=libsystemd.so.0 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libsystemd.so.0
25453:
25453: find library=librt.so.1 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/librt.so.1
25453:
25453: find library=liblzma.so.5 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/liblzma.so.5
25453:
25453: find library=liblz4.so.1 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/liblz4.so.1
25453:
25453: find library=libgcrypt.so.20 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libgcrypt.so.20
25453:
25453: find library=libpthread.so.0 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libpthread.so.0
25453:
25453: find library=libgpg-error.so.0 ; searching
25453: search cache=/etc/ld.so.cache
25453: trying file=/lib/arm-linux-gnueabihf/libgpg-error.so.0
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libpthread.so.0
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libc.so.6
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libgpg-error.so.0
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libgcrypt.so.20
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/liblz4.so.1
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/liblzma.so.5
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/librt.so.1
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libsystemd.so.0
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libdl.so.2
25453:
25453:
25453: calling init: /lib/arm-linux-gnueabihf/libprocps.so.7
25453:
25453:
25453: calling init: /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so
25453:
25453:
25453: initialize program: uptime
25453:
25453:
25453: transferring control: uptime
25453:
19:17:22 up 22:36, 3 users, load average: 0.00, 0.00, 0.00
Elliott
(3049 rep)
Jan 13, 2021, 12:22 AM
• Last activity: Dec 8, 2022, 05:32 PM
0
votes
1
answers
170
views
Can I use a 3rd party GPL2+/LGPL2+ library in an MPL 2 licenced iOS app?
I'm thinking of using libmpv to provide video playback in my MPL 2 Flutter app. I know that Apple is weird about GPL stuff (and using GPL stuff in a greater work is awkward), so I was just wondering if I was actually allowed to. Here's the source code if it matters: https://github.com/UnicornsOnLSD/...
I'm thinking of using libmpv to provide video playback in my MPL 2 Flutter app. I know that Apple is weird about GPL stuff (and using GPL stuff in a greater work is awkward), so I was just wondering if I was actually allowed to.
Here's the source code if it matters: https://github.com/UnicornsOnLSD/finamp
UnicornsOnLSD
(143 rep)
Aug 1, 2021, 11:26 AM
• Last activity: Aug 1, 2021, 11:43 AM
2
votes
0
answers
1140
views
Running 32 bit apps in Catalina using Mojave libs and frameworks
I recently read this [post][1] on netkas.org about running 32 bit command line apps on Catalina using Mojave 32+64bit libraries and frameworks, adding to the `nvram boot-args` the option `no32exec=0`. I extracted with Pacifist the `/usr/lib`, `/System/Library/Frameworks` and `/System/Library/Private...
I recently read this post on netkas.org about running 32 bit command line apps on Catalina using Mojave 32+64bit libraries and frameworks, adding to the
nvram boot-args
the option no32exec=0
.
I extracted with Pacifist the /usr/lib
, /System/Library/Frameworks
and /System/Library/PrivateFrameworks
folders from the Mojave installation app to ~/.mojave and then tried to run this 32 bit macOS app with the following terminal command:
$ DYLD_ROOT_PATH=~/.mojave /Volumes/Lazesoft\ Mac\ Data\ Recovery/Lazesoft\ Mac\ Data\ Recovery.app/Contents/MacOS/Lazesoft\ Mac\ Data\ Recovery
Here is what I get running it:
2020-06-08 17:26:18.630 Lazesoft Mac Data Recovery[1881:56237] /Volumes/Lazesoft Mac Data Recovery/Lazesoft Mac Data Recovery.app
2020-06-08 17:26:18.630 Lazesoft Mac Data Recovery[1881:56237] /Volumes/Lazesoft Mac Data Recovery/Lazesoft Mac Data Recovery.app/Contents/MacOS/ifsui
2020-06-08 17:26:18.632 Lazesoft Mac Data Recovery[1881:56237] Error Creating Initial Authorization: -60008
2020-06-08 17:26:18.632 Lazesoft Mac Data Recovery[1881:56237] AuthorizationExecuteWithPrivileges failed!
Trying to run ifsui
from the same app bundle I get the app to open in the dock but nothing appears on screen and this is what I get on the terminal:
_RegisterApplication(), FAILED TO REGISTER PROCESS WITH CPS/CoreGraphics in WindowServer, err=-304
2020-06-08 17:21:38.555 ifsui[1836:52747] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
I know I'm probably asking something that cannot really be done, but is there any way to make this workaround work with more than command-line programs?
gio91ber
(171 rep)
Jun 8, 2020, 03:40 PM
• Last activity: Jul 10, 2021, 01:34 PM
2
votes
2
answers
1578
views
Can "ld" add the rpaths automatically to an executable if it can find the needed dylibs at link time?
The question is in the title, but anyway, let me explain it a bit more: The most accepted way for correctly defining the ***install name*** for a dylib in MacOS is by making it relative to the `rpath`. For example: otool -L ./LLVM/7.0.0/lib/libomp.dylib ./LLVM/7.0.0/lib/libomp.dylib: @rpath/libomp.d...
The question is in the title, but anyway, let me explain it a bit more:
The most accepted way for correctly defining the ***install name*** for a dylib in MacOS is by making it relative to the
rpath
. For example:
otool -L ./LLVM/7.0.0/lib/libomp.dylib
./LLVM/7.0.0/lib/libomp.dylib:
@rpath/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
Here, libomp.dylib
has @rpath/libomp.dylib
as its ***install name***. So far so good.
The problem is when you create an executable linked to such a dylib. Even if you pass the correct -L/path/to/libomp.dylib
flag at link time, so that ld
can **successfully** link the executable, then you try to execute it, and obviously you get the following:
dyld: Library not loaded: @rpath/libomp.dylib
Referenced from: mydumbexecutable
Reason: image not found
Abort trap: 6
This of course can be fixed by using install_name_tool
on either the dylib (changing its ***install name*** so that it doesn't depend on the rpath
, and linking the executable again, but this is not considered good practice), or, the recommended way, to use install_name_tool
on the executable, adding to it the proper rpath
so that the dylib can be found.
But... just wondering... isn't there a flag in ld
that automatically adds the rpath
for you? I mean, if ld
is able to link the executable because it **did** find the dylibs, why cannot automatically store the proper rpath
in the executable?
I understand this should be optional behaviour, as sometimes you prefer to define the rpaths
yourself, but... a flag for doing it automatically would make my life a lot easier.
cesss
(171 rep)
Nov 24, 2019, 03:42 PM
• Last activity: Apr 18, 2021, 03:45 AM
9
votes
2
answers
6974
views
How to find which shared library is missing?
When I use `ldd` on Linux it tells me right away if something is missing, i.e. ``` ldd -d some_lib.so libexample.so => not found libex.2.so => not found libm.so.6 => /lib/libm.so.6 (0xf5860000) libdl.so.2 => /lib/libdl.so.2 (0xf785b000) libc.so.6 => /lib/libc.so.6 (0xf78a9000) /lib/ld-linux.so.2 (0x...
When I use
ldd
on Linux it tells me right away if something is missing, i.e.
ldd -d some_lib.so
libexample.so => not found
libex.2.so => not found
libm.so.6 => /lib/libm.so.6 (0xf5860000)
libdl.so.2 => /lib/libdl.so.2 (0xf785b000)
libc.so.6 => /lib/libc.so.6 (0xf78a9000)
/lib/ld-linux.so.2 (0x46b4c000)
On Mac OS there is no ldd
and people recommend using otool -L
, but that shows which shared libraries are expected, not weather or not they are there. Another approach would be to use dtruss
, but it requires sudo, and it least in my experience the application behaves very differently when it is being dtrussed, and it fails for an entirely different reason (and before it gets to trying to load the troublesome .dylib).
So if you suspect that a shared library is missing, what is the standard approach to finding which one it is on the Mac?
Maxim
(213 rep)
Dec 19, 2019, 11:14 PM
• Last activity: Jan 4, 2020, 05:22 PM
2
votes
1
answers
5067
views
How to see library search paths MacOS?
There are two Macs and one of them finds a certain dylib when I dlopen it and another one doesn't. Seems like the library search paths are different, but DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH are empty on both machines. How can I see what paths `dlopen` searches?
There are two Macs and one of them finds a certain dylib when I dlopen it and another one doesn't. Seems like the library search paths are different, but DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH are empty on both machines.
How can I see what paths
dlopen
searches?
Maxim
(213 rep)
Nov 27, 2019, 03:58 PM
• Last activity: Nov 27, 2019, 04:15 PM
8
votes
3
answers
31106
views
Trying to force update_dyld_shared_cache but having some errors
I am trying to force the update of my dyld shared cache using the command sudo update_dyld_shared_cache -root / -force But after a while I see a bunch of errors like this, related to `spindump`: >update_dyld_shared_cache[719] : Unable to unlink //var/db/spindump/OLDDSC-E2D77243-3FD9-32E5-AE64-350690...
I am trying to force the update of my dyld shared cache using the command
sudo update_dyld_shared_cache -root / -force
But after a while I see a bunch of errors like this, related to
spindump
:
>update_dyld_shared_cache : Unable to unlink //var/db/spindump/OLDDSC-E2D77243-3FD9-32E5-AE64-3506904D5579: 1 Operation not permitted
How do I fix this?
I am on El Capitan.
Duck
(2572 rep)
Nov 26, 2015, 02:22 PM
• Last activity: Nov 22, 2019, 11:33 AM
46
votes
8
answers
23220
views
Installing tmux but getting "dyld: Library not loaded Referenced from: /usr/"
I try to do brew install tmux it installs, but, probably due to previous failed and not fully removed non-brew attempts to install both it and libevent, when try to use tmux I get $ tmux dyld: Library not loaded: /usr/local/lib/libevent-2.0.5.dylib Referenced from: /usr/local/bin/tmux Reason: image...
I try to do
brew install tmux
it installs, but, probably due to previous failed and not fully removed non-brew attempts to install both it and libevent, when try to use tmux I get
$ tmux
dyld: Library not loaded: /usr/local/lib/libevent-2.0.5.dylib
Referenced from: /usr/local/bin/tmux
Reason: image not found
Trace/BPT trap: 5
I tried to install libevent but I got:
$ brew install libevent
Warning: libevent-2.0.21 already installed, it's just not linked
so I tried
$ brew link libevent
but I got
Linking /usr/local/Cellar/libevent/2.0.21...
Warning: Could not link libevent. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/libevent/2.0.21/include/event2/util.h
Target /usr/local/include/event2/util.h already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
so I tried
$ brew link --overwrite libevent
but I got
Linking /usr/local/Cellar/libevent/2.0.21...
Warning: Could not link libevent. Unlinking...
Error: Permission denied - /usr/local/include/event2/util.h
so I tried
$ sudo brew link --overwrite libevent
Password:
but I got
Error: Cowardly refusing to
sudo brew link
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
I'm stuck.
Michael Durrant
(17576 rep)
Apr 11, 2014, 12:39 AM
• Last activity: Aug 20, 2019, 09:12 AM
1
votes
1
answers
1043
views
Problem installing IguanaTex on Mac (can't find `.dylib` file)
I'm trying to install an experimental version of [IguanaTex](https://github.com/ray851107/IguanaTexMac) on my Mac. I'm stuck and need some help. Here are the directions: 1. *install AppleScript (`IguanaTex.scpt`)* mkdir -p ~/Library/Application\ Scripts/com.microsoft.Powerpoint cp ./IguanaTex.scpt ~...
I'm trying to install an experimental version of [IguanaTex](https://github.com/ray851107/IguanaTexMac) on my Mac. I'm stuck and need some help.
Here are the directions:
1. *install AppleScript (
IguanaTex.scpt
)*
mkdir -p ~/Library/Application\ Scripts/com.microsoft.Powerpoint
cp ./IguanaTex.scpt ~/Library/Application\ Scripts/com.microsoft.Powerpoint/IguanaTex.scpt
This worked fine for me.
2. install IguanaTexHelper (libIguanaTexHelper.dylib
)
sudo mkdir -p '/Library/Application Support/Microsoft/Office365/User Content.localized/Add-Ins.localized'
sudo cp ./libIguanaTexHelper.dylib '/Library/Application Support/Microsoft/Office365/User Content.localized/Add-Ins.localized/libIguanaTexHelper.dylib'
**This is where I'm having an issue.** . I can't seem to find the file "libIguanaTexHelper.dylib
" anywhere, and I can't find anything online about it. I've already made sure that my computer is showing hidden files.
Can someone please help me clear this up?
Möbius Dickus
(113 rep)
Mar 13, 2019, 10:19 PM
• Last activity: Mar 14, 2019, 05:20 AM
2
votes
2
answers
1946
views
Brew doctor complains about 2 unbrewed dylibs (possibly remnants from Samsung Sidesync)
I've just found that brew doctor gives me the following error : Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: Unbrewed d...
I've just found that brew doctor gives me the following error :
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/LibSideSyncOSX9.dylib
/usr/local/lib/ss_conn_lib.dylib
I am suspected that these are remnants of Samsung Sidesync program that I tried to use recently but it never worked, so I uninstalled it (using iTrash).
Should I manually remove those two libraries or not(one of them is 1.7mb)?
Thank you.
skiabox
(987 rep)
Apr 15, 2016, 09:15 AM
• Last activity: Dec 15, 2018, 02:34 AM
2
votes
1
answers
1772
views
System Integrity Protection breaks DYLD_LIBRARY_PATH for python scripts
I have some custom modules that are generated using SWIG that are installed in a a local path eg: catkin_ws/devel/lib/python2.7/site-packages When I try to run a python script that uses one of these modules, I get an import error: "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions...
I have some custom modules that are generated using SWIG that are installed in a a local path eg:
catkin_ws/devel/lib/python2.7/site-packages
When I try to run a python script that uses one of these modules, I get an import error:
"/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named _mag_manip
I've figured out that this is due to the shebang at the top of the python script:
#!/usr/bin/env python
Because /usr/bin/env is protected by System Integrity Protection (SIP), the DYLD_LIBRARY_PATH environment variable is not loaded and some modules cannot be found. A fix is to replace the shebang with the hardcoded path of python ie:
#!/usr/local/bin/python
Since my code runs on Linux and Mac OSX, replacing the normal python shebang with a hardcoded path on mac is not a really good solution. Does anybody know what the best solution is here?
user3293204
(31 rep)
Jun 9, 2017, 10:32 AM
• Last activity: Dec 4, 2018, 11:02 PM
0
votes
1
answers
766
views
Is El Capitan preventing me from getting the Perl module DBD::Oracle working?
Let me start by saying I'm not traditionally a Mac user. I'm still trying to transition from Gentoo, where compiling everything from source was the default state, and the system wasn't actively trying to prevent me from doing "dangerous" things. I have a new machine running 10.11. I've gotten `sqlpl...
Let me start by saying I'm not traditionally a Mac user. I'm still trying to transition from Gentoo, where compiling everything from source was the default state, and the system wasn't actively trying to prevent me from doing "dangerous" things.
I have a new machine running 10.11. I've gotten
sqlplus
11.2.0.4 running, and am able to connect to a remote Oracle server with it. I now want to use DBD::Oracle
to connect in a Perl script. I was able to get DBD::Oracle
to compile/install by manually passing a version to Makefile.pl
rather than using CPAN (or, more specifically, cpanm
):
perl Makefile.pl -V 11.2
make
make install
However, when I run the script using the default Perl (5.18.2 located at /usr/bin/perl
), I get an error:
ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.
In case the issue lies with the system perl, I installed perlbrew
and then installed 5.22.0 into ~/perl5
. Using the perlbrew Perl, I get a different error:
dyld: lazy symbol binding failed: Symbol not found: _OCIAttrSet
Referenced from: /Users/jrittenh/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/darwin-2level/auto/DBD/Oracle/Oracle.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _OCIAttrSet
Referenced from: /Users/jrittenh/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/darwin-2level/auto/DBD/Oracle/Oracle.bundle
Expected in: dynamic lookup
Trace/BPT trap: 5
I've tried:
* both 32-bit and 64-bit Oracle libraries
* symlinking libraries from the specific version (libclntsh.dylib.11.1 => libclntsh.dylib
)
* fixing hard-coded paths to /ade
* creating a 'mesg' folder and made it writeable in $ORACLE_HOME
* setting ORACLE_HOME
, LD_LIBRARY_PATH
, DYLD_LIBRARY_PATH
, and PATH
to include /usr/local/oracle_client
from /etc/profile
, /etc/bashrc/
, ~/.bashrc
, and ~/.bash_profile
Is there something else I can try? What am I missing?
ND Geek
(153 rep)
Nov 18, 2015, 07:18 PM
• Last activity: Aug 23, 2018, 02:00 AM
2
votes
2
answers
8535
views
Multiple "copies" of audiobooks in iTunes
I am using iTunes on Windows 10. There are multiple "copies" (air quotes) of most (not all) audiobooks in iTunes. I used air quotes because when I search the PC for the books, there are only single instances. Another post (https://apple.stackexchange.com/questions/64097/why-does-itunes-create-multip...
I am using iTunes on Windows 10.
There are multiple "copies" (air quotes) of most (not all) audiobooks in iTunes. I used air quotes because when I search the PC for the books, there are only single instances.
Another post (https://apple.stackexchange.com/questions/64097/why-does-itunes-create-multiple-exact-copies-of-my-music-files-and-hide-them-fro) asked a similar question about music files. The answer for that post alluded to a playlist problem.
But (a) I do NOT have any playlists for my audiobooks, and (b) that post is old, dating to Sept. 2012. I am running version 12.7.2.
When I select a copy of a book and drag it to my iphone, I can see that the copies are numbered 1, 2, 3, ...
When I try to delete any one of those copies, then all copies are deleted.
What can I do clean up the lists so that I only see one copy of the book?
RJo
(481 rep)
Dec 26, 2017, 01:26 AM
• Last activity: Jul 31, 2018, 03:04 PM
16
votes
1
answers
8674
views
Unable to set DYLD_FALLBACK_LIBRARY_PATH in shell on OSX 10.11.1
In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory containing the libraries. Under 10.11.1, bash seems to ignore attempts to set this environment variable: $ sh...
In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory containing the libraries. Under 10.11.1, bash seems to ignore attempts to set this environment variable:
$ sh -x testscript.sh
+ DYLD_FALLBACK_LIBRARY_PATH=/Users/something/testinglibs
+ export DYLD_FALLBACK_LIBRARY_PATH
+ exec printenv
and DYLD_FALLBACK_LIBRARY_PATH is not present in printenv's output.
Is this a security-related hack in 10.11's shell? I haven't been able to find this change documented in man pages or online.
Guy
(161 rep)
Oct 27, 2015, 01:11 PM
• Last activity: Jul 19, 2018, 10:41 AM
2
votes
1
answers
562
views
Gnucash and macports conflicting libgio-2.0.0.dylib
I have macports 2.5.2 already installed. I have then installed Gnucash 3.2 dmg from gnucash.org. When I run gnucash, I have the error: > objc[93365]: Class GNotificationCenterDelegate is implemented in both > /Applications/Gnucash.app/Contents/Resources/lib/libgio-2.0.0.dylib > (0x10c333670) and /op...
I have macports 2.5.2 already installed.
I have then installed Gnucash 3.2 dmg from gnucash.org.
When I run gnucash, I have the error:
> objc: Class GNotificationCenterDelegate is implemented in both
> /Applications/Gnucash.app/Contents/Resources/lib/libgio-2.0.0.dylib
> (0x10c333670) and /opt/local/lib/libgio-2.0.0.dylib (0x117a41620). One
> of the two will be used. Which one is undefined.
Segmentation fault:
> 11
/opt/local/lib/libgio-2.0.0.dylib belongs to glib2 macports package.
**If I rename /opt/local/lib/libgio-2.0.0.dylib, gnucash works fine**. But this can't be a solution.
I've also tried to set DYLB_LIBRARY_PATH to
> /Applications/Gnucash.app/Contents/Resources/lib
But this way I have the error
> Segmentation fault: 11
Is there a way to run gnucash while macports installed ?
Noury
(29 rep)
Jun 30, 2018, 01:15 PM
• Last activity: Jun 30, 2018, 05:49 PM
3
votes
0
answers
3205
views
dyld: Library not loaded, even though path is specified in Makefile
I have a Fortran program which I run on my macOS 10.12.6. The code is compiled using a Makefile, in which all the libraries included have their path included as well. For one of the libraries (and only one) my executable can't seem to be able to find it. My code compiles correctly but I get this run...
I have a Fortran program which I run on my macOS 10.12.6. The code is compiled using a Makefile, in which all the libraries included have their path included as well. For one of the libraries (and only one) my executable can't seem to be able to find it. My code compiles correctly but I get this runtime error at the beginning of the program:
dyld: Library not loaded: libslatec.so
Referenced from: path_to_PWD/exe/executable
Reason: image not found
Here's how I am adding my library:
LIB_SLATEC = -L$(HOME)/usr/lib/slatec/lib -lslatec
If I do
ls $HOME/usr/lib/slatec/lib
I get: libslatec.so
.
Running otool -L path_to_exe | grep slatec
I get: libslatec.so (compatibility version 0.0.0, current version 0.0.0)
. I see that there is no path specified there. If I copy the library into my $PWD
the code runs as expected. I have also tried adding the library path to LD_LIBRARY_PATH
but that did not change anything.
Any idea what the problem is?
solalito
(203 rep)
Dec 4, 2017, 07:46 AM
• Last activity: Dec 22, 2017, 11:58 AM
1
votes
0
answers
4721
views
Write write to /usr/lib on macOS Sierra
I'm on macOS Sierra 10.12.5, and trying to add a library to the `usr/lib` folder (for an OpenFrameworks project I'm working on). I've seen similar questions [here][1], [here][2], and [here][3]. However, none of the suggested answers seem to have any effect. On Sierra, it seems that when rebooting in...
I'm on macOS Sierra 10.12.5, and trying to add a library to the
usr/lib
folder (for an OpenFrameworks project I'm working on).
I've seen similar questions here , here , and here .
However, none of the suggested answers seem to have any effect. On Sierra, it seems that when rebooting in recovery mode, there is no longer any way to access a Terminal window (unless I'm mistaken), so System Integrity Protection can't be disabled by running csrutil disable
.
Does anyone have any suggestions?
narner
(111 rep)
May 31, 2017, 01:24 PM
Showing page 1 of 20 total questions