#7 Compile failure on VC6sp5

closed-fixed
None
5
2014-11-28
2002-05-13
Anonymous
No

K:\tmp\gadfly-1.0.0rc1>cd kjbuckets

K:\tmp\gadfly-1.0.0rc1\kjbuckets>setup install
running install
running build
running build_ext
building 'kjbuckets' extension
d:\VisStudio\VC98
\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX -IJ:\Python22
\include /Tckjbucketsmodule
.c /Fobuild\temp.win32-2.2\Release\kjbucketsmodule.obj
kjbucketsmodule.c

kjbucketsmodule.c(3301) : error C2099: initializer is
not a constant

kjbucketsmodule.c(3303) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'char *'
kjbucketsmodule.c(3304) : warning
C4047: 'initializing' : 'char *' differs in levels of
indirect
ion from 'unsigned int '
kjbucketsmodule.c(3306) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'void (__cdecl *)(struct _object *)'
kjbucketsmodule.c(3308) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _iobuf *,int )' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _ob
ject *,char *)'
kjbucketsmodule.c(3309) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *,char *)' differs in levels of indirection
from 'int (__cdecl *)(struct _object *,char *,
struct _object *)'
kjbucketsmodule.c(3311) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _object *)' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _object
*)'
kjbucketsmodule.c(3312) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *)' differs in levels of indirection
from 'struct PyNumberMethods *'
kjbucketsmodule.c(3313) : warning
C4133: 'initializing' : incompatible types -
from 'struct PySe
quenceMethods *' to 'struct PyNumberMethods *'
kjbucketsmodule.c(3314) : warning
C4133: 'initializing' : incompatible types -
from 'struct PyMa
ppingMethods *' to 'struct PySequenceMethods *'
kjbucketsmodule.c(3315) : warning
C4047: 'initializing' : 'struct PyMappingMethods *'
differs in
levels of indirection from 'long (__cdecl *)(struct
_object *)'
kjbucketsmodule.c(3321) : error C2099: initializer is
not a constant
kjbucketsmodule.c(3323) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'char *'
kjbucketsmodule.c(3324) : warning
C4047: 'initializing' : 'char *' differs in levels of
indirect
ion from 'unsigned int '
kjbucketsmodule.c(3326) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'void (__cdecl *)(struct _object *)'
kjbucketsmodule.c(3328) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _iobuf *,int )' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _ob
ject *,char *)'
kjbucketsmodule.c(3329) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *,char *)' differs in levels of indirection
from 'int (__cdecl *)(struct _object *,char *,
struct _object *)'
kjbucketsmodule.c(3331) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _object *)' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _object
*)'
kjbucketsmodule.c(3332) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *)' differs in levels of indirection
from 'struct PyNumberMethods *'
kjbucketsmodule.c(3333) : warning
C4133: 'initializing' : incompatible types -
from 'struct PySe
quenceMethods *' to 'struct PyNumberMethods *'
kjbucketsmodule.c(3334) : warning
C4133: 'initializing' : incompatible types -
from 'struct PyMa
ppingMethods *' to 'struct PySequenceMethods *'
kjbucketsmodule.c(3335) : warning
C4047: 'initializing' : 'struct PyMappingMethods *'
differs in
levels of indirection from 'long (__cdecl *)(struct
_object *)'

kjbucketsmodule.c(3341) : error C2099: initializer is
not a constant

kjbucketsmodule.c(3343) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'char *'
kjbucketsmodule.c(3344) : warning
C4047: 'initializing' : 'char *' differs in levels of
indirect
ion from 'unsigned int '
kjbucketsmodule.c(3346) : warning
C4047: 'initializing' : 'int ' differs in levels of
indirectio
n from 'void (__cdecl *)(struct _object *)'
kjbucketsmodule.c(3348) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _iobuf *,int )' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _ob
ject *,char *)'
kjbucketsmodule.c(3349) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *,char *)' differs in levels of indirection
from 'int (__cdecl *)(struct _object *,char *,
struct _object *)'
kjbucketsmodule.c(3351) : warning
C4047: 'initializing' : 'int (__cdecl *)(struct
_object *,stru
ct _object *)' differs in levels of indirection
from 'struct _object *(__cdecl *)(struct _object
*)'
kjbucketsmodule.c(3352) : warning
C4047: 'initializing' : 'struct _object *(__cdecl *)
(struct _o
bject *)' differs in levels of indirection
from 'struct PyNumberMethods *'
kjbucketsmodule.c(3353) : warning
C4133: 'initializing' : incompatible types -
from 'struct PySe
quenceMethods *' to 'struct PyNumberMethods *'
kjbucketsmodule.c(3354) : warning
C4133: 'initializing' : incompatible types -
from 'struct PyMa
ppingMethods *' to 'struct PySequenceMethods *'
kjbucketsmodule.c(3355) : warning
C4047: 'initializing' : 'struct PyMappingMethods *'
differs in
levels of indirection from 'long (__cdecl *)(struct
_object *)'
error: command 'd:\VisStudio\VC98\BIN\cl.exe' failed
with exit status 2

