ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem loading a DLL with the latest Ctx beta
@ 2017-04-05 22:05 Akira Kakuto
  2017-04-06  9:03 ` Procházka Lukáš Ing.
  0 siblings, 1 reply; 13+ messages in thread
From: Akira Kakuto @ 2017-04-05 22:05 UTC (permalink / raw)
  To: ntg-context

> I encountered problem loading WinCon.dll
> (a module that I wrote and I've been using for several years)

In the new lua(jit)tex, one cannot use DLL modules.
See my mail in
http://tug.org/pipermail/luatex/2017-March/006410.html
http://tug.org/pipermail/luatex/2017-March/006413.html

Reason:
I could not build usable binaries for the new sources by
linking dynamically lua-5.2.4 or luajit.
Thus I changed to link lua-5.2.4 etc. statically.

Best,
Akira

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 22:05 Problem loading a DLL with the latest Ctx beta Akira Kakuto
@ 2017-04-06  9:03 ` Procházka Lukáš Ing.
  2017-04-06 11:54   ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-06  9:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Akira,

you mention possibility of --shell-escape at
	http://tug.org/pipermail/luatex/2017-March/006410.html.

How exactly do you mean to combine "ffi" and "--shell-escape" to work with latest ConTeXt/LuaTeX?

(I tried (rather amateurishly) to run "context --shell-escape WinTest.mkiv" - but it didn't help.)

BTW:

WinCon.dll contains some functions to print COLORED text to the console screen and enables some basic WinAPI functions (like capturing window bitmap) to Lua;
I've been using especially colored printing in combination with ConTeXt ("warnings" in magenta, "errors" in red...).

Any way to re-enable user DLL loading into ConTeXt, even in the future, would be appreciated...

Best regards,

Lukas


On Thu, 06 Apr 2017 00:05:28 +0200, Akira Kakuto <kakuto@fuk.kindai.ac.jp> wrote:

>> I encountered problem loading WinCon.dll
>> (a module that I wrote and I've been using for several years)
>
> In the new lua(jit)tex, one cannot use DLL modules.
> See my mail in
> http://tug.org/pipermail/luatex/2017-March/006410.html
> http://tug.org/pipermail/luatex/2017-March/006413.html
>
> Reason:
> I could not build usable binaries for the new sources by
> linking dynamically lua-5.2.4 or luajit.
> Thus I changed to link lua-5.2.4 etc. statically.
>
> Best,
> Akira
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-06  9:03 ` Procházka Lukáš Ing.
@ 2017-04-06 11:54   ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2017-04-06 11:54 UTC (permalink / raw)
  To: ntg-context

On 4/6/2017 11:03 AM, Procházka Lukáš Ing. wrote:
> Hello Akira,
>
> you mention possibility of --shell-escape at
>     http://tug.org/pipermail/luatex/2017-March/006410.html.
>
> How exactly do you mean to combine "ffi" and "--shell-escape" to work
> with latest ConTeXt/LuaTeX?
>
> (I tried (rather amateurishly) to run "context --shell-escape
> WinTest.mkiv" - but it didn't help.)

context doesn't use --shell-escape (control over executables happens via 
the sandbox mechanism)

> BTW:
>
> WinCon.dll contains some functions to print COLORED text to the console
> screen and enables some basic WinAPI functions (like capturing window
> bitmap) to Lua;
> I've been using especially colored printing in combination with ConTeXt
> ("warnings" in magenta, "errors" in red...).

local ansicolor = {
     r = function(s)
         return "^[[0;31m" .. s .."^[[0;1m"
     end,
     g = function(s)
         return "^[[0;32m" .. s .."^[[0;1m"
     end,
     b = function(s)
         return "^[[0;34m" .. s .."^[[0;1m"
     end,
     c = function(s)
         return "^[[0;36m" .. s .."^[[0;1m"
     end,
     m = function(s)
         return "^[[0;35m" .. s .."^[[0;1m"
     end,
     y = function(s)
         return "^[[0;33m" .. s .."^[[0;1m"
     end
}

local formatters = string.formatters

utilities.strings.formatters.add(formatters, "cr", [[cr(%s)]], { cr = 
ansicolor.r })
utilities.strings.formatters.add(formatters, "cg", [[cg(%s)]], { cg = 
ansicolor.g })
utilities.strings.formatters.add(formatters, "cb", [[cb(%s)]], { cb = 
ansicolor.b })
utilities.strings.formatters.add(formatters, "cc", [[cc(%s)]], { cc = 
ansicolor.c })
utilities.strings.formatters.add(formatters, "cm", [[cm(%s)]], { cm = 
ansicolor.m })
utilities.strings.formatters.add(formatters, "cy", [[cy(%s)]], { cy = 
ansicolor.y })

print(ansicolor.r("red"))
print(ansicolor.g("green"))
print(ansicolor.b("blue"))
print(ansicolor.c("cyan"))
print(ansicolor.m("magenta"))
print(ansicolor.y("yellow"))

logs.writer(formatters["this is in %!cr! or %!cg! or %!cb! or 
%s"]("red","green","blue","oeps"))
logs.report("whatever","this is in %!cr! or %!cg! or %!cb! or 
%s","red","green","blue","oeps")

(you can also use mtxrun --ansi ....)

> Any way to re-enable user DLL loading into ConTeXt, even in the future,
> would be appreciated...
>
> Best regards,
>
> Lukas
>
>
> On Thu, 06 Apr 2017 00:05:28 +0200, Akira Kakuto
> <kakuto@fuk.kindai.ac.jp> wrote:
>
>>> I encountered problem loading WinCon.dll
>>> (a module that I wrote and I've been using for several years)
>>
>> In the new lua(jit)tex, one cannot use DLL modules.
>> See my mail in
>> http://tug.org/pipermail/luatex/2017-March/006410.html
>> http://tug.org/pipermail/luatex/2017-March/006413.html
>>
>> Reason:
>> I could not build usable binaries for the new sources by
>> linking dynamically lua-5.2.4 or luajit.
>> Thus I changed to link lua-5.2.4 etc. statically.
>>
>> Best,
>> Akira
>>
>> ___________________________________________________________________________________
>>
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
>>
>
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-08 22:23 Akira Kakuto
  2017-04-11  7:04 ` Procházka Lukáš Ing.
@ 2017-04-18 13:52 ` Procházka Lukáš Ing.
  1 sibling, 0 replies; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-18 13:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Akira,

I tested ConTeXt run with my DLL module and all works fine.

Thank you again!

Best regards,

Lukas


On Sun, 09 Apr 2017 00:23:48 +0200, Akira Kakuto <kakuto@fuk.kindai.ac.jp> wrote:

>> Any way to re-enable user DLL loading into ConTeXt, even
>> in the future, would be appreciated...
>
> I have just uploaded dynamically linked luatex and luajittex.
> I hope that you can again load your lua DLL modules in a few days.
> Further, standard C functions can be used in ffi without
> loading a C DLL. For example, my previous example can
> be changed as follows:
>
> %
> % context test.tex
> %
> \starttext
> \placeformula
> \startformula
> j_1(2.387) =
> \startluacode
>   local ffi = require("ffi")
>   ffi.cdef[[
>     double _j1(double x);
>   ]]
>   tex.print(ffi.C._j1(2.387))
> \stopluacode
> \stopformula
> \stoptext
>
> Best,
> Akira
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-08 22:23 Akira Kakuto
@ 2017-04-11  7:04 ` Procházka Lukáš Ing.
  2017-04-18 13:52 ` Procházka Lukáš Ing.
  1 sibling, 0 replies; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-11  7:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Akira,

On Sun, 09 Apr 2017 00:23:48 +0200, Akira Kakuto <kakuto@fuk.kindai.ac.jp> wrote:

>> Any way to re-enable user DLL loading into ConTeXt, even
>> in the future, would be appreciated...
>
> I have just uploaded dynamically linked luatex and luajittex.

great news, I'll try it in the upcoming week.

Thank you.

Best regards,

Lukas


> I hope that you can again load your lua DLL modules in a few days.
> Further, standard C functions can be used in ffi without
> loading a C DLL. For example, my previous example can
> be changed as follows:
>
> %
> % context test.tex
> %
> \starttext
> \placeformula
> \startformula
> j_1(2.387) =
> \startluacode
>   local ffi = require("ffi")
>   ffi.cdef[[
>     double _j1(double x);
>   ]]
>   tex.print(ffi.C._j1(2.387))
> \stopluacode
> \stopformula
> \stoptext
>
> Best,
> Akira
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Problem loading a DLL with the latest Ctx beta
@ 2017-04-08 22:23 Akira Kakuto
  2017-04-11  7:04 ` Procházka Lukáš Ing.
  2017-04-18 13:52 ` Procházka Lukáš Ing.
  0 siblings, 2 replies; 13+ messages in thread
From: Akira Kakuto @ 2017-04-08 22:23 UTC (permalink / raw)
  To: ntg-context

> Any way to re-enable user DLL loading into ConTeXt, even
> in the future, would be appreciated...

I have just uploaded dynamically linked luatex and luajittex.
I hope that you can again load your lua DLL modules in a few days.
Further, standard C functions can be used in ffi without
loading a C DLL. For example, my previous example can
be changed as follows:

%
% context test.tex
%
\starttext
\placeformula
\startformula
j_1(2.387) =
\startluacode
  local ffi = require("ffi")
  ffi.cdef[[
    double _j1(double x);
  ]]
  tex.print(ffi.C._j1(2.387))
\stopluacode
\stopformula
\stoptext

Best,
Akira

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Problem loading a DLL with the latest Ctx beta
@ 2017-04-06 10:47 Akira Kakuto
  0 siblings, 0 replies; 13+ messages in thread
From: Akira Kakuto @ 2017-04-06 10:47 UTC (permalink / raw)
  To: ntg-context

> How exactly do you mean to combine "ffi" and
> "--shell-escape" to work with latest ConTeXt/LuaTeX?

In usual luatex, ffi needs --shell-escape, since ffi
is dangerous from the point of view of the security.
As you know, ConTeXt allows --shell-escape, so the
following works with context test.tex.

%
% context test.tex
%
\starttext
\placeformula
\startformula
j_1(2.387) =
\startluacode
  local ffi = require("ffi")
  ffi.cdef[[
    double _j1(double x);
  ]]
  local mscrt = ffi.load("msvcrt")
  tex.print(mscrt._j1(2.387))
\stopluacode
\stopformula
\stoptext

In the above example, a function _j1(x) in msvcrt.dll
is evaluated. The msvcrt.dll must be loaded as above,
because standard C library is linked statically.
The following DLLs can be used without loading,
because luatex knows them:

SHLWAPI.dll
WSOCK32.dll
USER32.dll
ADVAPI32.dll
SHELL32.dll
KERNEL32.dll
WS2_32.dll
GDI32.dll

Note that you may not be able to use "DLL Lua Modules"
in this way.  I don't know details. Try various cases.

Best,
Akira

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 15:49       ` Procházka Lukáš Ing.
@ 2017-04-05 19:42         ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2017-04-05 19:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/5/2017 5:49 PM, Procházka Lukáš Ing. wrote:
> Hello,
>
> On Wed, 05 Apr 2017 17:02:01 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
>> On 4/5/2017 4:12 PM, Procházka Lukáš Ing. wrote:
>>
>>> Just to ensure that I'm not trying to use 32b WinCon.dll with 64b
>>> Ctx/LuaTeX...
>>
>> os.platform
>
> will it retrieve OS platform or LuaTeX (= executable) platform?
>
>>> Which compiler is used to build LuaTeX for Windows?
>>
>> probably the regular microsoft one
>
> OK, probably VS, but which version?

i don't know ... probably recent .. compilation of native windows 
binaries is done by akira kakuto as part of the cjk windows 
distribuition cq. tex live and the garden takes his binaries

why don't you just try to recompile?

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 15:02     ` Hans Hagen
@ 2017-04-05 15:49       ` Procházka Lukáš Ing.
  2017-04-05 19:42         ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-05 15:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On Wed, 05 Apr 2017 17:02:01 +0200, Hans Hagen <pragma@wxs.nl> wrote:

> On 4/5/2017 4:12 PM, Procházka Lukáš Ing. wrote:
>
>> Just to ensure that I'm not trying to use 32b WinCon.dll with 64b
>> Ctx/LuaTeX...
>
> os.platform

will it retrieve OS platform or LuaTeX (= executable) platform?

>> Which compiler is used to build LuaTeX for Windows?
>
> probably the regular microsoft one

OK, probably VS, but which version?

Lukas

> Hans


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 14:12   ` Procházka Lukáš Ing.
@ 2017-04-05 15:02     ` Hans Hagen
  2017-04-05 15:49       ` Procházka Lukáš Ing.
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2017-04-05 15:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/5/2017 4:12 PM, Procházka Lukáš Ing. wrote:

> Just to ensure that I'm not trying to use 32b WinCon.dll with 64b
> Ctx/LuaTeX...

os.platform

> Which compiler is used to build LuaTeX for Windows?

probably the regular microsoft one

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 13:06 ` Hans Hagen
@ 2017-04-05 14:12   ` Procházka Lukáš Ing.
  2017-04-05 15:02     ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-05 14:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On Wed, 05 Apr 2017 15:06:08 +0200, Hans Hagen <pragma@wxs.nl> wrote:

> On 4/5/2017 2:29 PM, Procházka Lukáš Ing. wrote:
>
>> Strange thing is that WonCon.dll with Ctx used to work for several
>> years... What is the problem now?
>
> Probably an updated compiler ... after all, vs 2008 is 8 years old which
> is real old in computer times). Maybe you miss another ancient dll (can
> be checked with dll checkers).

Maybe... But I've VS 2008 installed again on the comp I'm using now, so - at least for me - all DLLs should exist on my comp (for other comps, there is free VS 2008 Redistributable Package), so that shouldn't be a problem.

Would Ctx and LuaTeX write info about its binary architecture, so that '--version' shows "x86" or "64b", too?

Just to ensure that I'm not trying to use 32b WinCon.dll with 64b Ctx/LuaTeX...

>> I attached also the WinCon.dll (built with VS 2008 - Release version;
>> zipped and ZIP renamed to PIZ).
>
> I'm surprised that this passed the mail server.
>
>> Do I have to rebuild the WinCon.dll source?
>
> Why not just try that?

Which compiler is used to build LuaTeX for Windows?

Best regards,

Lukas


> Hans
>
> ps. Version 1.0.5 is not official i.e. it's the ctx meeting version.
> We're at 1.0.4 now.
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Problem loading a DLL with the latest Ctx beta
  2017-04-05 12:29 Procházka Lukáš Ing.
@ 2017-04-05 13:06 ` Hans Hagen
  2017-04-05 14:12   ` Procházka Lukáš Ing.
  0 siblings, 1 reply; 13+ messages in thread
From: Hans Hagen @ 2017-04-05 13:06 UTC (permalink / raw)
  To: ntg-context

On 4/5/2017 2:29 PM, Procházka Lukáš Ing. wrote:

> Strange thing is that WonCon.dll with Ctx used to work for several
> years... What is the problem now?

Probably an updated compiler ... after all, vs 2008 is 8 years old which 
is real old in computer times). Maybe you miss another ancient dll (can 
be checked with dll checkers).

> I attached also the WinCon.dll (built with VS 2008 - Release version;
> zipped and ZIP renamed to PIZ).

I'm surprised that this passed the mail server.

> Do I have to rebuild the WinCon.dll source?

Why not just try that?

Hans

ps. Version 1.0.5 is not official i.e. it's the ctx meeting version. 
We're at 1.0.4 now.

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Problem loading a DLL with the latest Ctx beta
@ 2017-04-05 12:29 Procházka Lukáš Ing.
  2017-04-05 13:06 ` Hans Hagen
  0 siblings, 1 reply; 13+ messages in thread
From: Procházka Lukáš Ing. @ 2017-04-05 12:29 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 6644 bytes --]

Hello,

I encountered problem loading WinCon.dll (a module that I wrote and I've been using for several years):

----
lua error       > lua error on line 3 in file d:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv:

error loading module 'WinCon' from file 'd:\Lukas\Lua\52\WinCon.dll':
         Uvedenř modul nebyl nalezen.

stack traceback:
         [C]: in ?
         [C]: in function 'cpath specification'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:291: in function '?'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:318: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:310>
         [C]: in function 'requiem'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
         (...tail calls...)
         [ctxlua]:2: in main chunk
----

My sample "pure" run looks:

"
d:\Lukas\Jobs\D10-036\10-037.SO\Geom.Smo\~>set PATH=d:\Ctx-Beta\tex\texmf-mswin\bin

d:\Lukas\Jobs\D10-036\10-037.SO\Geom.Smo\~>set LUA_CPATH=d:\Lukas\Lua\52\?.dll

d:\Lukas\Jobs\D10-036\10-037.SO\Geom.Smo\~>context.exe WinTest.mkiv --batchmode

mtx-context     | run 1: luatex --fmt="d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --interaction="batchmode" --jobname="WinTest" --lua="d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:batchmode --c:currentrun=1 --c:fulljobname="./WinTest.mkiv" --c:input="./WinTest.mkiv" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"
This is LuaTeX, Version 1.0.5 (TeX Live 2017/W32TeX)
  system commands enabled.
open source     > level 1, order 1, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2017.04.02 19:51 MKIV beta  fmt: 2017.4.5  int: english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
close source    > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'WinTest', input './WinTest.mkiv', result 'WinTest'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'd:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv'

lua error       > lua error on line 3 in file d:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv:

error loading module 'WinCon' from file 'd:\Lukas\Lua\52\WinCon.dll':
         Uvedenř modul nebyl nalezen.

stack traceback:
         [C]: in ?
         [C]: in function 'cpath specification'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:291: in function '?'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:318: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-package.lua:310>
         [C]: in function 'requiem'
         ...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
         (...tail calls...)
         [ctxlua]:2: in main chunk

1     \startluacode
2       require "WinCon"
3 >>  \stopluacode
4
5     \starttext
6       A
7     \stoptext
8

fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
backend         > xmp > using file 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name 'd:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv'
close source    > level 1, order 3, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.000 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 9 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 402 modules (0.206 sec), 91 tables (0.012 sec), 493 chunks (0.218 sec)
mkiv lua stats  > traced context: maxstack: 1227, freed: 0, unreachable: 1227
mkiv lua stats  > cleaned up reserved nodes: 49 nodes, 9 lists of 447
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 9 attribute, 49 glue_spec, 3 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 7 unique task lists, 6 instances (re)created, 32 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: 139 direct, 248 indirect, 387 total
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: WinTest.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.028, afm 1.512, tfm 1.000, 4 instances, load time 0.152 seconds
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: texmf-mswin
mkiv lua stats  > luatex banner: this is luatex, version 1.0.5 (tex live 2017/w32tex)
mkiv lua stats  > control sequences: 45005 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua, used memory: 41 MB (ctx: 40 MB), hash type: lua, hash chars: min(32,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats  > runtime: 0.46 seconds, 1 processed pages, 1 shipped pages, 2.174 pages/second

mtx-context     | fatal error: return code: 1
"

- And WinText.mkiv has the following content:

----
\startluacode
   require "WinCon"
\stopluacode

\starttext
   A
\stoptext
----

Strange thing is that WonCon.dll with Ctx used to work for several years... What is the problem now?

I attached also the WinCon.dll (built with VS 2008 - Release version; zipped and ZIP renamed to PIZ).

Do I have to rebuild the WinCon.dll source?

Any answer would be appreciated...

Best regards,

Lukas


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

[-- Attachment #2: WinTest.log --]
[-- Type: application/octet-stream, Size: 1821 bytes --]

open source     > level 1, order 1, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2017.04.02 19:51 MKIV beta  fmt: 2017.4.5  int: english/english
system          > 
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
close source    > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'WinTest', input './WinTest.mkiv', result 'WinTest'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'd:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv'

lua error       > lua error on line 3 in file d:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv:

multiple Lua VMs detected
stack traceback:
	[C]: in ?
	[C]: in function 'requiem'
	...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
	(...tail calls...)
	[ctxlua]:2: in main chunk

1     \startluacode
2       require "WinCon"
3 >>  \stopluacode
4     
5     \starttext
6       A
7     \stoptext
8     


? 

lua error       > lua error on line 3 in file d:/Lukas/Jobs/D10-036/10-037.SO/Geom.Smo/~/WinTest.mkiv:

multiple Lua VMs detected
stack traceback:
	[C]: in ?
	[C]: in function 'requiem'
	...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:180: in function <...ta/tex/texmf-context/tex/context/base/mkiv/l-sandbox.lua:165>
	(...tail calls...)
	[ctxlua]:2: in main chunk

1     \startluacode
2       require "WinCon"
3 >>  \stopluacode
4     
5     \starttext
6       A
7     \stoptext
8     

End of file on the terminal!



[-- Attachment #3: WinTest.mkiv --]
[-- Type: application/octet-stream, Size: 79 bytes --]

\startluacode
  require "WinCon"
\stopluacode

\starttext
  A
\stoptext

[-- Attachment #4: WinCon~.piz --]
[-- Type: application/octet-stream, Size: 8061 bytes --]

[-- Attachment #5: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-18 13:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 22:05 Problem loading a DLL with the latest Ctx beta Akira Kakuto
2017-04-06  9:03 ` Procházka Lukáš Ing.
2017-04-06 11:54   ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2017-04-08 22:23 Akira Kakuto
2017-04-11  7:04 ` Procházka Lukáš Ing.
2017-04-18 13:52 ` Procházka Lukáš Ing.
2017-04-06 10:47 Akira Kakuto
2017-04-05 12:29 Procházka Lukáš Ing.
2017-04-05 13:06 ` Hans Hagen
2017-04-05 14:12   ` Procházka Lukáš Ing.
2017-04-05 15:02     ` Hans Hagen
2017-04-05 15:49       ` Procházka Lukáš Ing.
2017-04-05 19:42         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).