Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Lack of skill dictates economy of style. -- Joey Ramone


devel / comp.lang.tcl / Re: tcl8.7 on windows: linking against stubs library is now required in 8.7

SubjectAuthor
* tcl8.7 on windows: linking against stubs library is now required in 8.7Ralf Fassel
`* Re: tcl8.7 on windows: linking against stubs library is now requiredHarald Oehlmann
 `- Re: tcl8.7 on windows: linking against stubs library is now required in 8.7Ralf Fassel

1
tcl8.7 on windows: linking against stubs library is now required in 8.7

<yga8rpwzdfh.fsf@akutech.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19557&group=comp.lang.tcl#19557

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: tcl8.7 on windows: linking against stubs library is now required in 8.7
Date: Thu, 16 Jun 2022 20:11:14 +0200
Lines: 51
Message-ID: <yga8rpwzdfh.fsf@akutech.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net sh+M1MbQrsECv9z+FXAJ+QB+pfRV2DlZYR+wJyRYNSJE1ZBF4=
Cancel-Lock: sha1:vgP0NSUoeo6dFvT94kWnj4g2lKE= sha1:AXqfclQ1O6Je/d9la17vqoGJBV0=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
 by: Ralf Fassel - Thu, 16 Jun 2022 18:11 UTC

Taking the minimal tclsh example from
https://wiki.tcl-lang.org/page/Building+a+custom+tclsh
/* t.c */
#include <tcl.h>
int AppInit(Tcl_Interp *interp) {
if(Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR;
Tcl_SetVar(interp,"tcl_rcFileName","~/.wishrc",TCL_GLOBAL_ONLY);
return TCL_OK;
}
int main(int argc, char *argv[]) {
Tcl_Main(argc, argv, AppInit);
return 0;
}
/* End of file */

Linking on windows now requires linking against the TCL stubs library in
8.7, where this was not required in 8.6.

This is due to a change in the Tcl_Main macro on windows, which now
includes a call to Tcl_SetPanicProc(Tcl_ConsolePanic) in tcl.h:

#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp)()))

where 'Tcl_ConsolePanic' is #defined NULL on Linux, but a real function
on Windows, which is only available in the stubs library.

Linking against 8.7:
$ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib
t.c
t.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "Tcl_ConsolePanic" in Funktion "main".
t.exe : fatal error LNK1120: 1 nicht aufgelöste Externe

adding tcltk87/lib/tclstub87.lib to the link line => success.
$ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib tcltk87/lib/tclstub87.lib
t.c
=> success

Linking against 8.6:
$ cl /nologo /Fet.exe t.c -Itcltk86/include tcltk86/lib/tcl86.lib
t.c
=> success

Not sure if this was intentional, but it probably should be documented
in the Tcl_Main manpage, which already reads

Programs that call Tcl_Main must be linked
against the standard Tcl library.

HTH
R'

Re: tcl8.7 on windows: linking against stubs library is now required in 8.7

<t8h8hs$bak$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19558&group=comp.lang.tcl#19558

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wortkarg2@yahoo.de (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: tcl8.7 on windows: linking against stubs library is now required
in 8.7
Date: Fri, 17 Jun 2022 08:55:58 +0200
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <t8h8hs$bak$1@dont-email.me>
References: <yga8rpwzdfh.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Jun 2022 06:55:56 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f0b0846eeed7b8949b60316ed8968bbd";
logging-data="11604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18C3wFhrceEFQg0JjdtSdNW"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:YlLs34CLHHU1qtC4nwmpKPC3ZEw=
In-Reply-To: <yga8rpwzdfh.fsf@akutech.de>
Content-Language: en-GB
 by: Harald Oehlmann - Fri, 17 Jun 2022 06:55 UTC

Am 16.06.2022 um 20:11 schrieb Ralf Fassel:
> Taking the minimal tclsh example from
> https://wiki.tcl-lang.org/page/Building+a+custom+tclsh
> /* t.c */
> #include <tcl.h>
> int AppInit(Tcl_Interp *interp) {
> if(Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR;
> Tcl_SetVar(interp,"tcl_rcFileName","~/.wishrc",TCL_GLOBAL_ONLY);
> return TCL_OK;
> }
> int main(int argc, char *argv[]) {
> Tcl_Main(argc, argv, AppInit);
> return 0;
> }
> /* End of file */
>
> Linking on windows now requires linking against the TCL stubs library in
> 8.7, where this was not required in 8.6.
>
> This is due to a change in the Tcl_Main macro on windows, which now
> includes a call to Tcl_SetPanicProc(Tcl_ConsolePanic) in tcl.h:
>
> #define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
> ((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp)()))
>
> where 'Tcl_ConsolePanic' is #defined NULL on Linux, but a real function
> on Windows, which is only available in the stubs library.
>
> Linking against 8.7:
> $ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib
> t.c
> t.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "Tcl_ConsolePanic" in Funktion "main".
> t.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
>
> adding tcltk87/lib/tclstub87.lib to the link line => success.
> $ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib tcltk87/lib/tclstub87.lib
> t.c
> => success
>
> Linking against 8.6:
> $ cl /nologo /Fet.exe t.c -Itcltk86/include tcltk86/lib/tcl86.lib
> t.c
> => success
>
> Not sure if this was intentional, but it probably should be documented
> in the Tcl_Main manpage, which already reads
>
> Programs that call Tcl_Main must be linked
> against the standard Tcl library.
>
> HTH
> R'

Ralf,

I would post a TCL ticket to have the discussion at the right place.
I suppose, this is an unintended side effect.
Harald

Re: tcl8.7 on windows: linking against stubs library is now required in 8.7

<yga4k0fzkk1.fsf@akutech.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19560&group=comp.lang.tcl#19560

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: tcl8.7 on windows: linking against stubs library is now required in 8.7
Date: Mon, 20 Jun 2022 12:38:38 +0200
Lines: 15
Message-ID: <yga4k0fzkk1.fsf@akutech.de>
References: <yga8rpwzdfh.fsf@akutech.de> <t8h8hs$bak$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net J3YXI2WWK8svdZ3wZS0a5guswgn+XwWHL01o1XuwVcvhirQrQ=
Cancel-Lock: sha1:+HEJkr86nBMDuZ1rPWCWJ31yPgE= sha1:VuwBuNTJwmnYZnXjqr55a4CEARY=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
 by: Ralf Fassel - Mon, 20 Jun 2022 10:38 UTC

* Harald Oehlmann <wortkarg2@yahoo.de>
| Am 16.06.2022 um 20:11 schrieb Ralf Fassel:
--<snip-snip>--
| > Linking on windows now requires linking against the TCL stubs library in
| > 8.7, where this was not required in 8.6.
--<snip-snip>--
>
| I would post a TCL ticket to have the discussion at the right place.
| I suppose, this is an unintended side effect.

[x] done

https://core.tcl-lang.org/tcl/tktview/a55872c2429bea123139d3f2bd25182a2d6c78f7

R'

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor