Compilers and Variants and Architectures Oh My!
Peter Johansson
rockets4kids at gmail.com
Sun Mar 24 10:53:24 PDT 2013
Greetings all! I am new to this mailing list but not MacPorts. I
have been using it for about six years now, mostly for small command
line apps - wget, sox, things of that nature. Somewhat recently I
started using it for larger tools like Wine and gerbv. While I had
some minor problems, I was able to build what I needed without much
difficulty.
I recently upgraded my machine (yes, the same one I bought six+ years
ago) with a SSD, and took the opportunity for a completely fresh
re-install. I am still running Snow Leopard but I upgraded to the
latest XCode for SL, XCode 4.2. This caused a bunch of problems which
I eventually tracked down to a problem with the clang compiler shipped
with XCode 4.2 -- it does not properly respect CPATH causing a whole
bunch of things to fail. In the process of building a working system,
I got sucked into a little more of the nitty gritty than I had hoped.
Although I have read the page "Using the Right Compiler" this page
does not actually provide any insight as to which compiler should be
used to build the MacPorts tree, particularly on older systems with
rather outdated system compilers. It seems as if MacPorts prefers
clang, but by default it uses your system's default clang. While this
is probably best if you are running the latest XCode, this is clearly
not optimal if you are limited to an older version of XCode. Would it
indeed be wise to install clang 3.2 or 3.3 and then set this to the
default compiler for MacPorts? If so, how does one set the default
compiler in MacPorts? Furthermore, would it be wise to build a
bootstrap install of MacPorts to obtain the desired compiler, and then
use this to build the primary MacPorts install?
Now onto Variants... When I built Wine on my previous system, it
seems as if every package used by Wine got recompiled as a +universal
variant. I assume this is because Wine only runs under i386 arch. I
noticed in several places it was suggested to make +universal the
default variant on systems running 64-bit kernels, even aside from
Wine. Is this actually a good procedure? It does seem to break some
software, most notably msp430-gcc built outside of MacPorts, and the
AVR tools within MacPorts.
Can someone explain how libraries are managed when compiled with
+universal? Does this build both architectures into a single library,
or are multiple libraries created for each architecture? What is the
proper way to install packages like avr-binutils that do not have a
+universal variant, when +universal is selected as a system default?
I realize there are a lot of questions here, and I am probably not
asking some of them properly, but any assistance that can be provided
here would be most appreciated.
-p.
More information about the macports-users
mailing list