|
2024-08-24
| ||
| 12:04 | Merge [7af5aa42775d559b]: Fix [a606b0a528]: Tcl 9.0 fails to build from source for big-endian archit... check-in: 19add00eae user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE | |
|
2023-11-26
| ||
| 22:29 | • Closed ticket [a606b0a528]: Tcl 9.0 fails to build from source for big-endian ar... artifact: c1400fec0d user: jan.nijtmans | |
| 22:21 | Fix [a606b0a528]: Tcl 9.0 fails to build from source for big-endian architectures check-in: 7af5aa4277 user: jan.nijtmans tags: trunk, main | |
| 21:44 | • Ticket [a606b0a528] Tcl 9.0 fails to build from source for big-endian architectu... artifact: cdb121a7e3 user: chrstphrchvz | |
| 19:05 | • New ticket [a606b0a528]. artifact: 0daef1ee6b user: anonymous | |
Tcl 9.0 fails to build from source for big-endian architectures
Currently, Tcl 9 fails to build from source on big-endian architecture with the following error messages:
In file included from /<<PKGBUILDDIR>>/generic/tclUtf.c:12:
/<<PKGBUILDDIR>>/generic/tclInt.h:4644:43: error: expected declaration specifiers or ‘...’ before ‘(’ token
4644 | # define TclUniCharNcmp(cs,ct,n) memcmp((cs),(ct),(n)*sizeof(Tcl_UniChar))
| ^
/<<PKGBUILDDIR>>/generic/tclUtf.c:1878:1: note: in expansion of macro ‘TclUniCharNcmp’
1878 | TclUniCharNcmp(
| ^~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/generic/tclInt.h:4644:48: error: expected declaration specifiers or ‘...’ before ‘(’ token
4644 | # define TclUniCharNcmp(cs,ct,n) memcmp((cs),(ct),(n)*sizeof(Tcl_UniChar))
| ^
/<<PKGBUILDDIR>>/generic/tclUtf.c:1878:1: note: in expansion of macro ‘TclUniCharNcmp’
1878 | TclUniCharNcmp(
| ^~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/generic/tclInt.h:4644:53: error: expected declaration specifiers or ‘...’ before ‘(’ token
4644 | # define TclUniCharNcmp(cs,ct,n) memcmp((cs),(ct),(n)*sizeof(Tcl_UniChar))
| ^
/<<PKGBUILDDIR>>/generic/tclUtf.c:1878:1: note: in expansion of macro ‘TclUniCharNcmp’
1878 | TclUniCharNcmp(
| ^~~~~~~~~~~~~~
(full log can be found at Debian buildd log site)
As far as I can see, the macro definition of TclUniCharNcmp from tclInt.h (line 4644) clashes with the function definition with the same name in tclUtf.c (line 1878). The bug didn't show in Tcl 8.* because they set TCL_UTF_MAX=3 while TCL_UTF_MAX=4 for Tcl 9.
19add00eaeMerge [7af5aa42775d559b]: Fix [a606b0a528]: Tcl 9.0 fails to build from source for big-endian architectures. check-in2024-08-24 12:04:287af5aa4277Fix [a606b0a528]: Tcl 9.0 fails to build from source for big-endian architectures check-in2023-11-26 22:21:08
As already done for other functions with both macro and function implementations, I predict this will be fixed by putting #undef TclUniCharNcmp before the actual function definition in tclUtf.c.
In this case, the macro TclUniCharNcmp() isn't used anywhere, so a better solution is just to remove it completely.
Thanks for the report! Should be fixed now.