Page MenuHomeWildfire Games

Add a safeguard for users trying to use an old system NVTT
Needs ReviewPublic

Authored by Itms on May 24 2020, 6:50 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Trac Tickets
#5757
Summary

A lot of users try to build the development version --with-system-nvtt, which is not the default, but is recommended since we match upstream. Unfortunately, a lot of package managers distribute nvtt only for 0ad releases, so they are behind, as was alpha 23. Users of the old NVTT will experience a crash on startup, which is otherwise fixed by cleaning the cache (try this first).

This patch prevents building with an old NVTT and suggests using the bundled version.

Test Plan

Check that this prevents building with an old system NVTT.

Check that this works with the bundled copy (Jenkins will make sure of that).

If possible, check that this works with an up-to-date system NVTT.

Event Timeline

Itms created this revision.May 24 2020, 6:50 PM
Owners added a subscriber: Restricted Owners Package.May 24 2020, 6:51 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/810/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2220/display/redirect

Itms planned changes to this revision.May 27 2020, 8:37 AM

GunChleoc reports it doesn't correctly detect an old NVTT version.

Itms requested review of this revision.Mon, Jul 6, 10:31 AM

As reported on Trac, the patch works for me, I have no news of GunChleoc. If someone with an Ubuntu, or derived, could test this... I am also interested in users of various distributions where the system nvtt creates the issue.

Lubuntu 18:

libnvtt-dev/bionic,now 2.0.8-1+dfsg-8.1 amd64 [installed]
  NVIDIA Texture Tools (Header)

libnvtt2/bionic,now 2.0.8-1+dfsg-8.1 amd64 [installed,automatic]
  NVIDIA Texture Tools

This is what you'd like, right?

TextureConverter.cpp
../../../source/graphics/TextureConverter.cpp:44:2: error: #error Please use NVTT 2.1.0 or newer.If your system does not provide it, you should use the bundled version by NOT passing --with-system-nvtt to premake.
 #error Please use NVTT 2.1.0 or newer.\
  ^~~~~
graphics.make:371: recipe for target 'obj/graphics_Release/TextureConverter.o' failed
make[1]: *** [obj/graphics_Release/TextureConverter.o] Error 1
Makefile:116: recipe for target 'graphics' failed
make: *** [graphics] Error 2