Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169237 - vim-7.0.201: compile fails on if_ruby.c when +ruby set
Summary: vim-7.0.201: compile fails on if_ruby.c when +ruby set
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: x86 OS X
: High normal (vote)
Assignee: osx porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-04 04:51 UTC by Doug Weimer
Modified: 2009-08-10 07:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch if_ruby.c to compile correctly with the ruby USE flag set. (vim-7.0.201-if_ruby.patch,374 bytes, patch)
2007-03-04 04:55 UTC, Doug Weimer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Weimer 2007-03-04 04:51:56 UTC
The following error occurs when building vim-7.0.201 with ruby set in the USE flags:

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:295,
                 from if_ruby.c:63:
/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransport.h:723: error: syntax error before numeric constant
make[1]: *** [objects/if_ruby.o] Error 1
make[1]: *** Waiting for unfinished jobs....       
make[1]: Leaving directory `/Users/dougw/Library/Gentoo/var/tmp/portage/app-editors/vim-7.0.201/work/vim7/src'
make: *** [first] Error 2 

Reproducible: Always

Steps to Reproduce:
1. USE="ruby" emerge vim

Actual Results:  
The compile fails with the error: 
/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OpenTransport.h:723: error: syntax error before numeric constant

Expected Results:  
The vim package is successfully installed.

A similar error was identified and patched by the macports project at http://trac.macports.org/projects/macports/changeset/20972 . The referenced patch (http://trac.macports.org/projects/macports/browser/trunk/dports/editors/vim/files/patch-if_ruby.c?rev=20972)  fixes the error.
Comment 1 Doug Weimer 2007-03-04 04:55:07 UTC
Created attachment 112013 [details, diff]
Patch if_ruby.c to compile correctly with the ruby USE flag set.

This patch is very similar to the macports version referenced above. I recreated it for epatch to work properly.
Comment 2 Fabian Groffen gentoo-dev 2007-03-17 23:06:10 UTC
I applied your patch, but didn't get a better result:

powerpc-apple-darwin8-gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon  -O2 -pipe -mcpu=G5 -mtune=G5 -mpowerpc64 -mpowerpc-gpopt     -I/Library/Gentoo/usr/include/python2.4  -I/Library/Gentoo/usr/lib/ruby/1.8/powerpc-darwin8  -o objects/buffer.o buffer.c
powerpc-apple-darwin8-gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon  -O2 -pipe -mcpu=G5 -mtune=G5 -mpowerpc64 -mpowerpc-gpopt     -I/Library/Gentoo/usr/include/python2.4  -I/Library/Gentoo/usr/lib/ruby/1.8/powerpc-darwin8  -o objects/charset.o charset.c
powerpc-apple-darwin8-gcc: unrecognized option '-no-cpp-precomp'
powerpc-apple-darwin8-gcc: unrecognized option '-no-cpp-precomp'
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 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:295,
                 from charset.c:10:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:111: error: expected specifier-qualifier-list before ‘vector’
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 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:295,
                 from buffer.c:28:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:111: error: expected specifier-qualifier-list before ‘vector’
make[1]: *** [objects/charset.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [objects/buffer.o] Error 1
make[1]: Leaving directory `/Library/Gentoo/var/tmp/portage/app-editors/vim-7.0.201/work/vim7/src'
make: *** [first] Error 2
 * If the above messages seem to be talking about perl
 * and undefined references, please try re-emerging both
 * perl and libperl with the same USE flags. For more
 * information, see:
 *     https://bugs.gentoo.org/show_bug.cgi?id=18129

!!! ERROR: app-editors/vim-7.0.201 failed.
Call stack:
  ebuild.sh, line 1694:   Called dyn_compile
  ebuild.sh, line 1051:   Called qa_call 'src_compile'
  environment, line 3617:   Called src_compile
  vim-7.0.201.ebuild, line 38:   Called vim_src_compile
  vim.eclass, line 490:   Called die



USE="nls python ruby* -acl -bash-completion -cscope (-gpm) -minimal -perl -vim-pager -vim-with-x (-mzscheme%)"
Comment 3 Fabian Groffen gentoo-dev 2007-07-03 17:53:54 UTC
are we still having this with Vim 7.1.* ?
Comment 4 Migo 2009-08-10 07:33:29 UTC
(In reply to comment #3)
> are we still having this with Vim 7.1.* ?
> 

We have that bug sill in Vim 7.2



--- code ---
if_ruby.c:73: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'objtbl'                                                       
if_ruby.c:75: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mVIM'                                                         
if_ruby.c:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cBuffer'                                                      
if_ruby.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cVimWindow'                                                   
if_ruby.c:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'eDeletedBufferError'                                          
if_ruby.c:79: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'eDeletedWindowError'                                          
if_ruby.c: In function 'ex_rubydo':                                                                                                         
if_ruby.c:353: error: 'VALUE' undeclared (first use in this function)                                                                       
if_ruby.c:353: error: (Each undeclared identifier is reported only once                                                                     
if_ruby.c:353: error: for each function it appears in.)                                                                                     
(...)
                                                                                   
make[1]: Leaving directory `/var/tmp/portage/app-editors/vim-7.2.238/work/vim72/src'                                                        
make: *** [first] Error 2