From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29992 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jacco Steur Newsgroups: gmane.text.pandoc Subject: Re: Using lua filter include-files on pandoc 2.5 does not work Date: Mon, 17 Jan 2022 08:14:02 -0800 (PST) Message-ID: <9aaa4fcd-5dad-4278-bd37-0a1e3e4073b1n@googlegroups.com> References: <091e1142-2cf5-40f0-a0f4-1c6a2bd0af4bn@googlegroups.com> <8735lmefdv.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1036_988227450.1642436042630" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20424"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDUYXFMS4ECBBS5LS2HQMGQEVTAEFZQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 17 17:14:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n9Udx-00059H-Tq for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 17 Jan 2022 17:14:05 +0100 Original-Received: by mail-oo1-f59.google.com with SMTP id t12-20020a4ab58c000000b002dcbee240efsf7630739ooo.10 for ; Mon, 17 Jan 2022 08:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=ikHQgVwfEYVkhHt9z/0IWH8Iyy54GV95xiRP4yW+/O4=; b=GXjs7nQXGVc4inq3uVsPrdMlVpB3Ocqab8rJcu5Y0dQFGyX3In9ACZ/UXhM+pfbA4U mmcjV9YzrMYDlLxpFAiznr5r7xp6sJ3UZa0DbmrdKv5ScHe9hoFSJB/JuPJM2LZyDv95 nxgbxYvKpl/3XoMm1VungHAFYp9gBRtwtJf4I4F6+wunhnxvnqQCUa5lBQJd1367iD3k 8PQWQGnjIb81h4fZmfu++JZEpzKQoCOisSXME8pVnsOtc9rOo+ct+jzWOdtg4lF+8BOe ME2UWSmrP99uOQukI8Ehf+le9FtMuDnybdlUKmQAG+Q/6nmzTvTrg7wp71jJTzB6KHvQ gz8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=ikHQgVwfEYVkhHt9z/0IWH8Iyy54GV95xiRP4yW+/O4=; b=BhVDI0JtXfPMTBZZOFd0fmsI3RijZaVEWHjJk/Wti7hjivnBiN4pXeT5qufZ3yOgqv r6O83cy0BjxrK7+y4tJ5Qp525CgkEnMYOXYFG+vpVXwa6zVc7AESBzLG8gQjxbriBU06 ITSZkS04Oz/lH/gfdr82BPH40GWsNTpBUc0GS5PqUpAM/BzkIbtdrYbFUNfI9k6X91lj fEWUEKdH53JXib2zhYReh67KSlRLHPguiHnSBdBCU9iuZvObRzpFIQn5rSn9mmXTNUFw 4k8nI4mS+EYypYvJbjLHOsx60+mzf3k0PVdZ0NssQvjspwIhOOBOEDPU0XQ0idqKCh1G SXkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=ikHQgVwfEYVkhHt9z/0IWH8Iyy54GV95xiRP4yW+/O4=; b=7LsDiKNZiVRyBCqOFG0k0LVns61dl7GSC2vyLMpviXQtW5hRNqtVmhww4EI7Htv+og WogLJiNzjglW703WaNR1jSi2ky+ZpJDjvUZmfWAdqhfsUfzuXYT/E0tjhSW6MynlLIVR RPsz+utzzNkgc1uQJOPDjPYigNPu2qV9soJ7l+JQ56sxpMlCrzIrm+TqHbPQx38+nn2z 7pR7PnA/ScEOq2D9h4roTV4RMcaxKpGtp6/DgTQaK5HPeXKdvF5iOUxvvENhaILl1Uku 9VrLJJCfx9989ZP/jfLnwzYiD72VLVBtzvefWqWKbxJiKtAl7n+VzMHEtkpifZ+TNJCy BH0Q== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532DX/30+wcUsLwG+8BnYTTEEnUDJT/a50H67kf6D5xdtFuu5PZf GZ8p6nH3miPuJZv+3cFYxHs= X-Google-Smtp-Source: ABdhPJy4aYzA1J3Do3carvFLmBrHLyOIHteLImw/ywsDUaO67yPJbfb/L5bUFHapkE685QGigSAtLQ== X-Received: by 2002:a9d:a0a:: with SMTP id 10mr15365036otg.37.1642436044842; Mon, 17 Jan 2022 08:14:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:199c:: with SMTP id bj28ls762931oib.0.gmail; Mon, 17 Jan 2022 08:14:03 -0800 (PST) X-Received: by 2002:a54:4786:: with SMTP id o6mr8170983oic.47.1642436043195; Mon, 17 Jan 2022 08:14:03 -0800 (PST) In-Reply-To: <8735lmefdv.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: jacco.steur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29992 Archived-At: ------=_Part_1036_988227450.1642436042630 Content-Type: multipart/alternative; boundary="----=_Part_1037_118473114.1642436042630" ------=_Part_1037_118473114.1642436042630 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Albert, Thanks for the swift response. That did the trick. I am amble to run the=20 include-file filter now. The next thing is that I run into this issue: :~/workspace/lua-filters/include-files$ ./run-it.sh=20 Error running filter include-files.lua: error loading module 'socket.core' from file=20 '/opt/zbstudio/bin/linux/x64/clibs53/socket/core.so': *Dynamic loading not supported* stack traceback: [C]: in ? [C]: in function 'require' /opt/zbstudio/lualibs/socket.lua:12: in main chunk [C]: in function 'require' /opt/zbstudio/lualibs/mobdebug/mobdebug.lua:102: in main chunk [C]: in function 'require' include-files.lua:13: in main chunk I do the following... I set my variables like so: export ZBS=3D/opt/zbstudio export LUA_PATH=3D"./?.lua;$ZBS/lualibs/?/?.lua;$ZBS/lualibs/?.lua" export LUA_CPATH=3D"$ZBS/bin/linux/x64/?.so;$ZBS/bin/linux/x64/clibs53/?.so= " My architecture is: $ uname -i x86_64 pandoc uses LUA5.3 There is some remark in the troubleshooting section about dynamic libraries= =20 not enabled: " -=20 =20 *I get dynamic libraries not enabled error.* You may get the following= =20 error when loading socket.core on Linux: *error loading module=20 =E2=80=98socket.core=E2=80=99 from file =E2=80=98/opt/zstudio/bin/linux/= x86/clibs/socket/core.so=E2=80=99:=20 dynamic libraries not enabled; check your Lua installation*. This most= =20 likely means that the Lua interpreter you are using was built=20 without LUA_USE_DLOPEN option enabled. You can either enable it or=20 statically link your application with luasocket. =20 " I am using the lua that comes with the debugger and pandoc. The=20 troubleshooting section does not really give a pointer where to go next.=20 What could this be? On Monday, 17 January 2022 at 13:06:00 UTC+1 Albert Krewinkel wrote: > > Jacco Steur writes: > > > My goal is debugging LUA filters with the zerobrane ide. > > > > I got stuck on this: > > > > On Ubuntu I installed pandoc 2.5 using sudo apt install pandoc. > > > > [...] > > > > What am I doing wrong here...... > > You are doing everything right, it's just that the pandoc version > shipped by Ubuntu is too old for this. The `pandoc.path` module is a > relatively recent addition that became available in pandoc 2.12, > released about a year ago. You can install a current version with the > help of the *deb* packages published on the official pandoc release > page: https://github.com/jgm/pandoc/releases/latest > > Alternatively, you could use a Docker image that suits your needs, e.g., > , but the .deb installer is > probably easier. > > HTH, > Albert > > PS: This is also a shortcoming of the filter: it would be better if the > filter was checking the pandoc version, returning a meaningful error > message if the version is too old. I'll go and fix that. > > --=20 > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/9aaa4fcd-5dad-4278-bd37-0a1e3e4073b1n%40googlegroups.com. ------=_Part_1037_118473114.1642436042630 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Albert,

