How can I fix this PDL installation? - macos

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.

Related

Some wrong with curl in mac. About _OpenSSL_version_num Symbol

I want to install brew in my macbook pro. but I get some error while install it by curl(curl not support https),and I install openssl(version 1.1.0e) again. Then, I remake and reinstall the curl(version 7.52.1) project. And now, curl run with this error info.
dyld: lazy symbol binding failed: Symbol not found: _OpenSSL_version_num
Referenced from: /usr/local/lib/libcurl.4.dylib
Expected in: flat namespace
dyld: Symbol not found: _OpenSSL_version_num
Referenced from: /usr/local/lib/libcurl.4.dylib
Expected in: flat namespace
My question is how to uninstall the curl clear? And how to resolve my problem?
I resolve that by delete all files about openssl and curl under the folder(/usr/local). And it looks like the openssl and curl back to the default of mac.And I can use curl and openssl normally now.

pg 0.14.1: dyld: lazy symbol binding failed: Symbol not found: _PQconnectdb

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.

Trying to compile GnuPG-2.1.1 on OS X Yosemite 10.10.1

While trying to build the latest GnuPG (2.1.1 modern), my build fails when trying to link t-stringhelp. make outputs:
ld: warning: ignoring file libcommon.a, file was built for archive which is not the architecture being linked (x86_64): libcommon.a
Undefined symbols for architecture x86_64:
"_compare_filenames", referenced from:
_main in t-stringhelp.o
"_make_absfilename_try", referenced from:
_main in t-stringhelp.o
"_make_filename_try", referenced from:
_main in t-stringhelp.o
"_percent_escape", referenced from:
_main in t-stringhelp.o
"_strconcat", referenced from:
_main in t-stringhelp.o
"_xstrconcat", referenced from:
_main in t-stringhelp.o
I don't know how to fix this as libcommon is part of the source, so it should build fine. When building with CFLAGS="-m64" (-arch x86_64 does nothing), I get this:
ld: warning: ignoring file ../common/libgpgrl.a, file was built for archive which is not the architecture being linked (x86_64): ../common/libgpgrl.a
Undefined symbols for architecture x86_64:
"_gnupg_rl_initialize", referenced from:
_main in gpg.o
I've also rebuilt all the depandancies (as I built them on Mavericks), except pinentry, as it can't find libiconv which is also installed. My configure outputs that its target is Darwin (x86_64-apple-darwin14.0.0), so this should work. I have also got all the latest prerequisites, tried to install everything in its own directory (--prefix=/usr/local/gnupg-2.1.1), build all the dependancies and GnuPG as 32 bits (again, fails on same error), created a separate build folder and tried to build in there, but only one thing so far has solved the error: looking at how libgpgrl.a is being built - it's only component is common/gpgrlhelp.c - so I cd'ed into g10 and tried to build gpg2, replacing ../common/libgpgrl.a with ../common/gpgrlhelp.o, the lib common.a with all of its object files, for all the libraries that didn't work. Then some programs weren't linking to libksba libgcrypt and libassuan, so I changed the Makefiles, so that they could link. I can now compile all the code well, I installed everything, but I get a new error, when I try to run gpg2:
dyld: lazy symbol binding failed: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
dyld: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
I have everything in my path, which is:
/usr/local/gnupg-2.1.1/bin:/usr/local/gnupg-2.1.1/lib:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
I could compile GnuPG-2.0.22 on Mavericks, but no version of GnuPG builds on Yosemite.
Please help, I'm really confused.
I’ve been running GnuPG 2.1 on Yosemite 10.10.2 (the latest public beta of as of this writing) for about a week and it’s been fine.
You can follow these directions for using brew tap or you can use the raw URL: brew install https://github.com/mtigas/homebrew-gpg21/raw/master/Formula/gnupg2.rb.
Note this formula installs GnuPG 2.1; not GnuPG 2.1.1, the version originally asked about. I can confirm this bug where gpg2 --refresh-keys fails with some keyservers using 2.1 (apparently fixed in 2.1.1) but it’ll get you 90% there.
It shouldn’t be hard to update the formula to install 2.1.1.
Update
Someone submitted a pull request for GNuPG 2.1.1 support—I just tried it and it worked great. Short answer: brew install https://raw.githubusercontent.com/calebthompson/homebrew-gpg21/2.1.1/Formula/gnupg2.rb.
Personally, I would install homebrew, which is a one-liner pasted from their website (http://brew.sh) then do
brew install gnupg
If therw are any problems, run
brew doctor
and heed the good doctor's advice.
Turns out I had a ranlib in /usr/local/bin/ranlib. It was broken, I don't know how it got there (I did try to build gcc at some point, it doesn't support make uninstall, so that's probably why). I just ran:
sudo mv /usr/local/ranlib /usr/local/ranlib_old
Then I just rebuilt all the dependancies, and it worked!

libiconv.2.dylib not found

I get this error on my Mac OS Lion when I use gcc make:
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: /opt/local/lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
./configure.sh: line 364: 18386 Trace/BPT trap: 5 $QTDIR/bin/qmake "$SRCDIR/$product.pro"
qmake failed
Note: I installed Macports in my machine. This used to work before, is this a known issue with MacPorts?
you can use the built in libiconv by selecting your target, going to the Build Phases tab and adding it to the link libraries and frameworks build phase.
as a general rule if you are missing linker symbols you can look up the symbol in your project and see what header they are from, and you can then usually figure out the appropriate library or framework.
in this case it tells you what library it is expecting...
you will want to use the built in version for a dynamic library, because with default linker flags, if this built product were to get moved to another computer it would try to resolve the symbols at run time in that location, and crash.

dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib

I've gotten MDB-Tools compiled for OSX, but when I try to run a sample command line program on another computer I get this error:
dyld: Library not loaded: /opt/local/lib/libglib-2.0.0.dylib
Referenced from: /Users/dev/mdb/mdb-test
Reason: image not found
Trace/BPT trap: 5
I believe that this means that the target system is missing a library and I think its something to do with linkage, but I'm not exactly positive how to go about fixing this. Could anyone point me in the right direction?
The /opt/local directory is typically used by MacPorts. Your compiled program has a dependency on glib from MacPorts. You either need to install that on the machines where you want to run your program or you need to bundle together your program and all of the libraries it depends on.
Check Apple's Dynamic Library Programming Topics.
Yes, I had hit similar issue while upgrading vim on Mac.
$ vi linkedlist.cc
dyld: Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/Python
Referenced from: /usr/local/bin/vim
Reason: image not found
Abort trap: 6
To solve the problem, I tried to upgrade packages.
$ brew update
Already up-to-date.
$ brew upgrade
It started working after doing upgrades.

Resources