|
2025-10-30
| ||
| 09:20 | • Ticket [ac3ea87305] Don't assume that Windows has no usable zlib/tommath... artifact: cf886eb922 user: jan.nijtmans | |
|
2025-09-12
| ||
| 10:39 | • Closed ticket [84e8a94613]: trunk does not compile (link) on my Windows plus... artifact: 51ec99530c user: sl1200mk2 | |
| 10:06 | • Ticket [84e8a94613]: 3 changes artifact: 2ee0b2dc6e user: apnadkarni | |
| 07:19 | • Ticket [84e8a94613]: 3 changes artifact: b8c2a472f7 user: sl1200mk2 | |
| 07:16 | • Ticket [84e8a94613]: 3 changes artifact: ef3b6d7a35 user: sl1200mk2 | |
| 06:29 | • Ticket [84e8a94613]: 3 changes artifact: d3506915ff user: apnadkarni | |
|
2025-09-11
| ||
| 20:15 | • Ticket [84e8a94613]: 3 changes artifact: c81b37b9a0 user: jan.nijtmans | |
| 20:11 | • Ticket [84e8a94613]: 3 changes artifact: 65b7383398 user: jan.nijtmans | |
| 08:26 | • Ticket [84e8a94613]: 3 changes artifact: 3659965952 user: sl1200mk2 | |
| 07:12 | • Ticket [84e8a94613]: 3 changes artifact: 9793a3454d user: sl1200mk2 | |
|
2025-09-10
| ||
| 13:32 | • New ticket [84e8a94613]. artifact: 53afe15b7a user: sl1200mk2 | |
trunk does not compile (link) on my Windows
Closed / Works For Me84e8a94613b8cc3faf1b080c01c5ace981e9e9dbCreated 1 year agoUpdated 1 year ago
Descriptionplain2025-09-10 13:32:13
Hi, I'm using /ucrt64/bin/clang.exe as compiler on Windows and build is broken : libtcl9.1a1.zip successful created with /usr/bin/zip /ucrt64/bin/clang.exe -shared -o tcl91.dll -pipe -static-libgcc -municode -Wl,--disable-high-entropy-va -Wl,--enable-auto-image-base -Wl,--out-implib,libtcl91.dll.a regcomp.o regexec.o regfree.o regerror.o tclAlloc.o tclArithSeries.o tclAssembly.o tclAsync.o tclBasic.o tclBinary.o tclCkalloc.o tclClock.o tclClockFmt.o tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclCompCmds.o tclCompCmdsGR.o tclCompCmdsSZ.o tclCompExpr.o tclCompile.o tclConfig.o tclDate.o tclDictObj.o tclDisassemble.o tclEncoding.o tclEnsemble.o tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o tclHistory.o tclIcu.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o tclIOGT.o tclIORChan.o tclIORTrans.o tclIOSock.o tclIOUtil.o tclLink.o tclLiteral.o tclListObj.o tclListTypes.o tclLoad.o tclMainW.o tclMain.o tclNamesp.o tclNotify.o tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o tclOOMethod.o tclOOProp.o tclOOStubInit.o tclObj.o tclOptimize.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o tclPkg.o tclPkgConfig.o tclPosixStr.o tclPreserve.o tclProc.o tclProcess.o tclRegexp.o tclResolve.o tclResult.o tclScan.o tclStringObj.o tclStrIdxTree.o tclStrToD.o tclStubInit.o tclThread.o tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclTimer.o tclTomMathInterface.o tclTrace.o tclUtf.o tclUtil.o tclVar.o tclZipfs.o tclZlib.o utf8proc.o tclWin32Dll.o tclWinChan.o tclWinConsole.o tclWinSerial.o tclWinError.o tclWinFCmd.o tclWinFile.o tclWinInit.o tclWinLoad.o tclWinNotify.o tclWinPipe.o tclWinSock.o tclWinThrd.o tclWinTime.o tcl.res.o -lnetapi32 -lkernel32 -luser32 -ladvapi32 -luserenv -lws2_32 C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/compat/zlib/win64/libz.dll.a C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/libtommath/win64/libtommath.dll.a C:/msys64/ucrt64/bin/ld: tclEncoding.o:tclEncoding.c:(.text+0x4214): undefined reference to `__imp_utf8proc_map_custom' C:/msys64/ucrt64/bin/ld: tclEncoding.o:tclEncoding.c:(.text+0x4230): undefined reference to `__imp_utf8proc_errmsg' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1111): undefined reference to `__imp_utf8proc_toupper' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1216): undefined reference to `__imp_utf8proc_toupper' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1251): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1356): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x13ab): undefined reference to `__imp_utf8proc_totitle' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x140b): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1546): undefined reference to `__imp_utf8proc_totitle' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x176d): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1789): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1855): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1a34): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1c14): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1cac): undefined reference to `__imp_utf8proc_category' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1cdc): undefined reference to `__imp_utf8proc_category' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1d0c): undefined reference to `__imp_utf8proc_category' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1d3c): undefined reference to `__imp_utf8proc_category' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1d5c): undefined reference to `__imp_utf8proc_category' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1d8c): more undefined references to `__imp_utf8proc_category' follow C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x1ef4): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x20f3): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x22e9): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x232a): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x2364): undefined reference to `__imp_utf8proc_tolower' C:/msys64/ucrt64/bin/ld: tclUtf.o:tclUtf.c:(.text+0x23bc): more undefined references to `__imp_utf8proc_tolower' follow clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:588: tcl91.dll] Error 1 best regards, Nicolas
Referenced by1
cf886eb922Ticket [ac3ea87305] Don't assume that Windows has no usable zlib/tommath status still Open with 3 other changes ticket2025-10-30 09:20:36
sl1200mk2plain2025-09-11 07:12:58
https://core.tcl-lang.org/tcl/info/0a7def6dccc9e406 compiles fine https://core.tcl-lang.org/tcl/info/9e3f0254e393fed4 (TIP 726) does not compile ++
sl1200mk2plain2025-09-11 08:26:17
this makes my compiler happy:
--- /Users/nico/Downloads/tcl-original/utf8proc/utf8proc.h 2025-09-10 17:11:20
+++ /Users/nico/Downloads/tcl-mod/utf8proc/utf8proc.h 2025-09-11 10:17:17
@@ -76,6 +76,11 @@
#define UTF8PROC_VERSION_PATCH 0
/** @} */
+/* Tcl Windows build - force static */
+#if defined(_WIN32) && !defined(UTF8PROC_STATIC)
+#define UTF8PROC_STATIC
+#endif
+
#include <stdlib.h>
#if defined(_MSC_VER) && _MSC_VER < 1800
@@ -129,7 +134,7 @@
# else
# define UTF8PROC_DLLEXPORT __declspec(dllimport)
# endif
-# elif __GNUC__ >= 4
+# elif defined(__GNUC__) && __GNUC__ >= 4 && !defined(_WIN32)
# define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default")))
# else
# define UTF8PROC_DLLEXPORT
jan.nijtmanswiki2025-09-11 20:11:16
I cannot reproduce this, since -DUTF8PROC_STATIC is already in the command-line. So, it shouldn't be necessary to define it in utf8proc.h (which would be the wrong place anyway)
Do you use any extra "configure" flags? Can you share your config.log file?
jan.nijtmanswiki2025-09-11 20:15:07
I tried it with (configured with ucrt):
$ x86_64-w64-mingw32-clang --version
clang version 14.0.0 (https://github.com/llvm/llvm-project.git f5f0bd8e3d972d040827c88adf1a9880ebcb821e)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /Users/jan/llvm-mingw/bin
apnadkarniplain2025-09-12 06:29:08
+1 to Jan's comment.
sl1200mk2plain2025-09-12 07:16:11
Hi,
so I've tried latest trunk and now Tcl does not compile at all on my system.
/ucrt64/bin/clang.exe -c -I"." -I"C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/generic" -I"C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/libtommath" -I"C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/compat/zlib" -I"C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/win" -O3 -g0 -UCFLAGS_DEFAULT -fomit-frame-pointer -Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -Wc++-compat -fextended-identifiers -DMP_PREC=4 -pipe -DHAVE_CPUID=1 -finput-charset=UTF-8 -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"9.1\" -DPACKAGE_STRING=\"tcl\ 9.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DTCL_CFGVAL_ENCODING=\"utf-8\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DMODULE_SCOPE=extern -DTCL_CFG_DO64BIT=1 -DHAVE_NO_SEH=1 -DHAVE_STDBOOL_H=1 -DHAVE_CAST_TO_UNION=1 -DTCL_WITH_EXTERNAL_TOMMATH=1 -DMP_64BIT=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DZIPFS_BUILD=1 -DHAVE_INTRIN_H=1 -DHAVE_CPUID_H=1 -DHAVE_WSPIAPI_H=1 -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DUNICODE -D_UNICODE "C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c" -o utf8proc.o
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:56:42: error: definition of
dllimport data
56 | UTF8PROC_DLLEXPORT const utf8proc_int8_t utf8proc_utf8class[256] = {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:99:32: error: dllimport
cannot be applied to non-inline function definition
99 | UTF8PROC_DLLEXPORT const char *utf8proc_version(void) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:103:32: error: dllimport
cannot be applied to non-inline function definition
103 | UTF8PROC_DLLEXPORT const char *utf8proc_unicode_version(void) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:107:32: error: dllimport
cannot be applied to non-inline function definition
107 | UTF8PROC_DLLEXPORT const char *utf8proc_errmsg(utf8proc_ssize_t errcode) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:125:37: error: dllimport
cannot be applied to non-inline function definition
125 | UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_iterate(
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:173:34: error: dllimport
cannot be applied to non-inline function definition
173 | UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_codepoint_valid(utf8proc_int32_t uc) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:177:37: error: dllimport
cannot be applied to non-inline function definition
177 | UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_encode_char(utf8proc_int32_t uc, utf8proc_uint8...
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:242:47: error: dllimport
cannot be applied to non-inline function definition
242 | UTF8PROC_DLLEXPORT const utf8proc_property_t *utf8proc_get_property(utf8proc_int32_t uc) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:345:34: error: dllimport
cannot be applied to non-inline function definition
345 | UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_grapheme_break_stateful(
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:358:34: error: dllimport
cannot be applied to non-inline function definition
358 | UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_grapheme_break(
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:399:37: error: dllimport
cannot be applied to non-inline function definition
399 | UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_tolower(utf8proc_int32_t c)
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:405:37: error: dllimport
cannot be applied to non-inline function definition
405 | UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_toupper(utf8proc_int32_t c)
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:411:37: error: dllimport
cannot be applied to non-inline function definition
411 | UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_totitle(utf8proc_int32_t c)
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:417:24: error: dllimport
cannot be applied to non-inline function definition
417 | UTF8PROC_DLLEXPORT int utf8proc_islower(utf8proc_int32_t c)
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:423:24: error: dllimport
cannot be applied to non-inline function definition
423 | UTF8PROC_DLLEXPORT int utf8proc_isupper(utf8proc_int32_t c)
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:431:24: error: dllimport
cannot be applied to non-inline function definition
431 | UTF8PROC_DLLEXPORT int utf8proc_charwidth(utf8proc_int32_t c) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:435:34: error: dllimport
cannot be applied to non-inline function definition
435 | UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_charwidth_ambiguous(utf8proc_int32_t c) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:439:40: error: dllimport
cannot be applied to non-inline function definition
439 | UTF8PROC_DLLEXPORT utf8proc_category_t utf8proc_category(utf8proc_int32_t c) {
| ^
C:/Users/sl120/dev/dlight/win64/clangLib64/build/tcl/utf8proc/utf8proc.c:443:32: error: dllimport
cannot be applied to non-inline function definition
443 | UTF8PROC_DLLEXPORT const char *utf8proc_category_string(utf8proc_int32_t c) {
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Makefile:690: utf8proc.o] Error 1
my version of clang is :
clang version 20.1.8
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/ucrt64/bin
and here's how I'm compiling Tcl:
./configure --disable-symbols --enable-64bit --prefix="$INSTALL_PREFIX"
make -j 4 CFLAGS="-O3 -g0 -fomit-frame-pointer"
make install
best regards,
Nicolas
sl1200mk2plain2025-09-12 07:19:10
please note that I've tried both make -j 4 CFLAGS="-O3 -g0 -fomit-frame-pointer" and make -j 4 CFLAGS="-O3 -g0 -UCFLAGS_DEFAULT -fomit-frame-pointer"
apnadkarniplain2025-09-12 10:06:58
Your passing of CFLAGS on the command line is overriding the -DUTF8PROC_STATIC definition (amongst others like those for tommath) in the Makefile. Try passing CFLAGS_OPTIMIZE instead of CFLAGS on the command line.
sl1200mk2plain2025-09-12 10:39:57
so very very cool Ashok !! thank you very much I can close this ticket. best regards
Log in (anonymous is fine) to add a comment.