Tcl Source Code

View Ticket
Login
2026-04-20
11:59
Follow-up to [ad08bca6b1] fix: unbreak Thread build with Tcl 8 headers (user: jan.nijtmans) check-in: 7c1522f896 user: jan.nijtmans tags: core-9-0-branch
11:53 • Ticket [ad08bca6b1] Building sqlite3 for tcl8 redefines typedef status still... artifact: aa21e0d577 user: jan.nijtmans
2026-04-19
19:46
Follow-up to [ad08bca6b1] fix: unbreak Itcl build with Tcl 8 headers check-in: 67ebec8a77 user: jan.nijtmans tags: core-9-0-branch
2026-04-16
11:57 • Closed ticket [ad08bca6b1]: Building sqlite3 for tcl8 redefines typedef plus... artifact: 8ea2f52442 user: apnadkarni
11:56 • Open ticket [ad08bca6b1]. artifact: 70a50d74c4 user: apnadkarni
2026-04-15
08:31 • Closed ticket [ad08bca6b1]. artifact: 1c7b74e605 user: jan.nijtmans
08:29
Fix [ad08bca6b1]: Building sqlite3 for tcl8 redefines typedef check-in: b6a50a0482 user: jan.nijtmans tags: core-9-0-branch
2026-04-13
01:47 • New ticket [ad08bca6b1] Building sqlite3 for tcl8 redefines typedef. artifact: 6b89865dcc user: anonymous

Ticket UUID: ad08bca6b16d069fb303d20f7feebd0952eff38d
Title: Building sqlite3 for tcl8 redefines typedef
Type: Bug Created on: 2026-04-13 01:47:19
Submitter: anonymous Assigned to: jan.nijtmans
Subsystem: 81. Bundled Packages Severity: Important
Priority: 5 Medium Last modified: 2026-04-20 11:53:26
Status: Closed Closed by: jan.nijtmans
Resolution: Fixed Closed on: 2026-04-20 11:53:26
Version: 9.0.3
Description:
tcl.h does this:

#if TCL_MAJOR_VERSION < 9
# ifndef Tcl_Size
    typedef int Tcl_Size;
# endif
...

tclsqlite3.c does this:

#if TCL_MAJOR_VERSION==9
# define CONST const
#elif !defined(Tcl_Size)
  typedef int Tcl_Size;
#endif

Since Tcl_Size is never defined as a macro, the #ifndef guards don't help, and pre-C11 compilers error like so:

/opt/bblocal/var/buildworker/base/build/vendor/tcl/pkgs/sqlite3.51.0/generic/tclsqlite3.c:56:15: error: redefinition of typedef 'Tcl_Size' is invalid in C [-Wtypedef-redefinition]
  typedef int Tcl_Size;
              ^
In file included from /opt/bblocal/var/buildworker/base/build/vendor/tcl/pkgs/sqlite3.51.0/generic/tclsqlite3.c:47:
/opt/bblocal/var/buildworker/base/build/vendor/tcl/generic/tcl.h:326:17: note: previous definition is here
    typedef int Tcl_Size;
                ^
User Comments:
jan.nijtmans added on 2026-04-15 08:31:56:

Thanks for the report!

Should be fixed [b6a50a0482cf3db3|here]. Done in Tcl, because sqlite3 won't be the only extension suffering from this when using a pre-c11 compiler.

pre-c11 compilers are dying out, that's most likely the reason this wasn't reported before.


apnadkarni added on 2026-04-16 11:56:45:

Re-opened because GH builds break on all platforms.


apnadkarni added on 2026-04-16 11:57:57:
Closing - race condition in re-opening and fix being committed.

jan.nijtmans added on 2026-04-20 11:53:26:

See also d3f41333aa, which is also an instance of basically the same bug.