9.0 Building "big tclshs" is broken
Closed / Invalid26e60451fce4df9c37520048538b321b48f2ba90Created 5 years agoUpdated 5 years ago
Descriptionplain2022-02-04 14:57:02
Since [8a5f4d238e630b41] (the implementation of tip 596) bulding a custom tclsh (with a binary extension build in) with an own tclAppInit.c is broken and results in: /usr/bin/ld: [path to]/lib/libtclstub9.0.a(tclStubCall.o): in function `TclStubCall': tclStubCall.c:(.text+0xa5): undefined reference to `dlsym' /usr/bin/ld: tclStubCall.c:(.text+0xbd): undefined reference to `dlsym' /usr/bin/ld: tclStubCall.c:(.text+0xdd): undefined reference to `dlopen' /usr/bin/ld: tclStubCall.c:(.text+0xfd): undefined reference to `dlopen' /usr/bin/ld: tclStubCall.c:(.text+0x11b): undefined reference to `dlerror' /usr/bin/ld: tclStubCall.c:(.text+0x17a): undefined reference to `dlerror' collect2: error: ld returned 1 exit status while trying to link the tclsh. Prior to that commit, thinks works as they always (decades) did.
jan.nijtmanswiki2022-02-07 07:52:15
Most likely reason for this is that your tclAppInit.c is compiled with -DUSE_TCL_STUBS. Don't do that, because starting with Tcl 9.0 it is really using stubs to use load the Tcl library. Or - if you want to use the new TIP #596 functionality (I don't think you do), link with -ldl See: https://stackoverflow.com/questions/2186219/where-is-the-library-for-dlsym
pointsmanplain2022-02-07 12:43:29
Yes, after removing of -DUSE_TCL_STUBS from the compiler flags while compiling the custom tclAppInit.c restores the build.
pointsmanplain2022-02-07 12:58:12
But ... since building customs tclshs seems to be still supported, at least doc/AppInit.3 is still on trunk it would be helpful to spell it out if a core change requires a change of up to that working processes. Prior to the change [8a5f4d238e630b41] a extension writer could simply use $(COMPILE) in a TEA derivated makefile to compile the custom tclAppInit.c. This isn't possible anymore and at least I can't see an easy or obvious way within the TEA framework to reflect this change. To categorise this kind of feedback about core changes as "invalid" smells a bit like ignorance to what extension authors do.
jan.nijtmans Closed ticket [26e60451fc].
[History diff]2022-04-18 17:29:55
Log in (anonymous is fine) to add a comment.