2009/2/17 Danek Duvall: > > On Tue, Feb 17, 2009 at 10:42:00PM +0100, björn wrote: > >> The following bit of configure.in looked a bit strange, so I changed >> it. No idea what that special "if" for MACOSX does though. > > Well, there's that comment: > > dnl For Mac OSX 10.2 config.o is included in the Python library. > > Can't speak to its relevance, though. > >> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall >> -Wno-unknown-pragmas -pipe -I. -Iproto -DMACOS_X_UNIX -no-cpp-precomp >> -I/Developer/Headers/FlatCarbon -g -O -D_FORTIFY_SOURCE=1 >> -DDYNAMIC_PYTHON >> -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 >> -Kpic -o objects/if_python.o if_python.c > > -Kpic is specific to the Sun compiler. I'm not sure what gcc did with > that, but it should probably be -fpic. > >> gcc -o if_python.so objects/if_python.o objects/py_config.o >> Undefined symbols: >> "_initimp", referenced from: >> __PyImport_Inittab in py_config.o >> "_ml_get_buf", referenced from: >> _RBSlice in if_python.o >> _GetBufferLine in if_python.o >> "_u_savesub", referenced from: >> _SetBufferLine in if_python.o >> "_PyInt_Type", referenced from: >> _PyInt_Type$non_lazy_ptr in if_python.o >> "_ml_append", referenced from: >> _RBAssSlice in if_python.o >> _RBAppend in if_python.o >> _RBAppend in if_python.o >> "_win_setwidth", referenced from: >> _WindowSetattr in if_python.o >> "_init_symtable", referenced from: >> __PyImport_Inittab in py_config.o >> "_curwin", referenced from: >> _curwin$non_lazy_ptr in if_python.o > > This is probably happenine because gcc isn't being told to create a shared > library. My patch used -G to pass to Studio cc, but gcc takes -shared. > > Not sure if those two changes will be sufficient, but they're likely > necessary.
Well, this is turning out to be quite complicated. After quite a bit of searching I found that passing -dynamic -undefined suppress -flat_namespace when linking if_python.so gets rid of all those error messages. So the relevant lines inside Makefile should say something like: $(PYTHON_SO): $(PYTHON_SO_OBJ) $(CClink) -dynamic -undefined suppress -flat_namespace $(PYTHON_SO_LIBS) -o $@ $(PYTHON_SO_OBJ) However, trying ":py print 'hi'" inside Vim results in a crash (SEGV). I know that's not at all helpful but I just wanted to say that I am trying to get this patch to work on OS X. To anybody else using OS X: feel free to help me out here. At any rate, I'll give this another go when I get a chance again (next weekend perhaps). Björn --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---