On 6/17/12 1:26 PM, Stuart Levy wrote:
> Alexander, thanks very much!  I did find the problem and a workaround,
> and a guess as to what had gone wrong.  It is an Xcode-related problem,
> but since this might bite others I'll describe it here.
> 
> One suggestion for fink developers:
>    *Under 10.7, don't prepend /Developer/usr/bin to the build $PATH.*
>    It shouldn't exist, and if it does, you shouldn't use it.
> 
> Details:
> 
> There turned out to be at least two sets of command-line tools
> on my MacOS 10.7.4, Xcode 4.3.2 system:
> one in /usr/bin (and /usr/llvm-gcc-4.2/bin...), and
> another in /Developer/usr/bin (and /Developer/usr/llvm-gcc-4.2/bin...).
> 
> Though the /usr/bin versions are in my $PATH, the fink installer
> prepends /Developer/usr/bin to $PATH,
> so fink tries to compile with /Developer/usr/bin/llvm-g++-4.2 etc.
> 

This is specific to the qt4-base package:

CompileScript: <<
        #!/bin/sh -ev
        
        if [[ $(sw_vers -productVersion | cut -d. -f1-2) > 10.6 ]]; then
        export PATH="/Developer/usr/bin:/usr/llvm-gcc-4.2:$PATH"
        export CC=llvm-gcc-4.2
        export CXX=llvm-g++-4.2
        fi


> These two are independently installed.  

For Xcode 4.3+ .

The one in /usr/bin ~
> /usr/llvm-gcc-4.2/bin
> gets updated when you ask Xcode to update the "command line tools".  It
> works sensibly.
> The compiler's built-in include-path includes
> /usr/include/c++/4.2.1/include, which is fine.
> 
> The /Developer/usr/bin ~ /Developer/usr/llvm-gcc-4.2/bin copy is broken.
> I'd assumed it came from the Xcode 4.3 which I'd downloaded from Apple's
> itunes web site.   But /Developer/usr/bin/llvm-g++-4.2 looks in an
> *obsolete* directory for C++-specific files, namely
>     /usr/include/c++/4.0.0/include
> even though it's a version-4.2 compiler!
> 
> Hence it couldn't find <new>, and presumably wouldn't have found lots of
> other things either.
> 
> Possible explanation:
>   I'd used Migration Assistant to carry over MacOS 10.5 system files to
> my 10.7 machine.
>   I'm guessing that 10.5's Xcode had an early llvm compiler -- a new
> compiler, but built
>   to use the then-current 4.0.0 C++ headers.  The compiler was installed
> under /Developer/usr/...
>   rather than /usr/...  Migration Ass't migrated the compiler but not
> the include files.
> 
>   Migration Assistant helpfully migrated it.  fink helpfully found it.  
> But it was broken.
> 
>    Running "pkgutil --file-info /Developer/usr/bin/llvm-gcc-4.2"
>    confirms that no 10.7 package knows about this file.
> 
> Workaround:
>    Get rid of /Developer/usr/...  I think this entire tree should not be
> there under 10.7.


It should still be there if you're using an Xcode earlier than 4.3.

>    On my system, all the files under /Developer/usr had nearly the same
> ctime, which
>    makes it look more likely that Migration Assistant put them all there.
> 
> 
> 
> 

Thanks for the report.

I'm not sure what considerations motivated the form of the CompileScript
in this case, though we did have a number of reports of Xcode _not_
installing the executables in /usr/bin.  It may have been an attempt to
handle such mis-installs.

In case there's some other reason that it's using /Developer/usr/bin,
I'll go with a conservative change and use the results of "xcode-select
-print-path".  This points to the Developer directory inside of
Xcode.app for Xcode 4.3+, and to /Developer for Xcode 4.1 or 4.2, so it
will do the right thing.
-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to