I'm running on a Macbook, OS X 10.6.4. I've installed the latest version of libusb 1.x and also libusb-compat. The example applications in libusb compile and run, no problems there so I am assuming that it's installed correctly. Libftdi also appears to install correctly, but it seems to be having trouble with libusb. I tried one of the example apps and I get this error message:
$ ./simple
dyld: lazy symbol binding failed: Symbol not found: _usb_init
Referenced from: /Users/Me/Downloads/libftdi-0.19/src/.libs/libftdi.1.dylib
Expected in: flat namespace
dyld: Symbol not found: _usb_init
Referenced from: /Users/Me/Downloads/libftdi-0.19/src/.libs/libftdi.1.dylib
Expected in: flat namespace
Trace/BPT trap
The assumption that libusb is to blame is because _usb_init is a libusb function, I found a post here that was along the same lines http://www.jedi.be/blog/2009/11/11/ruby-usb-libusb/ but for Ruby.
Trying to get things going with Pylibftdi,
Traceback (most recent call last):
File "blah/list_devices.py", line 4, in <module>
for device in Driver().list_devices():
File "/Library/Python/2.6/site-packages/pylibftdi/driver.py", line 61, in __init__
fdll = CDLL(ftdi_lib)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 345, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/usr/local/lib/libftdi.dylib, 6): Symbol not found: _usb_bulk_read
Referenced from: /usr/local/lib/libftdi.dylib
Expected in: flat namespace
in /usr/local/lib/libftdi.dylib
Note that to get anything to even run using Pyftdi I had to install libftdi for i386 rather than x86_64 as default (throws up mach-o errors) - however, even installing libftdi 'normally' gives the OSErrors above. Any suggestions would be greatly appreciated.
I believe with libftdi 0.19 you're supposed to use libusb 0.1 (atleast according to thier web page. http://www.intra2net.com/en/developer/libftdi/download.php). There's a port of libftdi out there to use libusb 1.0 if you want. I've been using it for SYNC and ASYNC Fifos and its been working great.
http://developer.intra2net.com/git/?p=libftdi-1.0
git://developer.intra2net.com/libftdi-1.0
Good luck
Related
Installing pymqi in a MacOS M1 Pro 12.1 Monterey, Python 3.9.9 in a virtualenv and the usual suspect appeared again:
Traceback (most recent call last):
File "/Users/a.gounaris/.virtualenvs/mxhub39/lib/python3.9/site-packages/pymqi/__init__.py", line 132, in <module>
from . import pymqe # type: ignore
ImportError: dlopen(/Users/a.gounaris/.virtualenvs/mxhub39/lib/python3.9/site-packages/pymqi/pymqe.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_MQBACK'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/a.gounaris/.virtualenvs/mxhub39/lib/python3.9/site-packages/pymqi/__init__.py", line 134, in <module>
import pymqe # type: ignore # Backward compatibility
ModuleNotFoundError: No module named 'pymqe'
All paths are in place /opt/mqm/bin:/opt/mqm/samp/bin and Python sees the env variable os.environ['DYLD_LIBRARY_PATH']=='/opt/mqm/lib64'
After reinstalling pymqi with --verbose flag, this warning showed up:
ld: warning: ignoring file /opt/mqm/lib64/libmqic_r.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Might be the root cause of the exception symbol not found in flat namespace '_MQBACK' in M1 Pro Silicon platforms ?
It says that ibmqic_r.dylib is ignored.
Would a new release of MacOS Toolkit build for macOS-arm64 solve the issue?
Another option - theoretically speaking - could be to run the build for macOS-x86_64 with Rosetta 2 as suggested in this post, I don't know how to do it..
Any help will be mostly appreciated.
I am trying to execute a python code using PyPy2 v5.10 on MacOS El Capitan 10.11.6. However, I keep getting this error during runtime.
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
Referenced from: /Users/macpro/Downloads/pypy2-v5.10.0-osx64/bin//libpypy-c.dylib
Expected in: flat namespace
dyld: Symbol not found: _clock_gettime
Referenced from: /Users/macpro/Downloads/pypy2-v5.10.0-osx64/bin//libpypy-c.dylib
Expected in: flat namespace
fish: './pypy contactTrace.py' terminated by signal SIGTRAP (Trace or breakpoint trap)
I have read from a few sources that its because El Capitan does not implement the clock but delcares it. Hence, one solution is to upgrade the software or comment out the declaration. Upgrading the software is not an option for me because I have a lot of other scripts running in that particular computer. I was trying to comment out the declaration but I am unable to find where I can comment it off. Also, will it really solve the issue? Or are there any more simpler solutions to it. I am not very familiar with the MacOS platform and am only using it for this project.
Thanks in advance!
That sounds like a wrongly linked libSystem.dylib, and that will be hard to fix (e.g. checking libs with otool and modifying lib with install_name_tool). However, there are newer versions of PyPy. Do you have tried them?
Running postgresql 9.4.5 and pg 0.14.1 on El Capitan, and experiencing the following error followed by an exit from the Rails console when performing the first query:
dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb
Referenced from: /Users/christian/Documents/Development/onelogin.com/vendor/bundle/gems/pg-0.14.1/lib/pg_ext.bundle
Expected in: flat namespace
dyld: Symbol not found: _PQconnectdb
Referenced from: /Users/christian/Documents/Development/onelogin.com/vendor/bundle/gems/pg-0.14.1/lib/pg_ext.bundle
Expected in: flat namespace
Trace/BPT trap: 5
Any ideas?
This means that the libpq library the gem was compiled against is missing or is no longer loadable for some reason. Oftentimes you'll need to reinstall PostgreSQL after an OS upgrade, or after installing a new version of the XCode command line tools.
You can look at the library the gem is trying to load like this (on OSX anyway):
file $(otool -L /Users/christian/Documents/Development/onelogin.com/vendor/bundle/gems/pg-0.14.1/lib/pg_ext.bundle | grep libpq | cut -f1 -d' ')
It should look something like this:
/usr/local/lib/libpq.5.dylib: Mach-O 64-bit dynamically linked shared library x86_64
My PostgreSQL is installed via Homebrew, so your path might be different, but it should at least show a shared library. If it looks okay, post what it says in a comment and I'll try to help further.
I have installed PDL on a Mac OS X (10.7.3) machine. Evidently the SciPDL installer places PDL.pm in /Library/Perl/5.12/darwin-thread-multi-2level, so I added
use lib '/Library/Perl/5.12/darwin-thread-multi-2level';
at the top of my test script. I now get these errors:
dyld: lazy symbol binding failed: Symbol not found: _Perl_Gthr_key_ptr
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core/Core.bundle
Expected in: flat namespace
dyld: Symbol not found: _Perl_Gthr_key_ptr
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core/Core.bundle
Expected in: flat namespace
Unfortunately these errors don't mean much to me. What do they mean? And what's the solution?
Use cpanm to install modules instead of the SciPDL installer. Install cpanm:
either bootstrap from the Web:
curl -L http://cpanmin.us | perl - --self-upgrade
or with the CPAN client that ships with Perl:
cpan App::cpanminus
Install PDL:
cpanm PDL
This compiles PDL for your specific platform, making sure all the paths are set properly.
I am trying to install SciPy following these instructions: http://www.scipy.org/Download
And constantly getting error to build them for OS X Lepeord 10.5.7:
dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /usr/lib/libaprutil-1.0.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
dyld: Symbol not found: _iconv_open
Referenced from: /usr/lib/libaprutil-1.0.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
Traceback (most recent call last):
File "setup.py", line 82, in
FULLVERSION += svn_version()
File "setup.py", line 74, in svn_version
raise ValueError("Error while parsing svn version ?")
ValueError: Error while parsing svn version ?
Is it absolutely necessary for you to build SciPy from source? It seems like it would be much easier to install SciPy on Mac OS X Leopard by using the SciPy Superpack Installer (which is mentioned on the SciPy download page). That is how I installed SciPy, and I've never had any problems with it.
The reason it's failing is that you have things installed in your /opt/local which are interfering with the system libraries. libiconv is installed in /usr/lib
MacPorts has a habit of messing up things. Unsetting the DYLD_LIBRARY_PATH when you run (and when you use) libraries like this would fix it.