[ python-Bugs-1568243 ] init_types
SourceForge.net
noreply at sourceforge.net
Mon Oct 2 20:28:25 CEST 2006
Bugs item #1568243, was opened at 2006-09-30 09:34
Message generated for change (Comment added) made by coatimundi
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568243&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.5
Status: Open
Resolution: None
Priority: 6
Submitted By: Bosko Vukov (bvukov)
Assigned to: Martin v. Löwis (loewis)
Summary: init_types
Initial Comment:
I tried to build the final version of Python 2.5, and
found that function init_types in file Python-ast.c is
created as
int init_types(void) ....
but in file config.c it's declared as
extern void init_types(void);
Visual Studio 2005 didn't want to build the project
until I changed the config.c to be the same...
extern int init_types(void);
Nothing big ;)
Regards, Bosko
----------------------------------------------------------------------
Comment By: Coatimundi (coatimundi)
Date: 2006-10-02 18:28
Message:
Logged In: YES
user_id=1611513
I am expereincing the problem described by the original
poster. I undertand that MSVC8 is not officially supported,
and I'm trying anyway.
I downloaded the 2.5.0 final tarball and began working in
the PCbuild8 directory.
Firts off, I found that I had to build two projects before
pythoncore would build:
make_versioninfo
make_buildinfo
When I tried to build pythoncore, I got the linker error
saying that _init_types could not be found. So I added
_typesmodule.c to the pythoncore project. Finally,
pythoncore built cleanly.
Next up, I wanted to build pythoncore_pgo. So I added
_typesmodule to this project also. But try as I might,
every attempt to build pythoncore_pgo produces the link
error on _init_types. (I also did a 'clean' on pythoncore
just to be safe.)
I do not understand this. Unlike the original poster, I
have not modified any source. It seems like the definition
of pyMODINIT_FUNC as extern "C" void might be involved, but
I agree with gbrandl that the static int in Python-ast.c is
not the issue, because that is a different scope.
So the linkage problem with pythoncore_pgo remains a mystery
to me. I hope someone has more clues than me.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2006-10-02 14:00
Message:
Logged In: YES
user_id=21627
Notice that the PCbuild8 directory isn't really supported...
In any case, the bug is that PCbuild8 does not have the
reference to _typesmodule, not that init_types in
Python-ast.c is static.
If you revert your change to Python-ast.c, and change
pythoncore.vcproj, it should build fine.
This is already fixed in r51751 in the trunk; not sure
whether backporting it is necessary.
----------------------------------------------------------------------
Comment By: Bosko Vukov (bvukov)
Date: 2006-09-30 17:50
Message:
Logged In: YES
user_id=1292849
I opened solution file from folder PCbuild8, and inside
project file pythoncore.vcproj there is no reference to
_typesmodule.c. It exists in pythoncore.vcproj in the
PBbuild folder ( for older version's ). I added the missing
_typesmodule.c inside, and returned back the changes I made,
and aft er that linker reported 'Python-ast.obj : error
LNK2005: _init_types already defined in _typesmodule.obj'
----------------------------------------------------------------------
Comment By: Georg Brandl (gbrandl)
Date: 2006-09-30 11:27
Message:
Logged In: YES
user_id=849994
The problem is another one: The config.c init_types function
belongs to the _types module, while the Python-ast.c
init_types is an internal function. They shouldn't clash.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568243&group_id=5470
More information about the Python-bugs-list
mailing list