Thanks for the swift response. That did the t= rick. I am amble to run the include-file filter now.

The next thing is that I run into this issue:
:~/workspace/lua= -filters/include-files$ ./run-it.sh
Error running filter include-files.= lua:
error loading module 'socket.core' from file '/opt/zbstudio/bin/lin= ux/x64/clibs53/socket/core.so':
        Dynamic loading not supported
stack traceback:=
        [C]: in ?
        [C= ]: in function 'require'
        /opt/zbstudio/luali= bs/socket.lua:12: in main chunk
        [C]: in func= tion 'require'
        /opt/zbstudio/lualibs/mobdebu= g/mobdebug.lua:102: in main chunk
        [C]: in fu= nction 'require'
        include-files.lua:13: in ma= in chunk

I do the following... I set my variab= les like so:
export ZBS=3D/opt/zbstudio
export LUA_PATH=3D"./?= .lua;$ZBS/lualibs/?/?.lua;$ZBS/lualibs/?.lua"
export LUA_CPATH=3D"$ZBS/b= in/linux/x64/?.so;$ZBS/bin/linux/x64/clibs53/?.so"

=
My architecture is:
$ uname -i
x86_64

<= /div>
pandoc uses LUA5.3

There is some remark = in the troubleshooting section about dynamic libraries not enabled:
"
  • I get dynamic libraries not enabled = error. You may get the following error when loading sock= et.core on Linux: error loading module =E2=80=98socket.core= =E2=80=99 from file =E2=80=98/opt/zstudio/bin/linux/x86/clibs/socket/core.s= o=E2=80=99: dynamic libraries not enabled; check your Lua installation= . This most likely means that the Lua interpreter you are using was built w= ithout LUA_USE_DLOPEN option enabled. You can either enable it or= statically link your application with luasocket.

"
=
I am using the lua that comes with the debugger and pandoc. The troubl= eshooting section does not really give a pointer where to go next. What cou= ld this be?




On Monday, 17 Janu= ary 2022 at 13:06:00 UTC+1 Albert Krewinkel wrote:

Jacco Steur <jacco...@gma= il.com> writes:

> My goal is debugging LUA filters with the zerobrane ide.
>
> I got stuck on this:
>
> On Ubuntu I installed pandoc 2.5 using sudo apt install pandoc.
>
> [...]
>
> What am I doing wrong here......

You are doing everything right, it's just that the pandoc version
shipped by Ubuntu is too old for this. The `pandoc.path` module is a
relatively recent addition that became available in pandoc 2.12,
released about a year ago. You can install a current version with the
help of the *deb* packages published on the official pandoc release
page: https://github.com/jgm/pandoc/releases/latest

Alternatively, you could use a Docker image that suits your needs, e.g.= ,
<https://h= ub.docker.com/r/pandoc/core>, but the .deb installer is
probably easier.

HTH,
Albert

PS: This is also a shortcoming of the filter: it would be better if the
filter was checking the pandoc version, returning a meaningful error
message if the version is too old. I'll go and fix that.

--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/9aaa4fcd-5dad-4278-bd37-0a1e3e4073b1n%40googlegroups.= com.
------=_Part_1037_118473114.1642436042630-- ------=_Part_1036_988227450.1642436042630--