Opened 10 years ago

Last modified 12 months ago

#44624 assigned defect

vim+universal+ruby18 fails to build because of missing rb_num2uint symbol in i386 slice of libruby.dylib

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: universal Cc:
Port: vim MacVim

Description (last modified by jeremyhu (Jeremy Huddleston Sequoia))

make[2]: Leaving directory `/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_editors_vim/vim/work/vim74/src/po'
  /usr/bin/clang -L/opt/local/lib  -L/opt/local/lib   -L. -L/opt/local/lib -Wl,-headerpad_max_install_names  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -L/usr/local/lib 	-o vim objects/buffer.o objects/blowfish.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/mark.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/sha256.o objects/spell.o objects/syntax.o  objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o objects/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o objects/gui_beval.o    objects/if_python.o   objects/if_ruby.o   objects/netbeans.o  objects/main.o objects/memfile.o   -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgio-2.0 -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -lfreetype  -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm  -lncurses -liconv -lintl    -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7   -lruby -lpthread -ldl -lobjc  -L/opt/local/lib   
Undefined symbols for architecture i386:
  "_rb_num2uint", referenced from:
      _window_set_cursor in if_ruby.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [vim] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_editors_vim/vim/work/vim74/src'
...

~/src/macports $ nm -arch i386 /opt/local/lib/libruby.dylib | grep rb_num2uint

~/src/macports $ nm -arch x86_64 /opt/local/lib/libruby.dylib | grep rb_num2uint
000000000004266e T _rb_num2uint

This is because the function is only available in 64bit ruby where int != long. vim handles this by checking macros that are set at configure time rather than build time:

# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
#  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
#   define rb_fix2int                   dll_rb_fix2int
#   define rb_num2int                   dll_rb_num2int
#  endif
#  define rb_num2uint                   dll_rb_num2uint
# endif

I suggest vim use muniversal to address this

Change History (4)

comment:1 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Description: modified (diff)

comment:2 Changed 9 years ago by raimue (Rainer Müller)

Port: vim-app MacVim added
Status: newassigned

Also affects MacVim, #40897.

comment:3 Changed 9 years ago by raimue (Rainer Müller)

Port: vim-app removed

comment:4 Changed 12 months ago by raimue (Rainer Müller)

Keywords: universal added
Note: See TracTickets for help on using tickets.