ClosestStorm / macvim

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

No window appear on Lion with Xcode 4.2 #384

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have Lion and Xcode4.2 installed. I try to intall mavcim 7.3-62 by HomeBrew, 
but encounter the Xcode 4.2 problem that fail to compile.

Then I found the "Issue 375: Unsupported compiler 'GCC 4.2' selected for 
architecture 'x86_64'". I clone the source from github, tried either 
'./configure' followed by the most options as homebrew but without 
'--with-macsdk', or just './configure'. Both result the same problem: MacVim 
start up without window!

I could see the icon in the dock, the items in the menu bar. Even the 'About' 
or 'Preferences' window could display. But any file opened or created can't. 
When I 'Quit' the MacVim, an alert prompts which said there're multifiles to be 
closed.

Original issue reported on code.google.com by canto...@gmail.com on 16 Oct 2011 at 7:40

GoogleCodeExporter commented 9 years ago
I just updated to Xcode 4.2 and I have absolutely no problems.  Have you tried 
a "make clean" after "./configure"?

Original comment by bjorn.winckler@gmail.com on 16 Oct 2011 at 4:25

GoogleCodeExporter commented 9 years ago
Suffering exactly the same problem. I think it's a problem with LLVM/Clang, 
since GCC is not available on 10.7.2/Xcode 4.2

Original comment by fons...@gmail.com on 19 Oct 2011 at 12:02

GoogleCodeExporter commented 9 years ago
Really?  No GCC?  It is there on my system, but perhaps this is because I 
updated from Xcode 4 (.1?).  Does "which gcc" not report "/usr/bin/gcc"?  (My 
"gcc --version" is "i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1" by the way.)

Please confirm that you've built by:

$ ./configure
$ make clean
$ make

Original comment by bjorn.winckler@gmail.com on 19 Oct 2011 at 12:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am having the same issue attempting to install MacVim from homebrew on a new 
machine with a fresh install of Xcode 4.2

When doing a standard brew install macvim (which, as we can see, is doing 
./configure with a few options, followed by make), it fails like this: 
https://gist.github.com/1317003
I added in the make clean before make, and it fails differently: 
https://gist.github.com/1317007

When using --HEAD (using the current git head), I have no problems compiling, 
but see the issue where no windows are opened by mvim. Using the modified 
recipe with "make clean" doesn't change the issue.

For what it's worth, the `gcc --version` for my machine (having not had any 
previous version of Xcode installed), is "i686-apple-darwin11-llvm-gcc-4.2 
(GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)"

Original comment by sam.hask...@gmail.com on 26 Oct 2011 at 5:06

GoogleCodeExporter commented 9 years ago
Building from HEAD worked for me. For those using Homebrew, edit the formula 
("brew edit macvim") and comment out line 5, which specifies the snapshot, and 
also the end of line 36, which adds --macsdk as an argument to configure.

Original comment by alpha.c...@gmail.com on 28 Oct 2011 at 2:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am on Mac OS X Lion 7.2, XCode 4.2, and neither the downloadable snapshot 62 
nor compiling via homebrew gives me a macvim that opens its own process window. 
I can only run it within a terminal as "vim". Invoking "mvim" does absolutely 
nothing, and no errors are reported to the terminal, either, which is doubly 
frustrating.

I have tried editing the homebrew forumula as specified by 
http://code.google.com/p/macvim/issues/detail?id=384#c9 above but to no avail. 
I get a working vim instance in the terminal, but bupkus for a new, independent 
window.

What gives? And any ideas?

Original comment by iamdamoc...@gmail.com on 12 Nov 2011 at 2:11

GoogleCodeExporter commented 9 years ago
I just compiled snapshot 64 of MacVim with clang from Xcode 4.4 on Mac OS X 
10.7 Lion. The build went fine and the resulting binary can open new windows 
just fine.

The MacPorts distribution of MacVim is now being built with clang when using 
Xcode >= 4.4.

Original comment by raimue on 25 Jul 2012 at 8:35

GoogleCodeExporter commented 9 years ago
Thanks raimue, that is good to know.

However, as far as I'm concerned, using clang to build MacVim is still 
unsupported.  I have only tested with gcc and the few times I've used clang 
I've run into some kind of problems.

That being said, as long as both the Vim *and* MacVim binaries are built using 
the same compiler it theoretically should work.  People who are suffering from 
the "no windows" problem are most likely using two compilers.  I strongly 
advise using the latest snapshot (downloaded from this site) instead of trying 
to build your own in this case.

Original comment by bjorn.winckler@gmail.com on 26 Jul 2012 at 11:02

GoogleCodeExporter commented 9 years ago
I had this same problem just yesterday using Mac OS X 10.7.4, Xcode 4.4 and 
homebrew. Eventually, I figured out that it was an issue that homebrew was 
using two compilers like was mentioned in 
http://code.google.com/p/macvim/issues/detail?id=384#c14. I was able to fix it 
by changing two lines in homebrew as follows:

    For the two lines that look like this:
        ENV['CC'] = nil
        .... and ...
        ENV['CXX'] = nil

    Replace nil with 'clang'

I'm not sure if this is going to work for everyone. If you watch this in 
verbose mode you will get various warnings and I'm not sure how well this works 
under all circumstances, but I hope it helps someone!

Original comment by somnium...@gmail.com on 4 Aug 2012 at 7:41

GoogleCodeExporter commented 9 years ago
I just stumbled over this issue today and wanted to help the future Google 
users. 

MavVim now needs to be compiled with clang not gcc.

Set clang as your C compiler with a 
  CC=clang
before you build.

Original comment by leonard....@gmail.com on 5 Feb 2013 at 11:30

GoogleCodeExporter commented 9 years ago
Indeed the correct way to build on Lion and later is "CC=clang ./configure; 
make" so I'll close this issue now.

Original comment by bjorn.winckler@gmail.com on 12 Feb 2013 at 8:39