Tk Source Code

View Ticket
Login
Ticket UUID: 3516768
Title: Latest Tk head fails to compile in debug mode
Type: Bug Version: obsolete: 8.5.10
Submitter: tombert Created on: 2012-04-11 07:25:18
Subsystem: 85. Win Build Assigned To: jan.nijtmans
Priority: 8 Severity:
Status: Closed Last Modified: 2014-03-13 09:14:17
Resolution: Invalid Closed By: nijtmans
    Closed on: 2012-04-13 11:26:52
Description:
Compiling in Win XP, MinGW, Latest Tcl and Tk head 8.5.11;
The release compiles fine, but when using debug switch --enable-symbos it fails using the stdint.h.

gcc -c -g -Wall  -I"./../generic" -I"." -I"./../xlib" -I"./../bitmaps" -I"/e/CM.git/tcltk85/dcompile/tcl/generic" -I"/e/
CM.git/tcltk85/dcompile/tcl/win" -pipe -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRIN
G=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_ST
AT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -D
HAVE_UNISTD_H=1 -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int -DHAVE_WINNT_IGNORE_VOID=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_UXT
HEME_H=1 -DTCL_CFG_DEBUG=1  -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPA
CKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DTCL_CFGVAL_ENCODING=\"cp1252\" -DHAVE_SYS_T
YPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=
1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int -DHAVE_WINNT_IGNORE_VOID=1 -DHAVE_CAST
_TO_UNION=1 -DHAVE_INTPTR_T=1 -Duintptr_t=unsigned\ int -DTCL_CFG_DEBUG=1  -DUSE_TCL_STUBS -DBUILD_tk -DBUILD_ttk "./../
generic/tkMain.c" -o tkMain.o
In file included from d:\programs\mingw\bin\../lib/gcc/mingw32/4.6.2/include/stdint.h:3:0,
                 from d:\programs\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/process.h:18,
                 from e:/CM.git/tcltk85/dcompile/tcl/win/tclWinPort.h:61,
                 from e:/CM.git/tcltk85/dcompile/tcl/generic/tclPort.h:21,
                 from e:/CM.git/tcltk85/dcompile/tcl/generic/tclInt.h:36,
                 from ./../generic/tkMain.c:17:
d:\programs\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h:75:24: error: duplicate 'unsigned'
d:\programs\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/stdint.h:75:24: error: two or more data types in decl
aration specifiers
make: *** [tkMain.o] Error 1
User Comments: tombert added on 2012-04-11 21:05:53:
Sorry, there seems to be another problem.

My Git installation contains an tclConfig.sh which contains such a config:
# -D flags for use with the C compiler.
TCL_DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -Dinline=__inline -DSTDC_HEADERS=1 -DHAVE_NO_LPFN_DECLS=1 -DHAVE_NO_STRUCT_STAT32I64=1 -DHAVE_NO_FINDEX_ENUMS=1 -DTCL_CFGVAL_ENCODING=\"cp1252\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -Dintptr_t=int -Duintptr_t=unsigned\ int -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 '

My PATH variable is set to point to Git, but I wonder why tcl thought of looking there?
I deleted my tclConfig.sh and compiling tk immediately complains that this is missing - so it does look at the correct location.
I cleaned up all my debug and release compilations and cannot reproduce this issue any more.

I'am gona put this to invalid. If it happens again I know where to look at.

thx

nijtmans added on 2012-04-11 18:05:07:
I'm sorry but I cannot reproduce this, neither in mingw-w64
nor in mingw.

Thomas, how does line 75 of your stdint.h look like? Mine
looks like (from latest mingw):
     typedef unsigned int uintptr_t;

In your command line, I see -Duintptr_t=unsigned\ int,
so that means this line will become:
     typedef unsigned int unsigned int
Not strange that gcc complains about that.

How does the  -Duintptr_t=unsigned\ int come
there? My guess is that your Tk build picked up
a tclConfig.sh from somewhere, which was
produced by another compiler. Does
that make sense?

Regards,
           Jan Nijtmans