rzyns / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

MacVim icons and MacVim itself failed to build if ppc command line tools are not installed #322

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
./src/MacVim/icons/* do not compile if ppc assembler is not installed.
As a result MacVim does not compile.

For example Xcode 4 does not contain ppc/ppc64 commandline
utils, so src/MacVim/icons/loadfont.c fails to build universal binary.

Explicit selection of platform architecture (x86_64 or i386) with environment 
variable ARCHFLAGS solves the problem (e.g. export ARCHFLAGS='-arch x86_64').

./configure option --with-macarchs did not solve the problem for ./icons/ - it 
does not affected there. But ARCHFLAGS does.

Detailed error log:
in src/MacVim/icons:

/usr/bin/python setup.py install --install-lib .

is building loadfont.c with parameters -arch i386 -arch ppc -arch x86_64 (looks 
like it was default behaivor for distutils.core module, which is obviously 
wrong).

And the final error is:

/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler 
(/Developer/usr/bin/../libexec/gcc/darwin/ppc/as or 
/Developer/usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not 
installed Installed assemblers are:
/Developer/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64 
/Developer/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386

So icon builder was building as universal binary by default. If no ppc 
assembler were installed, icon builder failed to compile. As a result whole 
macvim was failed to build because of icons.

I submitted a patch for homebrew formula to build macvim correctly: 
https://github.com/mxcl/homebrew/pull/4656

Original issue reported on code.google.com by ivkosh...@gmail.com on 13 Mar 2011 at 8:05

GoogleCodeExporter commented 9 years ago
Thanks for the heads up.

I don't have Xcode 4 -- could you send me a patch for this problem?  I'd be 
very grateful.  (Note that it should still be possible to compile MacVim on 
PPC/OS X 10.4.)

Original comment by bjorn.winckler@gmail.com on 14 Mar 2011 at 6:05

GoogleCodeExporter commented 9 years ago
OK, I'll try.

Original comment by ivkosh...@gmail.com on 15 Mar 2011 at 4:30

GoogleCodeExporter commented 9 years ago
I made pull request on github which solves the problem:

https://github.com/b4winckler/macvim/pull/12

I can't test it on 10.4 - don't have one. I think it will compile on all intel 
macs.
Maybe there whill be a problem on PowerPC macs.
If so, the way to hotfix this is to modify src/MacVim/icons/setup.py: check 
current architecture and set environment variable ARCHFLAGS if we are on intel.

Write me, if there will be a problem on PPC.

Original comment by ivkosh...@gmail.com on 15 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
To chip in my 2 cents: the problem might spread more and more, since Xcode 4 is 
the version readily available on AppStore -- for those who, in a hurry, needed 
to put Xcode and MacPorts quickly without bothering to hunt down an old version 
on a former Mac OS X DVD. Thanks guys for the work on that!

Original comment by julien.c...@gmail.com on 16 Mar 2011 at 2:03

GoogleCodeExporter commented 9 years ago
This should be a non-issue now, see the note at the bottom of

https://github.com/b4winckler/macvim/wiki/Building

Original comment by bjorn.winckler@gmail.com on 31 Mar 2011 at 8:10