K:\tmp\gadfly-1.0.0rc1\kjbuckets>

Discussion

  • Richard Jones

    Richard Jones - 2002-05-14

    Logged In: YES
    user_id=6405

    Please attach the compile log as a file. That's
    unreadable.
    [make sure you check the "Check to Upload &
    Attach File:" box]

     
  • Nobody/Anonymous

    Logged In: NO

    Attached comile log

     
  • Richard Jones

    Richard Jones - 2002-05-14

    Logged In: YES
    user_id=6405

    Nope, no file. Did you check the checkbox?

     
  • Richard Jones

    Richard Jones - 2002-05-14

    Logged In: YES
    user_id=6405

    Bug detail from the original issue author:

    kjbucketsmodule.c(3301) : error C2099:
    initializer is not a constant
    kjbucketsmodule.c(3321) : error C2099:
    initializer is not a constant
    kjbucketsmodule.c(3341) : error C2099:
    initializer is not a constant

    I attempted to revert these lines to the version
    found in an earlier
    kjbuckets.tgz updated for python 2.2 I have by
    "jfarr@speakeasy.org" dated
    from 1/23/2002.
    The old line was: PyObject_HEAD_INIT(0).
    VC died during preprocessing with:
    kjbucketsmodule.c(3301) : fatal error C1021:
    invalid preprocessor command
    'PyObject_HEAD_INIT'

    VC6 does not seem to be happy with the
    PyObject_HEAD_INIT(0) macro defined
    in python22\include\object.h at line 68 or 73. I
    have not attempted to
    compile python 2.2.1, so I don't know if this is
    a python problem or not.

     
  • Nobody/Anonymous

    Logged In: NO

    SF does not support attaching a file to an add-on comment -
    there is no box to check.

    I did verify that the SF version of python-2.2.1 does
    compile on my system, so it's not likely a python problem,
    therefor, VC isn't happy with the way kjbuckets is using
    the PyObject_HEAD_INIT macro.

     
  • Richard Jones

    Richard Jones - 2002-05-14

    Logged In: YES
    user_id=6405

    This is a common problem with that compiler:
    http://www.python.org/doc/FAQ.html#3.24

    I will see if we can usefully patch the source.

     
  • Richard Jones

    Richard Jones - 2002-05-14
    • assigned_to: nobody --> richard
     
  • Richard Jones

    Richard Jones - 2002-05-14

    Logged In: YES
    user_id=6405

    I have patched the source in CVS - please try it.

     
  • Richard Jones

    Richard Jones - 2002-05-14
    • status: open --> open-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    I read the response to your post on the python mailing list
    and read the refrences posted by the responder. While i'm
    far from an apologist for Microsoft, I wouldn't call acting
    in a way consistant with the language standard a "problem
    with this compiler".

    I did check out the latest CVS as of 18:00 PDT on
    5/14/2002, compiled and installed it. I modified
    kjbuckets_select.py to display whether or not it loaded
    the .pyd file or the .pyc version. It loaded the .pyd
    version. I used the gftest.py script from a previous
    version of gadfly which is not in the current distro and
    that test ran too. I tried other trivial interactive sql
    statements and those worked.

    I would say the bug is resolved. Thanks for dealing with
    this so promptly! :)

     
  • Richard Jones

    Richard Jones - 2002-05-15

    Logged In: YES
    user_id=6405

    gftest has been subsumed by test/test_gadfly -
    which actually tests the results of the
    statements, rather than just running them.

    All appears to be ok with kjbucketsmodule.c now.
    Closing.

     
  • Richard Jones

    Richard Jones - 2002-05-15
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks