I know that if I install Xcode i would get clang installed bundled with the Xcode.
I want to know if I can install multiple versions of clang(other than the one bundled together with Xcode) on my mac and how?
Yes, there are many ways you can install another version of Clang. The most straightforward way would be to use MacPorts (Homebrew might be an option also, although I'm not sure). You could compile, build, and install it yourself, however, I would recommend going with the first suggestion as it will not interfere with any of the native system files and you can easily uninstall it if you want.
Related
I need to use a new version of SQLite3 in a project built using CMake. To find external dependencies we usually use the FIND_PACKAGE() command which tends to work fine. However, FIND_PACKAGE(SQLite3) finds the very old version shipped with the OS rather than the up-to-date version provided by Homebrew. Homebrew refuses to relink to its own headers, binaries and libraries. I guess I could do that manually, but I am hesitant if Homebrew so strongly discourages it (refuses even when --force flag is given).
Any pointers on how to control where CMake looks for SQLite3 would be very appreciated.
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.
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
Ok, I know how to install Perl modules with cpan and have been doing it for years. But when I try to install the DateTime module on this particular mac, it fails, claiming that it cannot find a compiler.
Here is some of the output from attempting to install one of the prerequisites, Params::Validate: ( I get the same kinds of errors from attempting to install the module in question.)
Configuring Params-Validate-1.00
Running Build.PL
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
lipo: can't open input file: /var/tmp//cc3Aefez.out (No such file or directory)
Warning: ExtUtils::CBuilder not installed or no compiler detected
Proceeding with configuration, but compilation may fail during Build
Why is Build.PL looking for a ppc compiler? If that is the problem where do I tell it (or cpan, or cpanm) that this machine is not a ppc box?
I'm running 10.6.8. The version of perl is v5.10.0 built for darwin-thread-multi-2level
I most definitely have the Developer tools installed.
I'm running cpan and cpanm via sudo.
I'd be grateful for any assistance anyone can offer.
known problem with Xcode on Lion, Apple couldn't help messing around with nm, breaking Perl again (previously) and who knows what else
p5p discussion
perlbrew's info
You are on an unsupported Perl. Upgrade to stable.
I've got 10.7 installed which comes with Perl 5.12.3 installed. I did a CPAN install:
$ sudo cpan
password:
cpan> install DateTime
And, the whole thing works. Is this something you need for a third party file, or do you want to use this because you're familiar with this particular package?
There are several built in Time packages with Perl 5.10. Would one of these work for you? Otherwise, you might need to install ExtUtils::CBuilder and see if that helps.
Or, install a more modern version of Perl such as ActiveState which is pretty simple to install, its cpan utility works pretty good on a Mac, and it's version 5.14 which is even newer than the version that comes with Lion.
I think what's happening is that the installer is trying to compile something (possibly an XS module) and to do that it needs to use the same compiler that was used to compile whichever version of Perl is on your system, and it can't find it.
Your best bet would be to install your own version of Perl 5.10 using perlbrew as this gaurantees the compiler is available (make sure you edit your .profile so Terminal uses your new Perl), then re-open Terminal, switch to the perlbrew version of Perl 5.10 and you should be fine from then on.
If you have problems installing the perlbrew Perl then as daxim noted above refer to the Lion fix
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