FS#63613 - [lua-expat] Not-well-formed XML being produced on Lua 5.3

Attached to Project: Community Packages
Opened by Link Mauve (linkmauve) - Saturday, 31 August 2019, 19:19 GMT
Last edited by Morten Linderud (Foxboron) - Tuesday, 19 April 2022, 19:07 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Caleb Maclennan (alerque)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
-DLUA_32BITS is the wrong option to use to make lua-expat work on Lua 5.3, instead you should use -DLUA_C89_NUMBERS. The current option prevents the normal operation of this package.

Additional info:
* package version(s)
1.3.0-4

* config and/or log files etc.
N/A

* link to upstream bug report, if any
Not yet.

Steps to reproduce:
% pacman -S prosody
% cd /usr/lib/prosody
% lua -e 'print(require("util.serialization").serialize(assert(require"util.xml".parse([[<foo xmlns:a="foo:bar" a:bar="baz">moo</foo>]]))))'

If lua-expat is working correctly, this will print the parsed XML, if not it will say “invalid attribute name: expected string, got number”.
This task depends upon

Closed by  Morten Linderud (Foxboron)
Tuesday, 19 April 2022, 19:07 GMT
Reason for closing:  Fixed
Comment by Link Mauve (linkmauve) - Sunday, 05 January 2020, 13:04 GMT
Hi, any news on this issue? It prevents Prosody from running on Lua 5.3 at the moment.
Comment by Maxime Buquet (ppjet6) - Monday, 13 April 2020, 20:04 GMT
Hey, I'm also affected by this when doing some initial testing to move aur/prosody-hg to lua5.3. An update would be great.
Comment by Caleb Maclennan (alerque) - Tuesday, 14 April 2020, 08:35 GMT
This is holding up other packages as well. I had trouble with this trying to move Asterisk to build against 5.3 as well.

Basically this package exists but it does not _function_ for the main thing it's supposed to do, no everything that depends on it is basically without a dependency.
Comment by Sergej Pupykin (sergej) - Friday, 21 May 2021, 18:48 GMT
Cannot find neither LUA_C89_NUMBERS nor LUA_32BITS in lua-expat. Where should I specify it?
Comment by Caleb Maclennan (alerque) - Monday, 23 August 2021, 19:42 GMT
About a month ago I got promoted to TU status. This isn't my package, but I've been going back through my list of bugs that really bug me looking for ones that I can volunteer to fix now.

Unfortunately I've spent a couple hours on this one and still haven't found the magic incantation. It's still quite broken for Lua 5.3 and now Lua 5.4 too. I'm not sure how to make it work.

Link Mauve if you have any more concrete input about what needs fixing where I'd be up for making it happen.
Comment by Link Mauve (linkmauve) - Friday, 03 September 2021, 13:22 GMT
In my previous testing, compiling it with `-DLUA_C89_NUMBERS` instead of the current `-DLUA_32BITS` was enough to make it behave properly. And thanks for taking this TU job!
Comment by Caleb Maclennan (alerque) - Friday, 03 September 2021, 13:44 GMT
@linkmauve what is "it" in your comment? Nothing is this package has `-DLUA_32BITS` either in our packaging or the upstream project source, so it isn't clear to me what the "it" is you say you are compiling. Are you recompiling Lua itself to make this work for you?
Comment by Link Mauve (linkmauve) - Friday, 03 September 2021, 13:49 GMT Comment by Caleb Maclennan (alerque) - Friday, 03 September 2021, 18:42 GMT
Interesting, I hadn't checked the history to see it was removed. That being said before my August comment above I did try adding `-DLUA_C89_NUMBERS` to the COMMON_CFLAGS there and it did not seem to resolve this problem. It's possible my testing was flawed, I'll give it another go.
Comment by Caleb Maclennan (alerque) - Thursday, 07 April 2022, 15:11 GMT
I'm having trouble confirming if this is still a problem or not on the current lua-expat release.
Comment by Link Mauve (linkmauve) - Thursday, 07 April 2022, 15:30 GMT
Hi, I’ve been running Prosody on top of Lua 5.4 (skipping 5.3) using the [prosody-hg](https://aur.archlinux.org/packages/prosody-hg) package from AUR and it works fine, so we can probably consider this issue closed. Thanks!

Loading...