How do I make Cucumber and RMagick play nice on Snow Leopard? - ruby-on-rails

I installed Snow Leopard and things have been going great, after a few re-installs. But now when I go to run cucumber, I get the error below, and I can't find anything conclusive through Google searches. Has anyone run into this, or maybe have some troubleshooting steps to try?
$ cucumber features
dyld: NSLinkModule() error
dyld: Library not loaded: /opt/local/lib/libfreetype.6.dylib
Referenced from: /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.10.0/lib/RMagick2.bundle
Reason: no suitable image found. Did find:
/opt/local/lib/libfreetype.6.dylib: can't map
/usr/local/lib/libfreetype.6.dylib: mach-o, but wrong architecture
Trace/BPT trap

You should check if rmagick is the correct version and compiled correctly for your new osx.

It resulted that the .dylib file was in /usr/X11/lib/libfreetype.6.dylib
so it was just matter of copying it from there, or make a symbolic link:
cd /opt/local/lib/
ln -s /usr/X11/lib/libfreetype.6.dylib

Related

NCO, Library not loaded

I am trying to run the NCO executable ncks in the terminal window. I found that I needed to create a .bashrc file to initially get started in addition to installing NCO from MacPorts. Now when I run ncks I get this error.
dhcp-v219-194:~ mlaf$ ncks
dyld: Library not loaded: #rpath/libssh2.1.dylib
Referenced from: /Users/matthewlaffin/anaconda/bin/ncks
Reason: image not found
Trace/BPT trap: 5
I am new to terminal and NCO but I have read that there could be an error in the path name which results in NCO not being able to find the Library. Does anyone have any insight into how to fix this?
The error message is from (ana)conda, not from MacPorts, because the ncks executable /Users/matthewlaffin/anaconda/bin/ncks is in your (ana)conda directory, and it is trying to find an (ana)conda library that apparently not installed. Not sure why. See this issue for a possible solution.
If you did not have (ana)conda installed, then presumably your default NCO would be from MacPorts, and the MacPorts installation works so long as your PATH and LD_LIBRARY_PATH are correctly set.

'Found an uxexpected Mach-O header code: 0x72613c21' when trying to export an archive to IPA.

So I recently had this issue when deploying to my device:
(null): error: bitcode_strip /Users/me/Library/Developer/Xcode/DerivedData/AppName-gximcjgdoodczthglfujqgpzamxl/Build/Products/Debug-iphoneos/Pods.framework/Pods: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip exited with 1
I didn't encounter this error when deploying to a simulator though.
I found a solution here which says that I should set a user defined attribute 'STRIP_BITCODE_FROM_COPIED_FILES' to no.
Since then, I now get "Found an uxexpected Mach-O header code: 0x72613c21" when trying to export an archive.
Before the bitcode_strip issue, I was having no problem exporting archives so I'm wondering if the fix caused the current issue I'm facing, or if perhaps they are unrelated? If they are unrelated, what could actually be causing this?
here is the verbose IDEDistribution log
critical distribution log
standard distribution log
I have the same issue. I solved the problem when:
Uninstall cocoapods (I had installed cocoapods 0.39):
sudo gem uninstall cocoapods
Install cocoa pods 0.38.2:
sudo gem install cocoapods -v 0.38.2
For me, I went to TARGETS > General > Embedded Binaries
and removed my embedded binary (which was grey instead of yellow and happened to be Realm.framework)
Archive and submitted to iTunes then worked.
I wonder if it is because I had the Realm.framework embedded binary, but hadn't included the realm header or used realm yet - so maybe the compiler 'tried optimize away' my framework?

Using Latex under OS Yosemite

I just started on learning about the Latex world with this tutorial:.
When I try to call
xdvi first.dvi
I get the following message:
dyld: Library not loaded: /usr/X11/lib/libXaw.7.dylib
Referenced from: /usr/texbin/xdvi-xaw
Reason: image not found
Trace/BPT trap: 5
I already tried to re-install imagemagick (In case the problem was caused by it), but it didn't solve my case.
Any guess?
sudo ln -s /opt/X11 /usr/X11 worked for me. Solved the problem and I've been trying to figure it out for quite a while.

Typed in "ruby -version" in terminal and got an error after switching bootdisk from HD to SSD. How do I resolve this?

Installed a 2nd HD(SSD) on my MBP 15" and cloned all my files into it except the "User" folder. Deleted all the files I cloned from my original HD and left the users there and booted up my computer using SSD. Everything works, except when I check my ruby version, I get the following spilling out:
$ ruby -version
dyld: Library not loaded: /Users/jb/.rvm/rubies/ruby-2.1.0/lib/libruby.2.1.0.dylib
Referenced from: /Volumes/HardDrive/Users/jb/.rvm/rubies/ruby-2.1.0/bin/ruby
Reason: image not found
Trace/BPT trap: 5
What's going on here and how would I go about solving this?
On OS X binaries (such as ruby) contain the full path of the shared libraries they use, so when you run ruby it's trying to load libruby from that path - it doesn't know that the entire volume has been mounted at a different path
The easiest thing is probably to reinstall ruby - rvm reinstall ruby-2.1.0 should do it
In theory you should be able to use install_name_tool to rewrite the shared library paths in the binaries but it is almost certainly more trouble than it's worth.

Updating a dylib to reference correct versions of other dylibs (Homebrew)

I'm trying to build a program that uses QT and OpenCV. It compiles correctly, but when I run the application I get:
Starting /Users/Me/MyApp/Contents/MacOS/Foo...
dyld: Library not loaded: /usr/local/lib/libavformat.54.29.104.dylib
Referenced from: /usr/local/lib/libopencv_highgui.2.4.3.dylib
Reason: image not found
The program has unexpectedly finished.
/Users/Me/MyApp/Contents/MacOS/Foo exited with code 0
I've had a look in my /usr/local/lib, the files are properly linked there, the issue is that libav is now at a higher version and opencv doesn't reflect this (e.g. looking at the opencv dylib in a hex editor I see that it wants what it says above, but what's actually in my lib folder is e.g. version 54.59.106. I've tried runnning brew update/upgrade and relinking everything, but no luck.
I can make a quick fix by copying the offending dylibs and renaming them to older versions. This does cause the program to open correctly, but it's a bit of a hack.
Obviously I could probably fix this with a reinstall of the relevant libraries, but that takes precious time.. from this thread it seems like the only option, but I don't know if that's been fixed yet: https://github.com/mxcl/homebrew/issues/11832
Seems like the only way to fix this was to run:
brew rm ffmpeg && brew install ffmpeg
brew rm opencv && brew install opencv
Probably didn't need to repour ffmpeg, but I didn't see any harm in it. Turns out this happens sometimes when a package updates to a major new version and the other package hasn't also been updated yet.

Resources