Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735352 - games-strategy/0ad: need py3 port
Summary: games-strategy/0ad: need py3 port
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Deadline: 2020-10-09
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PMASKED
Depends on: 771147
Blocks: py3-tracker, python-3-incompatible
  Show dependency tree
 
Reported: 2020-08-02 14:25 UTC by Michał Górny
Modified: 2021-03-01 18:32 UTC (History)
15 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0ad_emerge_output.xz as substitute for build log (0ad_emerge_output.xz,103.02 KB, application/x-xz)
2021-02-17 19:20 UTC, Drake Donahue
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-02 14:25:31 UTC
Please port to py3.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-01 10:04:15 UTC
ping.
Comment 2 Alec Moskvin 2020-09-09 22:03:08 UTC
According to the docs[1], Python 2.7 is only needed at build-time:

> Python 2.7 (required for cxxtest and non-system SpiderMonkey 45) 

So this would qualify for the Plan B exemption[2]?

[1] https://trac.wildfiregames.com/wiki/BuildInstructions#Dependencies
[2] https://archives.gentoo.org/gentoo-dev/message/53a7f982320e60681865a1426f0d3257
Comment 3 Stan` 2020-09-10 06:01:55 UTC
Hi 

I'm one of the 0 A.D. developpers. We're working on removing those dependencies as a few distribution don't want to support it anymore. However due to the current amount of active C++ devs we have to work on it and more importantly to review patches this is taking way longer than expected. 

The spidermonkey upgrade is being worked on by the leader of 0 A.D. who has lot going on these days, you can find more about the migration here: https://wildfiregames.com/forum/index.php?/topic/28583-spidermonkey-52-upgrade/

Alpha 23B is using SpiderMonkey 38 (with Python 2 dep, we are using 45 in the dev version (which also has this dep) 52 will not. However as you can see updating is non trivial for us and it's a big part of our engine so it cannot be rushed. We currently have a bug that makes MP unplayable... We believe it's because of incorrect rooting but we're not sure.  https://trac.wildfiregames.com/ticket/5655

We have a potential fix for it which once again needs to be reviewed: https://code.wildfiregames.com/D2922

We also have some weird issues on Ryzen CPUs due to both our detection code which is fixed upstream and the fact that we are using CLOCK_REALTIME.See 
https://code.wildfiregames.com/D2353 for the former which is backported on some distributions (Debian, Arch...) and https://code.wildfiregames.com/D2726 which you guessed it needs to be reviewed...

There are a few other blockers list at: 

Back to the subject CXXtest python dependency can be ignored by building --without-tests in update-workspaces.sh.

We are looking to update it/ replace it by something else which requires an overhaul of our test system.


I'm sorry that all I have are apologies, so I'll understand if it is not enough.

I hope we can provide a new version by the end of the year but if we can't fix those issues it's unlikely...

Let me know if I can do anything else.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-14 03:35:23 UTC
(In reply to Stan` from comment #3)
> Hi 
> 
> I'm one of the 0 A.D. developpers. We're working on removing those
> dependencies as a few distribution don't want to support it anymore. However
> due to the current amount of active C++ devs we have to work on it and more
> importantly to review patches this is taking way longer than expected. 

Thanks for reaching out! Definitely appreciate all of the information. I spent some time reading 'the SpiderMonkey diaries' last night. :)

> Let me know if I can do anything else.

We'll see what we can do, I think it should be possible if work is ongoing still - provided that a system copy of SeaMonkey can be used rather than bundled?

