Package: xmake
Version: 2.9.1+ds-1
Severity: normal
X-Debbugs-Cc: nwfila...@gmail.com

Dear Maintainer,

xmake upstream ships with a vendored lua-cjson, which Debian removes as parts of
debian/patches/convert_local_source_to_external_dependencies.patch and the
commit dd807d0489aa3d0f2b584e7b379cdb62e82967f8 on 2023 Aug 24.

Unfortunately, that commit removed the only source of definition for the C
preprocessor symbol XM_CONFIG_API_HAVE_LUA_CJSON, and the patch would have
unhooked it anyway.  This symbol is still being tested for in
core/src/xmake/engine.c .  As a result, the built xmake binary does not end up
using lua-cjson, but rather falls back to its built-in core/base/json.lua 
parser.
As a consequence, for example, xmake loses lua-cjson's support for parsing
non-standard hexadecimal numeric literals ("0x1234").

I believe the intention of the aforementioned patches was not to stop using
lua-cjson, just to use Debian's packaged version thereof, and so both

1. the build infrastructure must be taught to find the appropriate -llua*-cjson
   flag (presumably -llua5.4-cjson if we're building for 5.4 and... something
   else? if we're building for luajit?), and...

2. either...

   1. the build system should cause the C preprocessor to define
      XM_CONFIG_API_HAVE_LUA_CJSON, or

   2. The test for that symbol in core/src/xmake/engine.c should be removed as
      part of applying debian/patches.

A baseline test of functionality is that the resulting xmake binary should
contain the string "cjson", as that symbol is exposed to Lua as a global when
the lua-cjson library is enabled.

Thank you for your time,
--nwf;

-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-10-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xmake depends on:
ii  libc6            2.36-9+deb12u7
ii  liblua5.4-0      5.4.6-3+b1
ii  liblz4-1         1.9.4-1
ii  libncurses6      6.4-4
ii  libreadline8t64  8.2-4
ii  libsv1           1.1-1
ii  libtinfo6        6.4-4
ii  xmake-data       2.9.1+ds-1

Versions of packages xmake recommends:
ii  doxygen  1.9.4-4

xmake suggests no packages.

-- no debconf information

Reply via email to