Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
Jack Howarth wrote: [] > > Martin, >I am a bit confused. If you want gfortran to pass -m32, I would suspect > you are > running i386 fink in which case the gcc44 package will have built a 32-bit > native > compiler that generates i386 code. You shouldn't have to pass it anything at > all. I have not yet had enough time to investigate, but I saw the following failure in the configure phase of apbs on 10.6/32bit: It tries to link a fortran and a C module in order to find out the fortran name mangling scheme. This fails because the fortran-compiled *.o file is "of wrong architecture". I think for the C part it uses /usr/bin/gcc with the Fink-supplied automatic "-arch i386" and for the fortran part it uses gfortran from gcc44. But have to confirm this when I boot into 10.6 next time. -- Martin -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
On Sun, Sep 06, 2009 at 08:55:08AM +0200, Martin Costabel wrote: > Jack Howarth wrote: >> Martin, >> Regarding your question about how to get gfortran to accept the -arch >> option, >> it can't. That is an enhancement that Apple added to their gcc which wasn't >> (and is unlikely >> to ever be) ported to FSF gcc. The approach FSF gcc uses (which we have >> supported since >> I assumed maintainership) is a 64-bit (for powerpc/i386) or 32-bit (for >> x86_64) multilib. >> If you build gcc44 under x86_64, it is built as a x86_64 native compiler >> (which executes >> and generates 64-bit code as the default). If you want to generate 32-bit >> code with this >> compiler, you pass it -m32 just like our compiler wrappers do with the Snow >> Leopard compilers. >> Keep in mind that if you have been explicitly linking to -lgfortran using >> -L%p/lib/gcc44/lib >> this will have to be changed to -L%p/lib/gcc4.4/lib/i386. Likewise, if you >> are on i386 fink >> and want to generate 64-bit code you will pass -m64 and use >> -L%p/lib/gcc4.4/lib/x86_64 if >> you are explicitly linking. > > OK, now one only needs to figure out how to transmit the -m32 flag to > gfortran in all the situations where it is needed. Not easy. > > -- > Martin > > > Martin, I am a bit confused. If you want gfortran to pass -m32, I would suspect you are running i386 fink in which case the gcc44 package will have built a 32-bit native compiler that generates i386 code. You shouldn't have to pass it anything at all. Jack -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
Jack Howarth wrote: > Martin, > Regarding your question about how to get gfortran to accept the -arch > option, > it can't. That is an enhancement that Apple added to their gcc which wasn't > (and is unlikely > to ever be) ported to FSF gcc. The approach FSF gcc uses (which we have > supported since > I assumed maintainership) is a 64-bit (for powerpc/i386) or 32-bit (for > x86_64) multilib. > If you build gcc44 under x86_64, it is built as a x86_64 native compiler > (which executes > and generates 64-bit code as the default). If you want to generate 32-bit > code with this > compiler, you pass it -m32 just like our compiler wrappers do with the Snow > Leopard compilers. > Keep in mind that if you have been explicitly linking to -lgfortran using > -L%p/lib/gcc44/lib > this will have to be changed to -L%p/lib/gcc4.4/lib/i386. Likewise, if you > are on i386 fink > and want to generate 64-bit code you will pass -m64 and use > -L%p/lib/gcc4.4/lib/x86_64 if > you are explicitly linking. OK, now one only needs to figure out how to transmit the -m32 flag to gfortran in all the situations where it is needed. Not easy. -- Martin -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
Martin, Regarding your question about how to get gfortran to accept the -arch option, it can't. That is an enhancement that Apple added to their gcc which wasn't (and is unlikely to ever be) ported to FSF gcc. The approach FSF gcc uses (which we have supported since I assumed maintainership) is a 64-bit (for powerpc/i386) or 32-bit (for x86_64) multilib. If you build gcc44 under x86_64, it is built as a x86_64 native compiler (which executes and generates 64-bit code as the default). If you want to generate 32-bit code with this compiler, you pass it -m32 just like our compiler wrappers do with the Snow Leopard compilers. Keep in mind that if you have been explicitly linking to -lgfortran using -L%p/lib/gcc44/lib this will have to be changed to -L%p/lib/gcc4.4/lib/i386. Likewise, if you are on i386 fink and want to generate 64-bit code you will pass -m64 and use -L%p/lib/gcc4.4/lib/x86_64 if you are explicitly linking. Jack -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
Daniel Macks wrote: > On Mon, Aug 31, 2009 at 09:42:21AM +0200, Martin Costabel wrote: >> After spending time trying to build apbs in SnowLeopard 32-bit Fink, I >> have identified a source of breakage, but I have not yet found a good >> solution: >> >> CompileScripts that run in zsh, like apbs which has >> #!/bin/zsh -efv >> have a good chance to break on 32-bit Fink on SL. The reason is the >> following: >> >> SL has /etc/zshenv, which didn't exist before. This script is always >> executed at startup of zsh, and according to man zsh, this behavior >> cannot be overridden. Now /etc/zshenv runs /usr/libexec/path_helper, and >> this places the system path /usr/bin in front of Fink's path. > > Does putting ". %p/bin/init.sh" (or whatever the zsh-syntax is) at the > beginning of the script body solve it? No, because this does not place /sw/var/lib/fink/path-prefix-10.6/ on the PATH. And just placing this one there would be a solution for 10.6, but not for 10.5. Meaning complicated if clauses or different packages for 10.5 and 10.6. That's what I meant by "quite a mess". BTW, apbs is by no means the only package using zsh, there are several dozen of them. -- Martin -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
On Mon, Aug 31, 2009 at 09:42:21AM +0200, Martin Costabel wrote: > After spending time trying to build apbs in SnowLeopard 32-bit Fink, I > have identified a source of breakage, but I have not yet found a good > solution: > > CompileScripts that run in zsh, like apbs which has > #!/bin/zsh -efv > have a good chance to break on 32-bit Fink on SL. The reason is the > following: > > SL has /etc/zshenv, which didn't exist before. This script is always > executed at startup of zsh, and according to man zsh, this behavior > cannot be overridden. Now /etc/zshenv runs /usr/libexec/path_helper, and > this places the system path /usr/bin in front of Fink's path. Does putting ". %p/bin/init.sh" (or whatever the zsh-syntax is) at the beginning of the script body solve it? dan -- Daniel Macks dma...@netspace.org http://www.netspace.org/~dmacks -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
I've never understood why folks want to use zsh in these scripts rather than sh or bash. While it would be nice to limit ourselves to x86_64 fink on 10.6, we we will have some unhappy campers who don't have EMT64 capable processors on SL. Jack -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
[Fink-devel] zsh as shell in compilescript on 10.6 breaks 32bit Fink
After spending time trying to build apbs in SnowLeopard 32-bit Fink, I have identified a source of breakage, but I have not yet found a good solution: CompileScripts that run in zsh, like apbs which has #!/bin/zsh -efv have a good chance to break on 32-bit Fink on SL. The reason is the following: SL has /etc/zshenv, which didn't exist before. This script is always executed at startup of zsh, and according to man zsh, this behavior cannot be overridden. Now /etc/zshenv runs /usr/libexec/path_helper, and this places the system path /usr/bin in front of Fink's path. In particular, "gcc" will then be /usr/bin/gcc, and not the carefully crafted /sw/var/lib/fink/path-prefix-10.6/gcc, and therefore it will not have the "-arch i386" flag, and it will build for the x86_64 architecture, which causes breakage in 32bit Fink. Somehow one needs to place that path-prefix back in front of the PATH, but since this is distribution and architecture dependent, to do so can become quite a mess. On a related note: How does one tell gfortran (from Fink's gcc44) to build either 32bit or 64bit executables? It does not seem to understand the -arch flag. The same question goes for all Fink-built compilers. If there is no reasonable answer, then this would be a further argument against keeping 32bit Fink on SnowLeopard. -- Martin -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel