On Sep 19, 2013, at 3:10 PM, Alexander Hansen <alexanderk.han...@gmail.com> 
wrote:

> On 9/19/13 11:27 AM, Martin Costabel wrote:
>> costabel% fink list xcode
>> []
>> Information about 7895 packages read in 4 seconds.
>>   i   xcode                     5.0.0.0.1.13776663  []
>>   i   xcode.app                 5.0-1               []
>> 
>> In Xcode5 on OSX 10.8, there is no gcc any more; /usr/bin/gcc is clang:
>> 
>>> costabel% /usr/bin/gcc -v
>>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
>>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>>> Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
>>> Target: x86_64-apple-darwin12.5.0
>>> Thread model: posix
>> 
>> `fink rebuild fink` errors out, after building successfully, with
>> 
>>> Preparing to replace fink 0.35.1-71 (using 
>>> .../fink_0.35.1-71_darwin-x86_64.deb) ...
>>> Unpacking replacement fink ...
>>> Setting up fink (0.35.1-71) ...
>>> Checking system... i386-apple-darwin12.5.0
>>> Under Mac OS X 10.8.5, Fink must be bootstrapped or updated with gcc
>>> 4.2, however, you currently have gcc (unknown version) selected.
>>> This typically is due to alteration of symlinks which were
>>> installed by Xcode. To correct this problem, you will need
>>> to restore the compiler symlinks to the configuration that
>>> Apple provides.
>>> /sw/bin/dpkg: error processing fink (--install):
>>>  subprocess post-installation script returned error exit status 29
>>> Errors were encountered while processing:
>>>  fink
>> 
> 
> It comes from the following in Services.pm:
> 
> sub gcc_selected {
>       # this should work anywhere we support, really
>       if (-l '/usr/bin/gcc') {
>               my $link = readlink('/usr/bin/gcc');
>               if ($link =~ /gcc-(\d+\.\d+)/) {
>                       return $1;
>               } else {
>                       print STDERR "WARNING: /usr/bin/gcc is not a symlink!";
>               }
>       }
>       return 0;
> }
> 
> There are two problems here:
> 
> 1)  [minor] The "print STDERR ..." item seems to be the wrong scope. 
> The inner else block should only be reached if /usr/bin/gcc _is_ a 
> symlink but to something that doesn't match the pattern.  This function 
> got modified a lot after we stopped supporting 10.4--probably my fault here.
> 
> 2)  Xcode 5 introduces a change in behavior in that /usr/bin/gcc is no 
> longer a symlink.
> 
> I don't know how necessary this test actually is--it's a leftover from 
> the period when folks needed to use "gcc_select" to switch the default 
> compiler.

I add a pull request at https://github.com/fink/fink/pull/85 as a possible fix 
for this. It Works For Me with Xcode 5 on 10.8.5. The other option is to rip 
out the check altogether, but that'll touch a lot more code.

Daniel

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
fink-core mailing list
fink-core@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.core
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-core

Reply via email to