On 4/22/14, 10:47 AM, Max Horn wrote:
>
> On 22.04.2014, at 17:19, Alexander Hansen <alexanderk.han...@gmail.com> wrote:
>
>> On 4/22/14, 8:12 AM, Max Horn wrote:
>
> [...]
>
>>
>> It can and does work for clang versions other than the one for Xcode 5.0 
>> because I tested it against clang from Xcode 4.6.3 and clang from Xcode 
>> 5.1.0 (and missed 5.0.x).
>
> Well, it cannot work for clang in Xcode 5.0.x... so I see no contradiction 
> here.
>
>>   You somehow still have the compiler_wrapper from fink-0.36.4;
>
> I did nothing fancy to update, just a "cvs up" followed by a "fink 
> update-all". If it happened for me, it is highly likely to happen for other 
> people, too.
>
> Aha, and looking at the code, that's pretty much guaranteed to be the reason: 
> Because unlike a "fink selfupdate", this process does *not* restart fink 
> after updating fink. So this happens:
>
> * fink rebuilds fink
> * fink installs the new fink.deb; the postinst script is triggered, which 
> removes the clang wrapper
> * the old fink is still running and updates some other package
> * this recreates the "old" wrapper.
>
>
> So this would have been avoided if I did run "fink selfupdate". But there 
> might be other ways to trigger this or similar breakage. Hence I think it 
> would be preferable if things were arranged in a way that such problems are 
> impossible by design.
>
> So, why don't we simply re-create the wrapper each time we start a build 
> process? Of course, care must be taken to not affect concurrent build 
> processes... but this could be achieved by creating per-package wrappers on 
> the fly for each build. That shouldn't be too hard. E.g. when preparing the 
> build, we create %b/../bin/clang etc. and then add this to the build-time 
> PATH, just like we add %p/var/lib/fink/path-prefix-clang/compiler_wrapper
>
> Hmm, that said... why exactly are those wrappers not part of the .deb to 
> begin with? That would be even simpler, wouldn't it?
>
>
> Cheers,
> Max
>
>

Ah, that explains it.  I didn't appreciate that the logic in 
PkgVersion.pm only gets triggered on each build _operation_ rather than 
each individual package build.

I assumed (without having time to delve through the history) that we 
deliberately didn't want to regenerate the wrappers for every build 
operation because of potential fragility.  I wondered why the wrappers 
weren't encoded in the .deb, myself, since that would be even less 
fragile, but at the time it seemed like that change needed a bit more 
brainpower than I had available, and we were being swamped with "foo 
doesn't build with xcode-5.1" reports.

I personally feel that having the proper compiler wrapper setup in the 
.deb makes more sense than generating them dynamically--apart from 
fixing damaged setups, of course.  Right now on 10.7+ fink installs:

/sw/var/lib/fink/path-prefix-10.6/compiler_wrapper
/sw/var/lib/fink/path-prefix-g++-3.3/g++
/sw/var/lib/fink/path-prefix-g++-4.0/g++
/sw/var/lib/fink/path-prefix-10.6/c++
/sw/var/lib/fink/path-prefix-10.6/c++-4.0
/sw/var/lib/fink/path-prefix-10.6/c++-4.2
/sw/var/lib/fink/path-prefix-10.6/cc
/sw/var/lib/fink/path-prefix-10.6/clang
/sw/var/lib/fink/path-prefix-10.6/clang++
/sw/var/lib/fink/path-prefix-10.6/g++
/sw/var/lib/fink/path-prefix-10.6/g++-4.0
/sw/var/lib/fink/path-prefix-10.6/g++-4.2
/sw/var/lib/fink/path-prefix-10.6/gcc
/sw/var/lib/fink/path-prefix-10.6/gcc-4.0
/sw/var/lib/fink/path-prefix-10.6/gcc-4.2
/sw/var/lib/fink/path-prefix-g++-3.3/c++
/sw/var/lib/fink/path-prefix-g++-4.0/c++

and none of these are actually used, but relies on FinkVersion.pm to 
install the wrappers that do get used.
-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
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