#11936 closed defect (fixed)
port install vim +ruby fails to build, conflict between ruby and OpenTransport.h
Reported by: | jeremy@… | Owned by: | kballard (Lily Ballard) |
---|---|---|---|
Priority: | High | Milestone: | |
Component: | ports | Version: | 1.4.3 |
Keywords: | vim ruby | Cc: | pipping@… |
Port: |
Description
This is really an upstream bug for vim I think, as this happens with the original source with -extras.tar.gz applied to it.
ports install vim +ruby [...] In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:45, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:25, from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, from /Developer/Headers/FlatCarbon/Quickdraw.h:1, from os_mac.h:26, from vim.h:304, from if_ruby.c:63: /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransport.h:723: error: parse error before numeric constant make[1]: *** [objects/if_ruby.o] Error 1 make: *** [all] Error 2 Error: Target com.apple.build returned: shell command " cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_editors_vim/work/vim71b" && make all " returned error 2 Command output: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/mbyte.o mbyte.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/normal.o normal.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/ops.o ops.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/option.o option.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/os_unix.o os_unix.c creating auto/pathdef.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/pathdef.o auto/pathdef.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/popupmnu.o popupmnu.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/quickfix.o quickfix.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/regexp.o regexp.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/screen.o screen.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/search.o search.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/spell.o spell.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/syntax.o syntax.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/tag.o tag.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/term.o term.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/ui.o ui.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/undo.o undo.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/window.o window.c gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -O -I/opt/local/lib/ruby/1.8/i686-darwin8.9.1 -o objects/if_ruby.o if_ruby.c In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:45, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:25, from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, from /Developer/Headers/FlatCarbon/Quickdraw.h:1, from os_mac.h:26, from vim.h:304, from if_ruby.c:63: /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransport.h:723: error: parse error before numeric constant make[1]: *** [objects/if_ruby.o] Error 1 make: *** [all] Error 2 Warning: the following items did not execute (for vim): com.apple.activate com.apple.build com.apple.destroot com.apple.install Error: Status 1 encountered during processing.
I'm not sure where this bug should really go, it appears to be an upstream vim bug, but it be a ruby/Carbon bug too. It just appears in Vim since that is bringing the two of them together. It appears that T_DATA is defined in both OSTransport.h in the CoreServices Framework as an enum and in the ruby language in ruby.h as a #define
Change History (6)
comment:1 Changed 18 years ago by kballard (Lily Ballard)
comment:2 Changed 18 years ago by kballard (Lily Ballard)
Milestone: | → Port Bugs |
---|---|
Version: | → 1.4.3 |
comment:3 Changed 18 years ago by kballard (Lily Ballard)
After further reflection, it appears that the problem is that this workaround code comes before the #include "vim.h"
line, and so the MACOS macro hasn't been defined yet.
Moving the code to after the #include "vim.h"
line won't work as that line is what pulls in the OpenTransport.h include and thus the conflict.
comment:4 Changed 18 years ago by kballard (Lily Ballard)
Owner: | changed from pipping@… to eridius@… |
---|
I've fixed it locally and submitted the bug upstream. Unfortunately I'm having trouble authorizing for the svn commit at the moment. I'll try again after I get some sleep.
comment:5 Changed 18 years ago by kballard (Lily Ballard)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r25042
Oddly, if_ruby.c has some code that attempts to work around this issue but it seems to, well, not work.