HomeWildfire Games

Upgrade NVTT to version 2.1.1, fixes #4549.
Concern RaisedrP23305

Description

Upgrade NVTT to version 2.1.1, fixes #4549.

Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi, containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475

Details

Auditors
Stan
Committed
ItmsDec 29 2019, 12:21 PM
Differential Revision
D2475: Update NVTT to 2.1.1
Parents
rP23304: [Windows] Automated build.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 10562
Build 18121: Trigger Windows Autobuild
Build 18120: Post-Commit BuildJenkins

Event Timeline

Stan raised a concern with this commit.Dec 30 2019, 1:21 PM
Stan added a subscriber: Stan.
pi@raspberrypi:/media/pi/844df88a-3cff-4625-be92-09d7028b5f93 $ sh build-pyrogenesis.sh 
Déjà à jour.
Updating workspaces with 5 jobs...
CMake Warning (dev) at /usr/share/cmake-3.13/Modules/FindOpenGL.cmake:270 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/arm-linux-gnueabihf/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/arm-linux-gnueabihf/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/arm-linux-gnueabihf/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  src/CMakeLists.txt:18 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp:672:8: error: #error "Unknown CPU"
 #      error "Unknown CPU"
        ^~~~~
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp: In function ‘void* {anonymous}::callerAddress(void*)’:
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp:699:5: warning: no return statement in function returning non-void [-Wreturn-type]
     }
     ^
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp: In function ‘void nv::debug::dumpCallstack(nv::MessageHandler*, int)’:
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp:1024:47: error: no matching function for call to ‘nv::MessageHandler::log(const char*&, NULL)’
             messageHandler->log(lines[i], NULL);
                                               ^
In file included from /media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.cpp:3:
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.h:184:22: note: candidate: ‘virtual void nv::MessageHandler::log(const char*, va_list)’
         virtual void log(const char * str, va_list arg) = 0;
                      ^~~
/media/pi/844df88a-3cff-4625-be92-09d7028b5f93/0ad/libraries/source/nvtt/src/src/nvcore/Debug.h:184:22: note:   no known conversion for argument 2 from ‘int’ to ‘va_list’ {aka ‘__va_list’}
make[3]: *** [src/nvcore/CMakeFiles/nvcore.dir/build.make:63: src/nvcore/CMakeFiles/nvcore.dir/Debug.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:200: src/nvcore/CMakeFiles/nvcore.dir/all] Error 2
make[2]: *** Attente des tâches non terminées....

Maybe we still need rP16872 ? Doesn't compile anymore on my RPI4

This commit now has outstanding concerns.Dec 30 2019, 1:21 PM
vladislavbelov added inline comments.
/ps/trunk/build/premake/extern_libs5.lua
466

