Macports and Rubygems issues on Snow Leopard - macos

I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install.
It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby cannot load 32bit bundles.
What is the easiest way to solve these issues?

I was googling for the answer for about 4 days already and finally came up with a step-by-step manual on fixing macports and rubygems:
http://oleganza.tumblr.com/post/127709563/snow-leopard-with-legacy-macports-and-rubygems
In short: for proper use of macports and rubygems you would have to:
Install trunk macports from source (or use 1.8 version when it is released)
Add alias for "gem install with 64bit architecture"
Reinstall all ports (not automated yet)
Reinstall all gems (100% automated)
This would take 10-20 minutes of your personal time and another 20
minutes of machine time in order to build and install stuff.
I would be glad to get more answers in order to fix other issues we might meet later.

Since it's really hard to force MacPorts to recompile all ports (in the proper order), I just did:
mv /opt /opt.old
Then install MacPorts 1.8, and bring back any configs you need from /opt.old/local/etc/
Otherwise, you'll get assorted errors complaining about your existing libs' architecture, (e.g. "Command output: ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture").
This isn't as clean as 'port uninstall installed' but works fast and good enough for me.

Richard Dooling's MacPorts On Snow Leopard explains that to fix the older install of MacPorts, which is broken after the upgrade to Snow Leopard, you should just download and install the new compatible version over the old one and then simply follow the migration instructions - which also say the same.

Related

Git for Mac fails to launch: "illegal instruction"

...I've looked pretty carefully (I believe), and have been unsuccessful at getting an installation of Git for my Mac.
For various reasons, I'm running 10.6.8 of Mac OS X and will not be changing that anytime soon.
I've already gathered and installed the bundle exposed here:
https://help.github.com/articles/set-up-git
The installation instructions are pretty clear, and it's obvious to me that the package installed. But any attempts to use the git client from the command line result in an "Illegal Instruction" error.
I've sifted pretty carefully through information available here:
http://git-scm.com/book/en/Getting-Started-Installing-Git
There is another bundle that seems to be available. It is called "GitHub for Mac 1.7.5, but it appears to require Mac OS X 10.7 or later.
Has anyone else encountered this difficulty? Must I build from source?
I'm a couple of hours of reading and hacking into this effort? Is there something obvious that I've not considered?
Yes, I've had the same exact problem, and what I did is installed an earlier build from here:
https://code.google.com/p/git-osx-installer/
I'm running 10.6.8 and installed the newest build there, 1.8.4.2
SourceForge only has 1.9.0 and 1.8.5.2
http://sourceforge.net/projects/git-osx-installer/reviews?source=navbar
Someone on the reviews said they had trouble with both and went back to 1.7. I would try that if 1.8.4.2 doesn't work.
I was able to run the config commands without an illegal instruction error, at least.
I had this problem and was able to install a working version using Homebrew.
# first uninstall the broken version
# mount the DMG for the broken version using Finder
# "type" this with the tab key! it saves typing and fixes the version number
cd /Volumes/Git\ 2.0.1\ Snow\ Leopard\ Intel\ Universal/
./uninstall.sh
# make bash forget about the uninstalled binary
hash -r
cd
# now install the working version
# assumes you have Homebrew installed
brew install git
git version
I had this today on Snow Leopard after running the suggested git installer from git-scm. Really horrible. Found that installing Macports using their old Snow Leopard package and then
sudo port install git +svn +doc +bash_completion +gitweb
installs git plus its dependencies and git now works fine; version 1.9.3 installed and working on 10.6.8.
I had the same problem. There are various methods for downloading and installing git - Try macports or homebrew. The thing that finally worked for me was having xcode 3.2.6 installed with the additional command line tools - version 3.2 that comes with the leopard install disk wasn't enough. You can install xcode etc. from the disk and then run software update to upgrade it to 3.2.6.
The latest build for Snow Leopard in the official git-osx-installer repo is Git 2.3.5 currently. You can download it from http://sourceforge.net/projects/git-osx-installer/files/git-2.3.5-intel-universal-snow-leopard.dmg/download using web browser. This installation works for me on OS X 10.6.8.
Or you can check yourself for a newer version: http://sourceforge.net/projects/git-osx-installer/files/
Yes - it seems that it does not support the older OS version (mine was 10.6.8). I upgraded to the newest Mac OS 10.9.4 (the installation will take a while), reinstalled the Git software (note that it will ask for xcode to be installed, which I proceeded), and everything works fine from there. Hope this helps.
Ref : https://help.github.com/articles/does-github-for-mac-run-on-os-x-10-6-snow-leopard
To quote:
Does GitHub for Mac run on OS X 10.6 Snow Leopard?
No, GitHub for Mac requires OS X 10.7 (Lion) or higher.
We made this decision because the app relies on a number of
technologies which are not available in Mac OS X 10.6 or earlier. We
want to provide the best experience possible for the app's users, so
we've made the choice to only support 10.7 and above, and not make
earlier versions available.

libpng not linked on Mac OSX 10.9.2

