[Python-bugs-list] [ python-Bugs-794140 ] cygwin builds do not embed
SourceForge.net
noreply at sourceforge.net
Tue Aug 26 05:05:29 EDT 2003
Bugs item #794140, was opened at 2003-08-24 10:18
Message generated for change (Comment added) made by dradul
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=794140&group_id=5470
Category: Build
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alejandro Lopez-Valencia (dradul)
Assigned to: Jason Tishler (jlt63)
Summary: cygwin builds do not embed
Initial Comment:
As an example case, try to build a copy of vim with an
embeded python interpreter:
"""
indow.o objects/if_python.o objects/py_config.o
objects/netbeans.o object
s/version.o -lncurses -liconv -lintl -
L/usr/lib/python2.3/config -lpyt
hon2.3 -lutil -lm
objects/py_config.o(.data+0x4):config.c: referencia a
`_initthread' sin definir
objects/py_config.o(.data+0xc):config.c: referencia a
`_initsignal' sin definir
objects/py_config.o(.data+0x14):config.c: referencia a
`_initposix' sin definir
objects/py_config.o(.data+0x1c):config.c: referencia a
`_initerrno' sin definir
objects/py_config.o(.data+0x24):config.c: referencia a
`_init_sre' sin definir
objects/py_config.o(.data+0x2c):config.c: referencia a
`_init_codecs' sin defini
r
"""
As you can see, it doesn't embed.
I have tracked down the failure to a problem in the
LDSHARED defaults provided by configure.in. The default
supplied is:
LDSHARED="gcc -shared -Wl,--enable-auto-image-
base";;
but this *does not* work. As per Cygwin documentation
on the creation of DLLs, this works (already tested
compiling vim under the same conditions):
LDSHARED="gcc -shared -Wl,--enable-auto-image-base -
Wl,--export-all-symbols -Wl,--enable-auto-import";;
As a side note, please notice that this problem, proper
user of GNU ld flags under win32, has a direct impact on
the possible success of a true Mingw32 port (which I
expect eagerly).
----------------------------------------------------------------------
>Comment By: Alejandro Lopez-Valencia (dradul)
Date: 2003-08-26 06:05
Message:
Logged In: YES
user_id=659006
Opps!
Sorry, my link fell down in the middle of submitting the form.
----------------------------------------------------------------------
Comment By: Alejandro Lopez-Valencia (dradul)
Date: 2003-08-26 06:00
Message:
Logged In: YES
user_id=659006
Ramifications to changing LDSHARED? I don't perceive any
besides having slightly bigger dlls, and the possibility to
extract symbol definitions and create import libraries out of
plugins, perhaps even linking extensoins directly (as in writing
derivative extensions from, say, Numeric).
Adding -Wl,--enable-auto-import doesn't modify the defaults
but hushes the linker, less perturbing line noise in stderr.
On giving you an example, I only use python under cygwin
and having just managed to build my first embedded vim, I'm
starting to experiment. There are some reasonable examples
in vim's documentation (see ':h if_pyth.txt'). This works for
me:
1. Type a line of text. Leave cursor on line.
2. Enter command mode and type:
python import vim; vim.current.line = vim.current.line.upper
()
And about your "Huh?", this is the python bug tracker last
time I checked. The issue is a GNU ld/Win32 issue, not
necessarily exclusive to Cygwin. I am leaving a hint for future
developers.
Cheers.
----------------------------------------------------------------------
Comment By: Alejandro Lopez-Valencia (dradul)
Date: 2003-08-26 05:57
Message:
Logged In: YES
user_id=659006
Ramifications to changing LDSHARED? I don't perceive any
besides having slightly bigger dlls, and the possibility to
extract symbol definitions and create import libraries out of
plugins, perhaps even linking extensoins directly (as in writing
derivative extensions from, say, Numeric).
Adding -Wl,--enable-auto-import doesn't modify the defaults
but hushes the linker, less perturbing line noise in stderr.
On giving you an example, I only use python under cygwin
and having just managed to build my first embedded vim, I'm
starting to experiment. There are some reasonable examples
in vim's documentation (see ':h if_pyth.txt'). This works for
me:
1. Type a line of text. Leave cursor on line.
2. Enter command mode and type:
python import vim; vim.current.line = vim.current.line.upper
()
And about your "Huh?", this is the python bug tracker last
time I checked. The issue is a GNU ld/Win32 issue, not
necessarily exclusive to Cygwin. I am leaving a hint for future
developers.
Cheers.
----------------------------------------------------------------------
Comment By: Jason Tishler (jlt63)
Date: 2003-08-25 13:32
Message:
Logged In: YES
user_id=86216
AFAICT, changing LDSHARED will affect building extensions
too. So, I am very hesitant to change its definition without
fully understanding the ramifications. Note that Cygwin
Python extensions have been working for almost three
years now. Additionally, I WAG that there are many more
people building extensions than embedding.
> LDSHARED="gcc -shared -Wl,--enable-auto-image-base
> -Wl,--export-all-symbols -Wl,--enable-auto-import";;
I can understand why adding "-Wl,--export-all-symbols"
fixes the above link errors. However, I don't understand
why "-Wl,--enable-auto-import" would help. IIRC, it
defaults to enabled anyway. Does vim with an
embeded python interpreter build without this option?
Can you provide me a small embedded example so I
can do some testing? Using vim seems a bit unwieldy.
> As a side note, please notice that this problem, proper
> user of GNU ld flags under win32, has a direct impact on
> the possible success of a true Mingw32 port (which I
> expect eagerly).
Huh? How is this related to the report Cygwin problem?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=794140&group_id=5470
More information about the Python-bugs-list
mailing list