On Apr 22, 2013, at 15:12, Clemens Lang wrote:

> The port specifically blacklists clang and llvm-gcc and the next in the
> fallback list seems to be apple-gcc, which Xcode 4.2 apparently doesn't
> have, which causes the Portfile to add a dependency on MacPorts' version
> of it.

I'm sure there's a logical explanation :) I don't see however why 
macports-clang-3.3 isn't accepted; I have it installed?
BTW, port select --list gcc did include gcc42, which must have been Apple's 4.2 
version.
> 
> While it is uncommon to have multiple Xcode versions I guess if you have
> a patch to fix this we'd be happy to apply it.

As I said, I executed xcode-select /Developer to make Xcode 3.2 the default 
again. Not sure what I should patch nor how for an automated fix. One could 
check whether a given compiler is available on the path, of course. Or let the 
fallback fall through to gcc42 if apple-gcc42 doesn't exist. Someone savvy 
enough to install a gcc compiler outside of Macports or Xcode ought to be savvy 
enough to know that standard gcc versions do not include all of Apple's 
extensions (gcc-mp-4.7 seems to miss support for blocks, e.g.).

> While that is true, you only did _part_ of what the Xcode installer
> would have done. MacPorts checks the Xcode version and assumes
> /usr/bin/clang matches the Xcode version you installed. The whole point
> of not modifying this is that third-party software can rely on it. You

Well, that's true of course - but in this particular case I've noticed so many 
issues with clang 1.7 (the one I replaced) that I don't expect anything but 
gain. In fact, I think I had already modified the corresponding pbcompspec file 
to use a newer clang version (but that's arguably not the same as modifying the 
binaries).

> And that's what MacPorts does, if you have Xcode 3.x installed and
> selected. Would you suggest to still use gcc-4.2 when having 4.2
> installed? Does 4.2 even ship gcc-4.2?

No, it seems it doesn't, but it clearly doesn't uninstall gcc-4.2 at least if 
you're installing in parallel to an existing Xcode installation.
Yes, I think it's a good idea to stick to gcc-4.2 in 10.6, even with Xcode 4.2 
installed. For reasons already mentioned, but also because I suspect this would 
make it easier to avoid presumptions about features introduced in more recent 
clang versions than the 3.0 that shipped with Xcode 4.2 or, worse, in the ObjC 
runtime
> 
> Btw, can you update
>  http://trac.macports.org/wiki/XcodeVersionInfo
> with this info?

Willco.

> You can always run a different command instead of install so it doesn't
> actually install the port (which would mess with what you have). E.g., I
> [...]

OK, will have a look if I can reproduce the things I noticed this way ... and 
maybe even file reports for inkscape and kerberos5 because those fail to update 
for some reason now that I'm back to using gcc-4.2 ... 
Won't be very soon as I've got a number of higher priority things on my todo 
list, so don't hesitate to shake my tree if I'm taking too long.

> As said, if there is, this is unsupported. You should instead file bugs
> for the ports that break with clang so they can have clang or broken
> versions of it selectively blacklisted.

Sure, but apart from that a user can have good reasons to use a compiler 
(and/or options) of choice, no? Just one of them: I was amazed to see how much 
better autovectorisation has become in gcc 4.7 - in one benchmark of code taken 
from Perian, the 'scalar' version of a YUV conversion routine all of a sudden 
executed as much faster as a handcoded SSE2 version as that hand-coded version 
executes w.r.t. the scalar version using gcc-4.2 or MSVC 2010 ...
I'm using gcc-mp-4.7 whenever I can ever since, not regretting it a bit. 

-
René
_______________________________________________
macports-users mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to