Can't link pyrogenesis, because bc6h wasn't found (probably bc7 won't be found as well).

I didn't find it in build-osx-libs.sh or in build instructions.

vladislavbelov added inline comments.Jan 4 2020, 3:16 PM
/ps/trunk/build/premake/extern_libs5.lua
466

Complete cleanup helped to link (including SVN cleanup).

Krinkle added a subscriber: Krinkle.Jan 6 2020, 4:53 AM

I'm having the same issue on macOS 10.14.6 Mojave.

$  ./build-osx-libs.sh -j3


$ ./clean-workspaces.sh


$ ./update-workspaces.sh -j3
$ make pyrogenesis -j3



ld: library not found for -lbc6h
Itms added a comment.Jan 6 2020, 8:24 AM

@Krinkle

rm -f libraries/source/nvtt/.already-built

in order to actually build the new nvtt version with build-osx-libs.sh.

Thanks, I've tried that now. (Also, I was expecting the script to track the version of lib it built instead of boolean. Seems simple to implement, will consider that later.)

With that file removed and re-ran it now fails in actual compilation.

-- Build files have been written to: /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/build
Scanning dependencies of target posh
Scanning dependencies of target squish
[  1%] Building C object extern/poshlib/CMakeFiles/posh.dir/posh.c.o
[  2%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/fastclusterfit.cpp.o
[  3%] Linking C static library libposh.a
[  3%] Built target posh
Scanning dependencies of target nvcore
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/fastclusterfit.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/fastclusterfit.h:31:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/fastclusterfit.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/fastclusterfit.h:32:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
[  5%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/Debug.cpp.o
3 warnings generated.
[  6%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/weightedclusterfit.cpp.o
[  7%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/FileSystem.cpp.o
[  9%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/Memory.cpp.o
[ 10%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/StrLib.cpp.o
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/weightedclusterfit.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/weightedclusterfit.h:31:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/weightedclusterfit.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/weightedclusterfit.h:32:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
3 warnings generated.
[ 11%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/colourblock.cpp.o
[ 12%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/TextWriter.cpp.o
[ 14%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/Timer.cpp.o
[ 15%] Linking CXX static library libnvcore.a
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourblock.cpp:26:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourblock.h:30:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnvcore.a(Memory.cpp.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libnvcore.a(Memory.cpp.o) has no symbols
2 warnings generated.
[ 15%] Built target nvcore
[ 16%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/colourfit.cpp.o
[ 18%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/colourset.cpp.o
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourfit.cpp:26:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourfit.h:30:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.cpp:26:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.h:30:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourfit.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.h:31:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.cpp:26:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.h:31:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
3 warnings generated.
Scanning dependencies of target bc7
3 warnings generated.
[ 19%] Building CXX object src/nvtt/squish/CMakeFiles/squish.dir/maths.cpp.o
[ 20%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl.cpp.o
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.cpp:26:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.cpp:27:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
[ 22%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode0.cpp.o
3 warnings generated.
[ 23%] Linking CXX static library libsquish.a
[ 23%] Built target squish
[ 24%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode1.cpp.o
Scanning dependencies of target bc6h
[ 25%] Building CXX object src/bc6h/CMakeFiles/bc6h.dir/zoh_utils.cpp.o
[ 27%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode2.cpp.o
[ 28%] Building CXX object src/bc6h/CMakeFiles/bc6h.dir/zoh.cpp.o
[ 29%] Building CXX object src/bc6h/CMakeFiles/bc6h.dir/zohone.cpp.o
[ 31%] Building CXX object src/bc6h/CMakeFiles/bc6h.dir/zohtwo.cpp.o
[ 32%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode3.cpp.o
[ 33%] Linking CXX static library libbc6h.a
[ 33%] Built target bc6h
[ 35%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode4.cpp.o
Scanning dependencies of target nvthread
[ 36%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/nvthread.cpp.o
[ 37%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/Event.cpp.o
[ 38%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/Mutex.cpp.o
[ 40%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/ParallelFor.cpp.o
[ 41%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/Thread.cpp.o
[ 42%] Building CXX object src/nvthread/CMakeFiles/nvthread.dir/ThreadPool.cpp.o
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvthread/ThreadPool.cpp:123:38: warning: cast to 'void *' from smaller integer type 'uint'
      (aka 'unsigned int') [-Wint-to-void-pointer-cast]
        workers[i].start(workerFunc, (void *)i);
                                     ^
1 warning generated.
[ 44%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode5.cpp.o
[ 45%] Linking CXX static library libnvthread.a
[ 45%] Built target nvthread
[ 46%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode6.cpp.o
Scanning dependencies of target nvmath
[ 48%] Building CXX object src/nvmath/CMakeFiles/nvmath.dir/Fitting.cpp.o
[ 49%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_mode7.cpp.o
[ 50%] Building CXX object src/nvmath/CMakeFiles/nvmath.dir/Gamma.cpp.o
[ 51%] Building CXX object src/nvmath/CMakeFiles/nvmath.dir/Half.cpp.o
[ 53%] Building CXX object src/nvmath/CMakeFiles/nvmath.dir/Plane.cpp.o
[ 54%] Building CXX object src/bc7/CMakeFiles/bc7.dir/avpcl_utils.cpp.o
[ 55%] Building CXX object src/nvmath/CMakeFiles/nvmath.dir/SphericalHarmonic.cpp.o
[ 57%] Linking CXX static library libbc7.a
[ 57%] Built target bc7
[ 58%] Linking CXX static library libnvmath.a
[ 58%] Built target nvmath
Scanning dependencies of target nvimage
[ 61%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ColorBlock.cpp.o
[ 61%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/BlockDXT.cpp.o
[ 62%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/DirectDrawSurface.cpp.o
[ 63%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ErrorMetric.cpp.o
[ 64%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/Filter.cpp.o
[ 66%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/FloatImage.cpp.o
[ 67%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/Image.cpp.o
[ 68%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/ImageIO.cpp.o
[ 70%] Building CXX object src/nvimage/CMakeFiles/nvimage.dir/NormalMap.cpp.o
[ 71%] Linking CXX static library libnvimage.a
[ 71%] Built target nvimage
Scanning dependencies of target nvtt
[ 74%] Building CXX object src/nvtt/CMakeFiles/nvtt.dir/nvtt.cpp.o
[ 74%] Building CXX object src/nvtt/CMakeFiles/nvtt.dir/nvtt_wrapper.cpp.o
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/nvtt.cpp:34:12: warning: enumeration value 'Error_Count' not handled in switch
      [-Wswitch]
    switch(e)
           ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/nvtt.cpp:34:12: note: add missing switch cases
    switch(e)
           ^
1 warning generated.
[ 75%] Building CXX object src/nvtt/CMakeFiles/nvtt.dir/ClusterFit.cpp.o
[ 76%] Building CXX object src/nvtt/CMakeFiles/nvtt.dir/BlockCompressor.cpp.o
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/BlockCompressor.cpp:27:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/TaskDispatcher.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/dispatch/dispatch.h:36:45: error: expected value in expression
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
                                            ^
[ 77%] Building CXX object src/nvtt/CMakeFiles/nvtt.dir/CompressorDX9.cpp.o
1 error generated.
make[3]: *** [src/nvtt/CMakeFiles/nvtt.dir/BlockCompressor.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/CompressorDX9.cpp:35:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.h:30:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/maths.h:35:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:46:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:49:5: warning: macro expansion producing 'defined' has undefined
      behavior [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/CompressorDX9.cpp:35:
In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/colourset.h:31:
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/simd.h:37:5: warning: macro expansion producing 'defined' has undefined behavior
      [-Wexpansion-to-defined]
#if SQUISH_USE_ALTIVEC
    ^
/Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/squish/config.h:31:29: note: expanded from macro 'SQUISH_USE_ALTIVEC'
#       define SQUISH_USE_ALTIVEC defined(__VEC__)
                                  ^
3 warnings generated.
make[2]: *** [src/nvtt/CMakeFiles/nvtt.dir/all] Error 2
make[1]: *** [src/nvtt/CMakeFiles/nvtt.dir/rule] Error 2
make: *** [nvtt] Error 2
ERROR: NVTT build failed
Itms added a comment.Jan 7 2020, 12:28 PM

Also, I was expecting the script to track the version of lib it built instead of boolean. Seems simple to implement, will consider that later.

Ideally we would do the same as for SpiderMonkey (see libraries/source/spidermonkey/build.sh):

if [ -e .already-built -a .already-built -nt README.txt ]

so that changes to the README trigger a rebuild. However, this is bypassed (including for SM) by build-osx-libs.sh. There is a big discrepancy between macOS and other unixes with respect to the process followed to build bundled libs.

With that file removed and re-ran it now fails in actual compilation.

In file included from /Users/krinkle/Development/0ad-git/libraries/source/nvtt/src/src/nvtt/TaskDispatcher.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/dispatch/dispatch.h:36:45: error: expected value in expression
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
                                            ^

Hot damn. I haven't included https://github.com/castano/nvidia-texture-tools/pull/270 when committing. I probably botched a rebase... And the Mac slave runs with the earliest supported version of OSX which doesn't need this fix. I'll make a patch, thanks for the report.