I installed matrix2png on my Mac and had used it without problem before last week when I installed another image manipulating tool "circos". Circos requires me to install a different version of libpng, and I did. After that, I am no longer able to run matrix2png, which gives me the following error. I think the old ligpnb is not linked any more. Does anyone know how to fix this error? - appreciate your help.
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/matrix2png
Reason: image not found
Those step solve my problem:
brew versions libpng
You will see some versions of libpng, but unfortunately not 1.5.15, so next you should install 1.5.18.
git checkout 7bec702 Library/Formula/libpng.rb
brew install libpng
You'll will find version 1.5.18 and some another versions.
ln -s /usr/local/Cellar/libpng/1.5.18/lib/libpng15.15.dylib /usr/local/lib/libpng15.15.dylib`
See https://github.com/Homebrew/homebrew-php/issues/1055
Some more info on installing certain versions of brew formulas can be found at https://coderwall.com/p/lqphzg.
Your new version of libpng has probably changed the name of its dyld files. This often happens with upgrades (especially following a major release). To verify this, open up the terminal and type:
ls /usr/local/lib/libpng*
What do you see?
From your error message we know that matrix2png is looking for libpng15 but if you've upgraded when instaling circos then you may now have libpng16 on your system. Consequently matrix2png won't be able to find the files that it's looking for and will be unhappy.
Fixing it this time:
Try re-installing matrix2png and see whether it notices the dependency issues and fixes it for you. You don't really want to downgrade libpng nor do you want to have two versions of it on your system, so having an up-to-date version of matrix2png would be good.
It looks like matrix2png comes from C source code, so you'll want to rebuild it. Download the source code or and then open a terminal. Navigate to the folder with the source code and run configure and then make. Configure will generate a Makefile for your system, and then make will use that file to generate a new binary. I've tested this on my Mac (with libpng16), and found that matrix2png built without any errors.
Suggested future approach:
To prevent future linking problems, you may want to use a package manager like homebrew or macports. In case you're using (or want to use) homebrew, it has circos and lib2png (but not matrix2png, sorry!). Once brew is installed, type the following into the terminal:
brew install libpng
And it should detect linking issues / version conflicts and guide you through fixing them. Brew places all of it's files in a 'cellar' location in /usr/local/Cellar and then symbolically links them into your system.
In case you're already using brew, try brew doctor and follow the instructions to resolve problems.
My experience (I've been dealing with a lot of version conflicts in the past few weeks) is that package managers make life much easier. Occasionally I've had to remove and reinstall packages to fix version issues, but in general brew keeps things neat and working.

How do you install the Haskell Platform over a previous install?

I've been working with Haskell lately, and installed gtk2hs (a gtk library for Haskell) a few days ago using MacPorts. For some reason, MacPorts saw fit to install GHC 6.10 over my previous GHC 6.12 install, but I didn't really care.
Now I find myself desiring the improved parallelism support of the latest Haskell Platform, so I installed it today, and it installed successfully - except that when I type in "ghc -v" in Terminal, I am informed that I have GHC 6.10 still.
I have tried using uninstall-hs, and it informs me that I have three Haskells on my system: versions 6.12, 6.12.3, and 7.04. I'm not sure how that 6.12.3 showed up, and what happened to the 6.10? Most importantly, how can I start running version 7.04? Thanks in advance for your help!
You should completely purge your MacPorts install of GHC and your current Platform installation and install the Haskell Platform directly with the OS X installer. After that, future versions of the Haskell Platform can be upgraded to cleanly simply by installing them.
The following command should remove your MacPorts GHC:
$ sudo port uninstall --follow-dependents ghc
You might want to execute something like find /usr /opt/local -name '*ghc*' after uninstalling everything to check that there's no remaining traces.
To really clear out the old install, you've got to go in and delete things by hand.
This will be very useful: Everywhere that GHC/Haskell Platform installs
Might want to look here also: http://www.vex.net/~trebla/haskell/sicp.xhtml

How to configure MacPort to pick already installed packages

I have recently shifted to OSX environment, so don't know much about MacPorts.
Is there a way to tell MacPorts to pick already installed packages. For instance to install
sudo port install meld
its requiring hell lot of packages, including python2.6. But I already have python2.6 installed.
No there isnt. If you want to link against system installations then use Homebrew or compile manually yourself. Personally i prefer Macports because its completely isolated. Ive got plenty of disk so having duplicates doesnt bother me.

How to install macports openmpi on Mac osx 10.5.8?

I want the latest version of openmpi. I like to use macports because it is easy to install, uninstall, and upgrade software. I have installed the latest mpi via building from source, but no one seems to be able to get it to build properly with macports. There is always a build error. There are tickets (and you can see the logs at ), but they seem to be collecting dust and it seems strange that no one had found a solution.
I have tried uninstalling the built in version (I know, openmpi says not to do that--but it works fine if I reinstall it--even in a different directory), but I still the same build errors. I also tried with different gcc.
Does anyone know what is so difficult about getting openmpi via macports?
sudo port install openmpi
worked for me

Resources