I noticed that the user-contributed work mentioned use of system SM but wasn't sure if that's being considered for the current work.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-14 03:36:55 UTC
[Adding to CC, see my previous comment ^^]
Comment 6 Stan` 2020-09-15 09:00:11 UTC
> We'll see what we can do, I think it should be possible if work is ongoing still provided that a system copy of [SpiderMonkey] can be used rather than bundled?

You can build the game with `--with-system-mozjs38` to use the system provided version of SpiderMonkey. However that will still require you to build it with Python2 at some point, although it won't be a problem with this specific package.

For compatibility reasons it needs to be 38.

See https://trac.wildfiregames.com/wiki/BuildInstructions?version=356 (Notice the version at the end, since more recent versions of this page don't mention 38 anymore)
Comment 7 Quentin Retornaz 2020-09-25 23:03:03 UTC
Someone did work on Spidermonkey 52 on this branch: https://github.com/na-Itms/0ad/commits/spidermonkey
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-09 23:49:58 UTC
(In reply to Stan` from comment #6)
> > We'll see what we can do, I think it should be possible if work is ongoing still provided that a system copy of [SpiderMonkey] can be used rather than bundled?
> 
> You can build the game with `--with-system-mozjs38` to use the system
> provided version of SpiderMonkey. However that will still require you to
> build it with Python2 at some point, although it won't be a problem with
> this specific package.
> 
> For compatibility reasons it needs to be 38.
> 
> See https://trac.wildfiregames.com/wiki/BuildInstructions?version=356
> (Notice the version at the end, since more recent versions of this page
> don't mention 38 anymore)

Thank you, this should be enough! Arfrever contributed a patch which I will test ASAP.
Comment 9 Larry the Git Cow gentoo-dev 2021-01-17 01:17:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f45cfa2083bf7a6ab3f92241096c11f5adf7691

commit 9f45cfa2083bf7a6ab3f92241096c11f5adf7691
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2021-01-16 04:00:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-01-17 01:17:13 +0000

    games-strategy/0ad: Version bump (0.0.24_alpha_pre20210116040036).
    
    Using system version of SpiderMonkey 78 to avoid direct dependency on Python.
    (SpiderMonkey >=78.6 required due to bug #759985.)
    
    Bug: https://bugs.gentoo.org/735352
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../0ad/0ad-0.0.24_alpha_pre20210116040036.ebuild  | 157 +++++++++++++++++++++
 games-strategy/0ad/Manifest                        |   1 +
 .../0ad-0.0.24_alpha_pre20210116040036-build.patch | 105 ++++++++++++++
 3 files changed, 263 insertions(+)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-18 00:01:39 UTC
Update: I need to test on real hardware.
Comment 11 Larry the Git Cow gentoo-dev 2021-01-18 00:10:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98b58a567f6fc6c18d23810a0832d2440c929841

commit 98b58a567f6fc6c18d23810a0832d2440c929841
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-01-18 00:03:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-01-18 00:10:06 +0000

    profiles/package.mask: update 0ad mask
    
    Bug: https://bugs.gentoo.org/735352
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
Comment 12 Torsten Kaiser 2021-01-23 19:08:47 UTC
I'm currently trying to install the new version, but the matching 0ad-data fails to build.

I have manually started the failing command via gdb and got this backtrace:

sudo -u portage gdb -ex run --args 0ad -archivebuild=binaries/data/mods/mod -archivebuild-output=archives/mod/mod.zip


Converting texture "binaries/data/mods/mod/art/textures/ui/global/modern/background.png"

Thread 12 "TextureConverte" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdb5f7640 (LWP 6339)]
0x00007ffff6539ba7 in icbc::cluster_fit_four(icbc::SummedAreaTable const&, int, icbc::Vector3, icbc::Vector3*, icbc::Vector3*) () from /usr/lib64/libnvtt.so
(gdb) bt
#0  0x00007ffff6539ba7 in icbc::cluster_fit_four(icbc::SummedAreaTable const&, int, icbc::Vector3, icbc::Vector3*, icbc::Vector3*) () from /usr/lib64/libnvtt.so
#1  0x00007ffff653df3d in icbc::compress_dxt1(icbc::Quality, icbc::Vector4 const*, float const*, icbc::Vector3 const&, bool, bool, icbc::BlockDXT1*) ()
   from /usr/lib64/libnvtt.so
#2  0x00007ffff653fc41 in icbc::compress_dxt1(icbc::Quality, float const*, float const*, float const*, bool, bool, void*) () from /usr/lib64/libnvtt.so
#3  0x00007ffff6537f6f in nv::CompressorDXT1::compressBlock(nv::Vector4*, float*, nvtt::CompressionOptions::Private const&, void*) () from /usr/lib64/libnvtt.so
#4  0x00007ffff6537af5 in FloatColorCompressorTask(void*, int) () from /usr/lib64/libnvtt.so
#5  0x00007ffff320d8eb in worker(void*, int) () from /usr/lib64/libnvthread.so
#6  0x00007ffff320dba0 in nv::ThreadPool::workerFunc(void*) () from /usr/lib64/libnvthread.so
#7  0x00007ffff320d98e in threadFunc () from /usr/lib64/libnvthread.so
#8  0x00007ffff5f50ffe in start_thread () from /lib64/libpthread.so.0
#9  0x00007ffff5e83b0f in clone () from /lib64/libc.so.6


End of the normal build.log:
Converting texture "binaries/data/mods/mod/art/textures/ui/global/modern/arrow_down_128x128.png"
Converting texture "binaries/data/mods/mod/art/textures/ui/global/modern/arrow_up_128x128.png"
Converting texture "binaries/data/mods/mod/art/textures/ui/global/modern/background.png"
/var/tmp/portage/games-strategy/0ad-data-0.0.24_alpha_pre20210116040036/temp/environment: line 453:    31 Segmentation fault      0ad -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip"
 * ERROR: games-strategy/0ad-data-0.0.24_alpha_pre20210116040036::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 125:  Called src_compile
 *   environment, line 459:  Called die
 * The specific snippet of code:
 *               0ad -archivebuild="${archivebuild_input}" -archivebuild-output="${archivebuild_output}/${mod_name}.zip" || die;


It should not be CUDA related, as I'm only using an old radeon card. I did try to switch to media-gfx/nvidia-texture-tools-2.1.2[-openmp] but that did not make a difference.

I will try to rebuild nvtt with a lower optimisation setting...

Please ask, if you have something for me to try, or need more information.

Portage 3.0.14 (python 3.9.1-final-0, default/linux/amd64/17.1, gcc-10.2.0, glibc-2.32-r7, 5.11.0-rc3 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.11.0-rc3-x86_64-AMD_Ryzen_7_1700X_Eight-Core_Processor-with-glibc2.32
KiB Mem:    32836284 total,  21082956 free
KiB Swap:   15720380 total,  15720380 free
Timestamp of repository gentoo: Fri, 22 Jan 2021 16:30:01 +0000
Head commit of repository gentoo: 6ef9b63f4107b63d5a0564f7bae40b9d40b7db86
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.0-r1::gentoo
dev-lang/python:          2.7.18-r6::gentoo, 3.7.9-r2::gentoo, 3.9.1-r1::gentoo
dev-util/cmake:           3.19.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.3-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

local
    location: /root/ebuilds
    masters: gentoo
    priority: 0

java
    location: /usr/portage-local/layman/java
    masters: gentoo
    priority: 50

x11
    location: /usr/portage-local/layman/x11
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -march=znver1 -O3 -fomit-frame-pointer -fivopts -fweb -frename-registers -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -march=znver1 -O3 -fomit-frame-pointer -fivopts -fweb -frename-registers -ftracer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --jobs=6 --load-average=20 --keep-going"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j16"
PKGDIR="/var/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="7zip R S3TC X a52 aac aalib ace acl acpi ads aften aio alisp alsa altenburgcards amarok amd64 amr amrnb amrr amrwb animgif ao apache2 apng aqua_theme archive async audacious audiofile aura autoipd avahi bcel bcp bdf beagle berkdb bidi bigpatch binfilter bittorrent bl blas blender-game bluetooth bonusscripts boost bzip2 c++ cairo calendar caps carbone_theme cblas-external cdda cdio cdparanoia cdr cgi chm chroot cifsupcall cisco clang cli client clucene cmdctrl cmdsubmenu colord compress connectionstatus consolekit contactnotes context contrib corefonts cpio cpufreq crypt cryptsetup cscope css ctype cups curl cutterlimit cutterqueue cuttime cvs cvsgraph cxx cycles dar64 dbase dbm dbus dbx dc1394 dec_av dec_av2 declarative demo designer device-mapper divx djvu dlz dmi dmx dnotify doc domainkeys dot double-precision dpmod drafts dri dts dv dvb dvbplayer dvd dvdarchive dvdchapjump dvdr dvdread dvi ecc editor egl elf elogind eme-free emoticon encode enscript equalizer evdev excel exif exiv2 expat extensions extra extra-algorithms extra-cardsets extraengine extras farstream fat fbcon fdt festival ffmpeg fftw file file-icons flac fluidsynth fmod font-server fontconfig fortran fping fpx frei0r ftp fts3 fuse g3dvl gbm gcj gd gdbm gecko gegl geoip gflags gif gimp git gkrellm glade glamor gles gles1 gles2 glib glibc-omitfp glitz glsa glut gmedia gmp gnutls gopher gpac gpg gpgme gphoto2 graphics graphite graphviz gs gstreamer gtk gtk3 gui gutenprint gzip haptic harfbuzz hddtemp hdri highlight history html htmlhandbook http http2 httpd hvm hwdb ical iceweasel iconv icq icu id3 id3tag ide idea ieee1394 image imagemagick imap import-filter infowidget inherit-graph inkjar innodb inotify inspector introspection ipfilter ipsec iptc ipv6 irc irrlicht ithreads jabber jack jad jadetex java java-external java6 jce jemalloc jingle jit jni john jpeg jpeg2k juju jumpplay kde kdecards kdenlive kdepim kdrive kerberos kexi kipi kmid kpathsea ktts kvm lapack latex lcms ldap legacy-systray libcaca libglvnd libkms libmpeg2 libmysqlclient libnotify libsamplerate libsexy libssh2 libtirpc libvisual libwww liemikuutio lights livebuffer llvm llvm-shared-libs lm_sensors logrotate logviewer loop-playback lto lua lucene lyx lzma lzo mad magic mail mailwrapper mainmenuhooks maps masquerade math matroska maya-shaderlibrary mbox mbrola md5sum mdev mdnsresponder-compat meanwhile melt menu-plugin menubar menuorg messages metric mhash midi mikmod mime mimencode minizip mixer mjpeg mmap mmx mmxext mng mod modplug mounts-check mozdevelop mozdom mozilla mp2 mp3 mp4 mp4live mpd mpeg mpeg2 mpg123 mpi mplayer mppe-mppc mpu401 mschap msn mtp multilib multiprocess musepack music mysql mysqli mythtv nagios-dns nagios-ntp nagios-ping nagios-ssh nat native-exceptions ncurses nepomuk net netjack netmeeting network network-cron networkmanager nfs nfsidmap nfsv4 nfsv41 nls nntp normalize nova nptl nsplugin nspr nss ntfs ntfsprogs nuv objc offensive ogg ogg123 ole opcache opencl openexr opengl openimageio openmp openssh openssl openvpn opus osmesa otr pam pango pascal pcap pcre pcre16 pcre32 pda pdf pdfimport perl php physfs pim pixmaps pkcs11 plasma player plotutils pmu png policykit portaudio posix postfix postproc postscript povray pptp printsupport pth pulseaudio python qemu qml qt3support qt5 query-browser quicktime r600-llvm-compiler radio rar raw rc5 rdesktop rdp readline realmedia remix replaygain restrict-javascript rle romio rpc rss rtc rtmp rtsp samba sasl sbig scanner screen screencast script scripttools sdk sdl sdl-image sdl-sound sdl2 sdlaudio seamonkey search seccomp secure-delete semantic-desktop sensord server shared-dricore shorten shout sid signatures simplexml skins smime smp smtp sndfile sockets socks5 solver songs sortrecords sound soundex sounds sox speech speedo speex spell spice split-usr sql sqlite sqlite3 srtp sse sse2 sse3 sse4a ssl ssse3 stars stats stemmer stlport stream strongswan_plugins_aesni strongswan_plugins_gcm strongswan_plugins_rdrand submenu subtitles subversion suhosin suid-wrapper svc svg svgz swat sylpheed sysfs syslog system-bootstrap system-cairo system-icu system-jpeg system-jsoncpp system-libvncserver system-libvpx system-sqlite systray sysvipc szip t1lib taglib tagwriting tb4 tcpd teletext tetex tex text texteffect textures tftp tga themes theora thesaurus threads threadsafe tidy tiff timercmd timerinfo tk tls toolbar tools transcode trayicon truetype tta ttxtsubs twolame udev udisks ui unicode unlock-notify upcall usb usbredir userfiles utils uudeview uuencode v4l v4l2 vaapi vamp vcd vcdx vdpau vdr video videos view vim-syntax virgl visualization vlm vnc vncviewer voice volctrl vorbis vorbis-psy vpx wav wavpack wayland wayland-compositor web webdav webinterface webkit webm webp widgets wifi winbind winpopup wireshark wma wmf wmp wxwidgets x264 x265 xanim xattr xcb xcf xcomposite xephyr xetex xext xface xforms xfs xft xhtml xine xinerama xkb xml xmp xnest xorg xosd xplanet xpm xrandr xrender xscreensaver xsl xslt xspice xv xvfb xvid xvmc xvnc xwayland yahoo yv12 zeroconf zip zlib zrtp zvbi" ABI_X86="32 64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_9" QEMU_SOFTMMU_TARGETS="x86_64 alpha arm i386 m68k mips mips64 mips64el mipsel ppc ppc64 ppcemb s390x sparc sparc64" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="dummy v4l virgl radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

games-strategy/0ad-0.0.24_alpha_pre20210116040036::gentoo was built with the following:
USE="editor lobby (nvtt) -pch -test" ABI_X86="(64)" ELIBC="(glibc)" KERNEL="(linux)" USERLAND="(GNU)"
FEATURES="strict parallel-fetch sfperms assume-digests userpriv splitdebug usersandbox xattr protect-owned pid-sandbox fixlafiles usersync buildpkg unmerge-logs ipc-sandbox sandbox unknown-features-warn config-protect-if-modified ebuild-locks network-sandbox qa-unresolved-soname-deps distlocks binpkg-logs preserve-libs binpkg-docompress news unmerge-orphans binpkg-dostrip multilib-strict merge-sync"


media-gfx/nvidia-texture-tools-2.1.2::gentoo was built with the following:
USE="-openmp" ABI_X86="(64)" CPU_FLAGS_X86="sse2" ELIBC="(glibc)" KERNEL="(linux)" USERLAND="(GNU)"
Comment 13 Torsten Kaiser 2021-01-23 21:15:10 UTC
Downgrading to nvidia-texture-tools-2.1.1 works.

It seems to me, that I'm hitting this upstream bug in that package:
https://github.com/castano/nvidia-texture-tools/issues/332

From the changelog of nvtt:
NVIDIA Texture Tools version 2.1.2
 * Use ICBC as the main BC1 compressor.


The get 2.1.1 to compile I had to slightly change the current 2.1.2-cmake patch, add https://github.com/castano/nvidia-texture-tools/commit/6474f2593428d89ec152da2502aa136ababe66ca and disable building of the test programs, as these failed to link for me.


Using that version 0ad-data now build and the game seems to work for me.
Comment 14 Stan` 2021-01-24 10:02:25 UTC
Hey thanks a lot for testing. We haven't updated the bundled NVTT to the very latest (and the last) and it seems we still have fixes they don't have.  

Also the FreeBSD maintainer painfully discovered that starring from the version 2.0.9 it seems to require SSE2.

Depending on what we do for A25 (Updating or replacing it with something else (suggestions are welcome)) I'll make sure to keep it in mind.
Comment 15 Torsten Kaiser 2021-01-24 11:07:30 UTC
Wrt Gentoo it might really be the best solution to switch to the bundled nvtt.

The current 2.1.2 in Gentoo seems broken (at least for me) and as the project itself seems dead (https://github.com/castano/nvidia-texture-tools/commit/4eafedd84862affee818d4afd927597ee597c3a0 "NVIDIA Texture Tools is discontinued") there will probably no way forward for that version.

Looking for reverse dependencies for media-gfx/nvida-texture-tools:
games-strategy/0ad and media-libs/devil

The reverse dependencies for media-libs/devil:
dev-games/cegui and media-gfx/photoqt

dev-games/cegui only seems to be used by games-rpg/sumwars and that package seems dead. Its homepage only shows PHP errors and its forum only shows a single comment since ~2016 ( http://sumwars.org/forum/index.php?topic=4766.0 ). (Last release of sumwars was 2014: http://sumwars.org/forum/index.php?topic=491.0 )

So maybe removing the optional devil support from photoqt and then treecleaning sumwars/cegui/devil/nvidia-texture-tools and letting 0ad use its internal fixed older nvtt?
Comment 16 Torsten Kaiser 2021-01-24 11:19:03 UTC
Oops: I searched for "media-libs/devil " instead of "media-libs/devil".
That library is used by several other packages.

But nvidia-texture-tools support in devil is optional and as far as I can see, no other packages depends on media-libs/devil[nvtt].

And that flag is already masked on several archs:
arm64/package.use.mask:media-libs/devil nvtt
arm/package.use.mask:media-libs/devil nvtt
hppa/package.use.mask:media-libs/devil allegro nvtt
mips/package.use.mask:media-libs/devil  nvtt
powerpc/use.mask:nvtt
Comment 17 Torsten Kaiser 2021-01-28 19:33:30 UTC
After upgrading from spidermonkey-78.6.0 to spidermonkey-78.7.0 startup fails:
0ad: symbol lookup error: 0ad: undefined symbol: _ZN2JS16PrepareZoneForGCEPNS_4ZoneE, version mozjs_78

Rebuilding fails:
../../../source/scriptinterface/ScriptContext.cpp:136:39: error: cannot convert ‘JS::Zone*’ to ‘JSContext*’
  136 |  JS::PrepareZoneForGC(js::GetRealmZone(realm));
      |                       ~~~~~~~~~~~~~~~~^~~~~~~
      |                                       |
      |                                       JS::Zone*
../../../source/scriptinterface/ScriptContext.cpp:254:40: error: cannot convert ‘JS::Zone*’ to ‘JSContext*’
  254 |   JS::PrepareZoneForGC(js::GetRealmZone(realm));
      |                        ~~~~~~~~~~~~~~~~^~~~~~~
      |                                        |
      |                                        JS::Zone*

Probably cause by: https://hg.mozilla.org/mozilla-central/rev/7c1dcab226105b4d4dab172021483381689dd6d7

The following patch seems to work for me:
--- /source/scriptinterface/ScriptContext.cpp~  2021-01-16 05:00:36.000000000 +0100
+++ /source/scriptinterface/ScriptContext.cpp   2021-01-28 20:20:51.357822018 +0100
@@ -133,7 +133,7 @@
        // Schedule the zone for GC, which will destroy the realm.
        if (JS::IsIncrementalGCInProgress(m_cx))
                JS::FinishIncrementalGC(m_cx, JS::GCReason::API);
-       JS::PrepareZoneForGC(js::GetRealmZone(realm));
+       JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
        m_Realms.remove(realm);
 }
 
@@ -251,5 +251,5 @@
 void ScriptContext::PrepareZonesForIncrementalGC() const
 {
        for (JS::Realm* const& realm : m_Realms)
-               JS::PrepareZoneForGC(js::GetRealmZone(realm));
+               JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
 }
Comment 18 Stan` 2021-01-28 21:47:14 UTC
We didn't test 78.7 when we updated. We do have a fair amount of patches on our version though. See libraries/source/spidermonkey/patch.sh 

Is that gonna be a breaking change ?

If not just like for NVTT you can use ours in the folder mentioned above (it's 78.6) 

Btw if you have time and motivation you can come chat with us on irc.quakenet.org #0ad-dev. We're usually there at CET times
Regards

Stan.

PS:Let me(us) know if we can be of assistance.
Comment 19 Larry the Git Cow gentoo-dev 2021-02-12 20:18:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=815ab784f5f549e0f4cb803bbd813199d2c94c90

commit 815ab784f5f549e0f4cb803bbd813199d2c94c90
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-02-12 20:18:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-02-12 20:18:47 +0000

    games-strategy/0ad: revert to bundled libraries
    
    * SpiderMonkey changes the consumed interfaces
      even within minor versions, so using
      the system version is a no go.
    
    * nvtt is abandoned upstream and using the
      system version results in segfaults.
    
      Use 0ad's version which has fixes instead.
    
    Bug: https://bugs.gentoo.org/735352
    Bug: https://bugs.gentoo.org/689124
    Closes: https://bugs.gentoo.org/768840
    Closes: https://bugs.gentoo.org/759934
    Closes: https://bugs.gentoo.org/768930
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 ...> 0ad-0.0.24_alpha_pre20210116040036-r1.ebuild} | 28 ++++++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)
Comment 20 Drake Donahue 2021-02-17 19:20:11 UTC
Created attachment 687318 [details]
0ad_emerge_output.xz as substitute for build log
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-17 19:24:36 UTC
(In reply to Drake Donahue from comment #20)
> Created attachment 687318 [details]
> 0ad_emerge_output.xz as substitute for build log

...? Could you file a new bug please so we can keep track of the issues here? Thanks!
Comment 22 Vasilis Lourdas 2021-02-27 12:59:44 UTC
Version 24 alpha was released a week ago. This bug states that the scripts have been ported to Python 3: https://trac.wildfiregames.com/ticket/5694 (bug was marked resolved and included in the 24 alpha release).

Could we have a newer ebuild for the latest release to try?
Comment 23 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 13:01:53 UTC
(In reply to Vasilis Lourdas from comment #22)
> Version 24 alpha was released a week ago. This bug states that the scripts
> have been ported to Python 3: https://trac.wildfiregames.com/ticket/5694
> (bug was marked resolved and included in the 24 alpha release).
> 
> Could we have a newer ebuild for the latest release to try?

There's a PR already which is on my list to review (no time yet): https://github.com/gentoo/gentoo/pull/19603

I'm aware of the release but I was waiting a few days until the issues were sorted with it, but ultimately, I need to just get time & review that PR which should get us sorted :)

Feel free to try it and let me know if it works? (This would be helpful if you can, but OK if not)
Comment 24 Vasilis Lourdas 2021-02-27 13:06:25 UTC
(In reply to Sam James from comment #23)
> There's a PR already which is on my list to review (no time yet):
> https://github.com/gentoo/gentoo/pull/19603
> 
> I'm aware of the release but I was waiting a few days until the issues were
> sorted with it, but ultimately, I need to just get time & review that PR
> which should get us sorted :)
> 
> Feel free to try it and let me know if it works? (This would be helpful if
> you can, but OK if not)

I am willing to try it. Is your ebuild specifically for version 24 alpha or an older (or newer) revision?
Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-27 13:19:21 UTC
(In reply to Vasilis Lourdas from comment #24)
> (In reply to Sam James from comment #23)
> > There's a PR already which is on my list to review (no time yet):
> > https://github.com/gentoo/gentoo/pull/19603
> > 
> > I'm aware of the release but I was waiting a few days until the issues were
> > sorted with it, but ultimately, I need to just get time & review that PR
> > which should get us sorted :)
> > 
> > Feel free to try it and let me know if it works? (This would be helpful if
> > you can, but OK if not)
> 
> I am willing to try it. Is your ebuild specifically for version 24 alpha or
> an older (or newer) revision?

It's currently for 0ad-0.0.24_alpha, snapshot taken at 2021/01/16. So, it could be newer, but trivially bumped too, I think.
Comment 26 Vasilis Lourdas 2021-02-27 14:15:54 UTC
(In reply to Sam James from comment #25)
> It's currently for 0ad-0.0.24_alpha, snapshot taken at 2021/01/16. So, it
> could be newer, but trivially bumped too, I think.

Ok, testing it right now. For some reason, it uses only 1 cpu core for building. There's also a newer 0.0.24b_alpha release in the official repository with a translation and a couple game fixes.
Comment 27 Vasilis Lourdas 2021-02-27 15:00:09 UTC
It took 37 minutes to build. Unfortunately, the game throws errors after starting a new game scenario and it's unusable. Examples:

TIMER| loading/styles.xml: 22.154 us
TIMER| loading/sprites.xml: 92.953 us
TIMER| loading/loading.xml: 7.57336 ms
TIMER| common/global.xml: 199.341 us
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_01.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_01.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_03.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_03.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_03.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_03.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_02.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_02.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_02.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_02.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_02.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_02.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_01.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_01.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_03.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_03.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_01.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_01.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_03.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_03.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_03.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_03.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_02.dae'
ERROR: CObjectEntry::BuildVariation(): Model art/meshes/gaia/lombardy_poplar_02.dae failed to load
ERROR: Could not load mesh 'art/meshes/gaia/lombardy_poplar_01.dae'

Inside the game, no people, buildings, or animals are shown.

The full utilization of all cpu cores while building the game would probably be a first step to further test ebuilds.
Comment 28 Stan` 2021-02-27 15:29:00 UTC
I added some comments on that PR, hope it helps. As I told sam feel free to drop by #0ad-dev on irc.quakenet.org for assistance.

For your specific issue though, it looks like it cannot find the 3D models binaries; I'm not sure what the tree looks like on your machine so I cannot help.

I would look into fcollada, see if everything is fine there.
Comment 29 Larry the Git Cow gentoo-dev 2021-02-28 23:04:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=750a1ce1cc28dc679c08b1456a83c4c8542bb526

commit 750a1ce1cc28dc679c08b1456a83c4c8542bb526
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-02-28 22:27:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-02-28 23:04:28 +0000

    games-strategy/0ad: bump to 0.0.24b_alpha
    
    Huge thanks to everybody mentioned in this commit
    (and likely others too, sorry if I forgot you!)
    
    This started with Arfrever giving an initial bump,
    then several revisions later, we seem to be in a position
    where it's fully working!
    
    Most of the issues came from (de)bundling SpiderMonkey
    and NVTT:
    
    * New SpiderMonkey releases regularly break the APIs
      which 0ad uses, so we're reverting to the bundled
      copy per upstream advice;
    
    * NVTT has been abandoned upstream (as an independent project)
      so the 0ad developers have taken it over and applied significant
      patches. We use the bundled copy now to take advantage of these
      fixes.
    
    We also abandon 0ad-data for now. We're now using the released
    asset files for 0.0.24b_alpha but the 0ad ebuild itself, thanks to
    Wolf-Dieter, can now generate these assets rather than relying
    on a separate ebuild like 0ad-data. This simplifies matters.
    
    Closes: https://bugs.gentoo.org/735352
    Thanks-to: Stanislas Dolcini <stan at wildfiregames dot com>
    Thanks-to: Wolf-Dieter Rieck <wesen42@web.de>
    Thanks-to: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
    Thanks-to: Quentin Retornaz <gentoo@retornaz.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 games-strategy/0ad/0ad-0.0.24b_alpha.ebuild | 226 ++++++++++++++++++++++++++++
 1 file changed, 226 insertions(+)
Comment 30 Larry the Git Cow gentoo-dev 2021-02-28 23:08:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88482a160b9a08a834df9642c41e2f8c4de332cb

commit 88482a160b9a08a834df9642c41e2f8c4de332cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-02-28 23:08:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-02-28 23:08:12 +0000

    profiles: Last-rite games-strategy/0ad-data
    
    Bug: https://bugs.gentoo.org/735352
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 31 Vasilis Lourdas 2021-03-01 18:30:46 UTC
Good work. Building in two machines right now. However, my comment about the building process utilizing 1 processor core only, still applies.
Comment 32 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-01 18:32:20 UTC
(In reply to Vasilis Lourdas from comment #31)
> Good work. Building in two machines right now. However, my comment about the
> building process utilizing 1 processor core only, still applies.

Please file a new bug for any issues, but that should've been resolved by https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be214f59a2387da65ae4665cbe1639a9c3e6bb42. Maybe not :(