Thanks,
I think I know what the problem is...I'll try to fix it right away.
When I'm done I'll push and ask you to see if it works.
Björn
Please try to pull and build now...I think I got rid of all the 10.4u
sdk references.
Björn
Ooops...the Sparkle framework did not get copied in the last commit.
I've patched this and pushed the fix. Make sure you have the "Copy
Sparkle framework into app bundle" commit before you try.
Björn
Please try building the icons manually to see if that works first.
Just cd into the "src/MacVim/icons" folder and type "make". Does that
work?
Björn
Ugh. Have the Scrap functions been removed from the Carbon framework
in 10.6 by any chance? I'm afraid we'll have to ask Nico (who wrote
the icon generation stuff) to take a look at this when he reads this.
For now, you may be able to bypass the icon generation by going into
icons/Makefile and deleting line 6. Then go into icons/make_icons.py
and set dont_create to True on line 22. I don't know if that will
work, but you may be able to get it to work yourself.
Björn
Oh, fun. I'll take a look some time this week (probably next weekend).
I might take a look at QuickCursor too, but no promises.
Nico
Nico,
Thanks for the quick response and the patch.
I've pushed this patch to the repo. Can somebody with Snow Leopard
confirm that MacVim builds cleanly now?
Björn
=== BUILD NATIVE TARGET PSMTabBarControlFramework OF PROJECT
PSMTabBarControl WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
=== BUILD NATIVE TARGET Edit in ODBEditor OF PROJECT Edit in ODBEditor
WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
=== BUILD NATIVE TARGET MacVim OF PROJECT MacVim WITH THE DEFAULT
CONFIGURATION (Release) ===
Check dependencies
PhaseScriptExecution "Make Document Icons" build/MacVim.build/Release/
MacVim.build/Script-1D1C31F00EFFBFD6003FE9A5.sh
cd /Users/travis/Documents/repos/vim7/src/MacVim
/bin/sh -c /Users/travis/Documents/repos/vim7/src/MacVim/build/
MacVim.build/Release/MacVim.build/Script-1D1C31F00EFFBFD6003FE9A5.sh
make -C makeicns
make[1]: `makeicns' is up to date.
/usr/bin/python make_icons.py /Users/travis/Documents/repos/vim7/src/
MacVim/build/Release/MacVim.app/Contents/Resources
MacVim-cpp
Command /bin/sh failed with exit code 2
Command /bin/sh failed with exit code 2
** BUILD FAILED **
The following build commands failed:
MacVim:
PhaseScriptExecution "Make Document Icons" /Users/travis/Documents/
repos/vim7/src/MacVim/build/MacVim.build/Release/MacVim.build/
Script-1D1C31F00EFFBFD6003FE9A5.sh
(1 failure)
The icon files are created sans anything on them:
Like that.
Can you provide the output from "make" inside the "icons/" directory
instead. The output from Xcode does not tell us what went wrong, only
that something went wrong. Remember to call "make clean" first as
well.
Thanks,
Björn
Can one of you add
print r
as line 52 in src/vim/src/MacVim/icons/docerator.py (above the `if`
line) and rerun this again, and then send the output to this list?
Thanks,
Nico
Interesting. Does SL load images lazily? Just to make sure, what's the
output of
ls -l /System/Library/CoreServices/CoreTypes.bundle/Contents/
Resources/GenericDocumentIcon.icns
? But since the size seems to be set, that file should be there? If
so, I have to do some digging… :-/
Nico
I just installed Snow Leopard myself. Here is what I found out:
Uncomment the test for format that caused the error on line 58 and it
asserts a little later:
/usr/bin/python make_icons.py .
MacVim-cpp
Traceback (most recent call last):
File "make_icons.py", line 198, in <module>
main()
File "make_icons.py", line 190, in main
textrenderer=SmallTextRenderer, backgroundrenderer=NoIconRenderer)
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
561, in makedocicon
makedocicon_opts(optsFromDict(**kwargs))
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
537, in makedocicon_opts
icons = dict([(s, renderer.createIconAtSize(s)) for s in sizes])
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
516, in createIconAtSize
return createIcon(s, self.bgRenderer, self.textRenderer, self.testtext)
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
365, in createIcon
output = bg.backgroundAtSize(s).copy()
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
204, in backgroundAtSize
self.drawAtSize(s)
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
194, in drawAtSize
self.bgRenderer.groundAtSize(s).draw()
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
147, in groundAtSize
self._performSplit(s)
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
161, in _performSplit
ground, shadow = splitGenericDocumentIcon(self.unsplitted, s)
File "/Users/winckler/macvim/src/MacVim/icons/docerator.py", line
242, in splitGenericDocumentIcon
assert ir == ig == ib
AssertionError
make: *** [MacVim-generic.icns] Error 1
Ok. So I comment out the assertion (what's going on here...if
alpha=255 then r=g=b is supposed to hold...but why?) and the script
works. But...the icons come out looking strange:
http://bjorn.winckler.googlepages.com/BROKEN-MacVim-vim.icns.zip
Nico: any clue what's going on. Let me know if you have any specific questions.
Anyway, I'm focussing on the rest of the compilations problems (seems
like the scrollbars never appear, lots of compilation warnings, etc.,
I'll post again when this is fixed).
Björn
I've pushed a whole set of patches to address various Snow Leopard
issues. MacVim compiles and runs fine on Snow Leopard now, bar the
problem with the icon generation. It is possible to work around this
issue by commenting out certain lines in the docerator.py script as
I've mentioned previously (in this thread) in case somebody wants to
build MacVim on 10.6.
ATSUI is disabled on 10.6 for now (still there for 10.5 and 10.4). If
Jiang manages to get it working I'll put it back in, otherwise I will
try to merge the CoreText branch when I get a chance (read: in several
weeks, or even months time). At any rate, the CoreText renderer works
so it is always possible to pull the feat/core-text branch to try it
out.
If anybody builds MacVim on 10.5 or 10.4, please let me know if it
still works or if I inadvertently broke something in the process.
Note: you will have to reconfigure (./configure ...) and clean the
entire project for all the patches to work.
Björn
I did a make clean and ./configure.
gcc -L/usr/local/lib -m32 -o Vim objects/buffer.o objects/
charset.o objects/diff.o objects/digraph.o objects/edit.o objects/
eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/
ex_eval.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/
getchar.o objects/hardcopy.o objects/hashtab.o objects/if_cscope.o
objects/if_xcmdsrv.o objects/main.o objects/mark.o objects/memfile.o
objects/memline.o objects/menu.o objects/message.o objects/misc1.o
objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o
objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o
objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/
screen.o objects/search.o objects/spell.o objects/syntax.o objects/
tag.o objects/term.o objects/ui.o objects/undo.o objects/window.o
objects/gui.o objects/pty.o objects/gui_macvim.o objects/MMBackend.o
objects/MacVim.o objects/os_macosx.o objects/os_mac_conv.o
objects/netbeans.o objects/version.o -framework Cocoa -framework
Carbon -lm -lncurses -liconv -lintl
link.sh: Linked OK
Looks fine
I removed the build folder from MacVIm
xcodebuild leads to:
he following build commands failed:
PSMTabBarControlFramework:
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMOverflowPopUpButton.o /Users/axel/src/MacVim/src/MacVim/
PSMTabBarControl/source/PSMOverflowPopUpButton.m normal i386 objective-
c com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMTabBarControl.o /Users/axel/src/MacVim/src/MacVim/PSMTabBarControl/
source/PSMTabBarControl.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/PSMTabBarCell.o /
Users/axel/src/MacVim/src/MacVim/PSMTabBarControl/source/
PSMTabBarCell.m normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/PSMAquaTabStyle.o /
Users/axel/src/MacVim/src/MacVim/PSMTabBarControl/source/
PSMAquaTabStyle.m normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMMetalTabStyle.o /Users/axel/src/MacVim/src/MacVim/PSMTabBarControl/
source/PSMMetalTabStyle.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMProgressIndicator.o /Users/axel/src/MacVim/src/MacVim/
PSMTabBarControl/source/PSMProgressIndicator.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMTabDragAssistant.o /Users/axel/src/MacVim/src/MacVim/
PSMTabBarControl/source/PSMTabDragAssistant.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC ../build/PSMTabBarControl.build/Release/
PSMTabBarControlFramework.build/Objects-normal/i386/
PSMUnifiedTabStyle.o /Users/axel/src/MacVim/src/MacVim/
PSMTabBarControl/source/PSMUnifiedTabStyle.m normal i386 objective-c
com.apple.compilers.gcc.4_0
MacVim:
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMAppController.o /Users/axel/src/MacVim/src/MacVim/MMAppController.m
normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMTextView.o /Users/axel/src/MacVim/src/MacVim/MMTextView.m normal
i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMVimController.o /Users/axel/src/MacVim/src/MacVim/MMVimController.m
normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMWindowController.o /Users/axel/src/MacVim/src/MacVim/
MMWindowController.m normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMFullscreenWindow.o /Users/axel/src/MacVim/src/MacVim/
MMFullscreenWindow.m normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMVimView.o /Users/axel/src/MacVim/src/MacVim/MMVimView.m normal i386
objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMPreferenceController.o /Users/axel/src/MacVim/src/MacVim/
MMPreferenceController.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
DBPrefsWindowController.o /Users/axel/src/MacVim/src/MacVim/
DBPrefsWindowController.m normal i386 objective-c
com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMPlugInManager.o /Users/axel/src/MacVim/src/MacVim/MMPlugInManager.m
normal i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
PlugInImpl.o /Users/axel/src/MacVim/src/MacVim/PlugInImpl.m normal
i386 objective-c com.apple.compilers.gcc.4_0
CompileC build/MacVim.build/Release/MacVim.build/Objects-normal/i386/
MMTextViewHelper.o /Users/axel/src/MacVim/src/MacVim/
MMTextViewHelper.m normal i386 objective-c com.apple.compilers.gcc.4_0
(19 failures)
This is on 10.5.8 with Xcode 3.1.3
Axel
Uh, where is the actual error? The output from xcodebuild is
semi-impossible to read but as far as I can tell that output did not
include the error messages. It may help if you open Xcode and build
from there, then look in the build window (Cmd-Shift-b).
Thanks,
Björn
Thanks Axel. The problem was that I used the availability macros
incorrectly (MAC_OS_X_VERSION_MAX_ALLOWED etc.) which was just now
pointed out to me in a private mail.
I've pushed a patch to the repo so MacVim should build on 10.5 again,
but please let me know if there are any other problems.
Björn
Builds fine on 10.5.8 over here. Thanks!
Nico
This looks like the problem that I patched last night. Try pulling
again and do a complete clean and rebuild. Let me know if it still
doesn't work (I'll need to proper build log though...what you pasted
does not actually include the error).
Björn
** BUILD SUCCEEDED **
Thank you!
Axel
Fix for icon generation on Snow Leopard is attached. It would be cool
if someone could test that things still work on Leopard with this :-P
Nico
Thanks Nico!
I'll merge this tonight (which translates to "in about 8h") and if
nobody has tested it on Leopard by then I'll just push the patch
anyway (my guess is that people would rather just git-pull and test
instead of applying a patch and test).
Björn
The following applies to 10.6.
git pulled the icon fix to my existing repo, but couldn't get it to
build for the life of me. I think I corrupted it while trying the
makeicns workaround.
Cloned a new repo, used the same exact build options, and it built
without a hitch.
As a side note, I can't build with rubyinterp using
ruby (1.8.7) from MacPorts. Anyone else get this?
Tim
Tim,
I'm guessing it has something to do with Ruby inculding "-arch x86_64"
in the LDFLAGS. I'm just about to post a patch to this problem. In
the meantime you'll have to edit src/auto/config.mk so that the
LDFLAGS does not include the above flag (which I'm guessing won't be
so easy to do with MacPorts...but if you download the source manually
it is).
Björn
Using the following:
ruby (MacPorts @1.8.7-p174)
MacVim (git master, HEAD=24d9b9)
Bjorn,
I pulled your most recent fix that included patches to
src/configure{,.in}. However, I'm still getting an error building
--with-rubyinterp.
The output is attached.
Did I misunderstand? Do I still need to build a custom ruby from
source? Or is there somethint else going on here?
Hope this helps,
Tim
On Sat, Sep 26, 2009 at 6:22 AM, Tim Hammerquist <pen...@gmail.com> wrote:
> ruby (MacPorts @1.8.7-p174)
> MacVim (git master, HEAD=24d9b9)
> Did I misunderstand? Do I still need to build a custom ruby from
> source? Or is there somethint else going on here?
MacVim (MacVim.app/Contents/MacOS/Vim) is for architecture i386.
ruby (libruby.dylib) is for architecture x86_64.
So, you need to install ruby with i386 x86_64 universal variant.
sudo port uninstall ruby (or deactivate)
sudo port install ruby +universal universal_archs="i386 x86_64"
By the way, in my experience,
"a combination of MacVim i386 and Vim x86_64" seems ok.
sakamoto
Thanks!
I build the ruby macport as you described and it, as well as a
MacVim+rubyinterp, built without any issues.
FYI, MacPorts' ruby19 port will not build with those universal args.
It's a very similar error:
ld: warning: in ./libruby1.9.dylib, file is not of required architecture
Undefined symbols for architecture i386:
"_ruby_options", referenced from:
_main in main.o
"_ruby_sysinit", referenced from:
_main in main.o
"_ruby_init_stack", referenced from:
_main in main.o
"_ruby_run_node", referenced from:
_main in main.o
"_ruby_init", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
For whatever reason, the same commands to the ruby19 port don't build a
compatible dylib. I haven't had a chance to go over the output, and
it's not a big deal. In any case, it's an issue for MacPorts, not you
good folk. :)
Thanks for all your help!
Tim
Oh no! Don't do this! Due to my complete non-experience with 64 bit
I have managed to screw up the usage of variable widths -- some
messages have structures like this:
long var1
int var2
If this is passed from 64 bit Vim to 32 bit MacVim things will go
"kaboom" (or something less severe).
This is the reason I forced the -m32 flag when building the Vim
binary. I will fix this properly when I get the time.
Björn
I fixed this problem now, so it should be safe to have Vim 64 bit and
MacVim 32 bit (not that you'd want to anyway, but that's no reason not
to fix this problem). At the same time I tried compiling MacVim 64
bit -- it is possible to get it to compile but you have to go into the
Xcode project files and force it to compile 64 bit (both for MacVim
and PSMTabBarControl). Beware though: there are masses of warnings,
some are really problems that I need to fix too.
Some observations regarding 64 bit MacVim:
1. File sizes in 64 bit:
-rwxr-xr-x 1 winckler staff 613928 Sep 27 21:57 MacVim
-rwxr-xr-x 1 winckler staff 2475280 Sep 27 21:57 Vim
... and 32 bit:
-rwxr-xr-x 1 winckler staff 334344 Sep 2 14:31 MacVim
-rwxr-xr-x 1 winckler staff 2083056 Sep 2 14:31 Vim
Seems the MacVim binary almost _doubles_ in size! (Why?)
2. Memory usage in Activity Monitor shows me that a newly started 64
bit MacVim uses 12.4 Mb, 32 bit uses 9.1 Mb (although these numbers do
tend to change so I wouldn't take this too seriously).
Björn
Thanks! I've checked it on Snow Leopard and Leopard.
It works fine.
(Without your fix, scroll bar doesn't work. I haven't noticed it.)
sakamoto
Good!
> (Without your fix, scroll bar doesn't work. I haven't noticed it.)
Yes. That appears to have been the only problem...I did not notice it
at first either! :-)
Björn
Actually, it would have to be a long array as I just found out [1] --
ints are still 4 bytes LP64. :-)
I scratched my head after posting that, so I decided to do another
clean build of 32 bit MacVim and I got this:
-rwxr-xr-x 1 winckler staff 495288 Sep 27 22:35 MacVim
-rwxr-xr-x 1 winckler staff 2196224 Sep 27 22:35 Vim
Both builds (64bit/32bit) were one architecture only, debug mode, Vim
with normal features only. However, I still don't understand why file
sizes are so different: the first 32 bit binary was also a debug build
[or at least so I thought...maybe it is not] and it is much smaller
(apparently its not a 64 bit vs 32 bit problem though).
Björn
[1] Table 2-1:
http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html
Hi Ernst,
The easiest would be to download the latest snapshot:
http://code.google.com/p/macvim/wiki/Snapshot
unless you need to configure special features (although the snapshot
contains the most common ones) in which case it is quite easy to build
your own. Just follow the build instructions:
http://code.google.com/p/macvim/wiki/Building
Björn