[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I propose my help for maintaining 0ad



2017-10-19 17:46 GMT+02:00 Vincent Cheng <vcheng@debian.org>:
On Wed, Oct 18, 2017 at 6:08 AM, Simon McVittie <smcv@debian.org> wrote:
> On Wed, 18 Oct 2017 at 14:58:45 +0200, Ludovic Rousseau wrote:
>> The problem is with the script libraries/source/spidermonkey/mozjs-38.0.0/
>> python/mach/mach/mixin/process.py
>
> Ugh, an embedded code copy of an outdated mozjs? I hope this isn't being
> used to execute untrusted _javascript_ code from mods or similar...

Unfortunately yes, but unless someone volunteers to port 0ad to the
precise mozjs version that happens to be in Debian at the time, this
will remain the status quo.

I'll also point out that 0ad applies some local patches on top of
whatever mozjs release they're using at the time [1]. My understanding
is that they've tried to have these patches applied upstream but were
rejected.

> (mozjs38 was never in Debian, but mozjs52 is now available in unstable,
> although it has portability issues which are still in progress.)

Portability is a non-issue for 0ad as it has other dependencies which
are not portable and restricted to a subset of archs
(nvidia-texture-tools), and given how 0ad seems to FTBFS on !amd64
!i386 every other release in Debian, 0ad itself probably isn't all
that portable to begin with.

0ad alpha 22 FTBFS on arm64 and armhf but with 2 different errors:

On arm64 [2]:
c++ -o Unified_cpp_js_src3.o -c  -I../../dist/system_wrappers -include /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/config/gcc_hidden.h -DIMPL_MFBT -DEXPORT_JS_API -DAB_CD= -DNO_NSPR_10_SUPPORT -I/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src -I. -I/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/intl/icu/source/common -I/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/intl/icu/source/i18n -I../../dist/include   -I/usr/include/nspr        -fPIC  -Wdate-time -D_FORTIFY_SOURCE=2 -DMOZILLA_CLIENT -include ../../js/src/js-confdefs.h -MD -MP -MF .deps/Unified_cpp_js_src3.o.pp -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-schedule-insns2 -fno-delete-null-pointer-checks -DTRACE_LOG_DIR="\"../../source/tools/tracelogger/\"" -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DDEBUG -DTRACING -g -fno-omit-frame-pointer       /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug/js/src/Unified_cpp_js_src3.cpp
Unified_cpp_js_src4.o
In file included from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/CodeGenerator.cpp:41:0,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug/js/src/Unified_cpp_js_src3.cpp:92:
/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/shared/CodeGenerator-shared-inl.h: In member function 'void js::jit::CodeGeneratorShared::verifyHeapAccessDisassembly(uint32_t, uint32_t, bool, js::Scalar::Type, const js::jit::Operand&, js::jit::LAllocation)':
/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/shared/CodeGenerator-shared-inl.h:232:10: error: 'class js::jit::MacroAssembler' has no member named 'verifyHeapAccessDisassembly'
     masm.verifyHeapAccessDisassembly(begin, end,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jstypes.h:25:0,
                 from ../../dist/include/js/Utility.h:26,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jsalloc.h:18,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jsatom.h:12,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/vm/Runtime.h:21,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jscntxt.h:15,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/Ion.h:12,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/FixedList.h:12,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/BaselineCompiler.h:10,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/jit/BaselineCompiler.cpp:7,
                 from /<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug/js/src/Unified_cpp_js_src3.cpp:2:
../../dist/include/mozilla/Casting.h: At global scope:
../../dist/include/mozilla/Casting.h:29:1: warning: mangled name for 'To mozilla::BitwiseCast(From) [with To = void*; From = float (*)(float) throw ()]' will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type]
 BitwiseCast(const From aFrom)
 ^~~~~~~~~~~
/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-38.0.0/config/rules.mk:930: recipe for target 'Unified_cpp_js_src3.o' failed
make[5]: *** [Unified_cpp_js_src3.o] Error 1
on armhf [3]:
g++ -Iobj/gui_Release -include obj/gui_Release/precompiled.h -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DLIB_STATIC_LINK -DINSTALLED_BINDIR=/usr/games -DINSTALLED_DATADIR=/usr/share/games/0ad -DINSTALLED_LIBDIR=/usr/lib/games/0ad -DUSING_PCH -I../../../source/pch/gui -I../../../source -I../../../libraries/source/spidermonkey/include-unix-release -I../../../source/third_party/tinygettext/include -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I/usr/local/include/X11 -I/usr/local/include -I/usr/include/X11 -g -Wall -O3 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fno-omit-frame-pointer -fpch-preprocess -fPIC -std=c++0x -Wno-psabi -fvisibility=hidden `sdl2-config --cflags` -MF obj/gui_Release/CDropDown.d -MT "obj/gui_Release/CDropDown.o" -o "obj/gui_Release/CDropDown.o" -c "../../../source/gui/CDropDown.cpp"
../../../source/gui/CDropDown.cpp: In member function 'virtual InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_*)':
../../../source/gui/CDropDown.cpp:355:94: error: call of overloaded 'abs(unsigned int)' is ambiguous
       diff = std::abs(pList->m_Items[i].GetRawString().LowerCase()[j] - (int)m_InputBuffer[j]);
                                                                                              ^
In file included from /usr/include/c++/7/cmath:47:0,
                 from /usr/include/c++/7/math.h:36,
                 from ../../../source/lib/posix/posix_types.h:48,
                 from ../../../source/lib/precompiled.h:64,
                 from ../../../source/pch/gui/precompiled.h:18:
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
   abs(long double __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
   abs(float __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
   abs(double __x)
   ^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
                 from /usr/include/c++/7/cmath:47,
                 from /usr/include/c++/7/math.h:36,
                 from ../../../source/lib/posix/posix_types.h:48,
                 from ../../../source/lib/precompiled.h:64,
                 from ../../../source/pch/gui/precompiled.h:18:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
gui.make:198: recipe for target 'obj/gui_Release/CDropDown.o' failed

Volunteering to maintain 0ad Debian package was, maybe, not a good idea :-)

Do you think it is a good idea to remove support of arm64 and armhf for now so that 0ad alpha 22 can migrate to testing and work on the build problems in the mean time ?
I don't know if I will have enough free time in the next days (or weeks).

Bye


Regards,
Vincent

[1] http://sources.debian.net/src/0ad/0.0.21-2/libraries/source/spidermonkey/

[2] https://buildd.debian.org/status/fetch.php?pkg=0ad&arch=arm64&ver=0.0.22-1&stamp=1508351579&raw=0
[3] https://buildd.debian.org/status/fetch.php?pkg=0ad&arch=armhf&ver=0.0.22-1&stamp=1508365643&raw=0

--
 Dr. Ludovic Rousseau

Reply to: