Kodi Community Forum

Full Version: make fails @ "error: ‘kSourceBGRA’ is not a member of ‘squish’"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm building 15rc1/git in a cross-compile env for RPi1 on linux/64

With this pull
Code:
    git log | head
        commit bef571385713c0269616553a448548c7d0a0af3f
        Merge: e2866ae 3a42b74
        Author: Martijn Kaijser <[email protected]>
        Date:   Sun Jun 28 23:27:21 2015 +0200

            Merge pull request #7362 from MartijnKaijser/pvr_isengard
            
            [pvr] bump add-ons to their Isengard branch

        commit 3a42b74b10727e397c03ad1626a02e0239365a5c

I've had to add libsquish to even get configure to complete. Added blindly, as I'm not completely clear on whether it is, or isn't, a new/hard dependency; seems to be some discussion re: "texturepacker" which seems to be related, but I'm still trying to figure that out.

Configuring as
Code:
    SQUISH_CFLAGS="-I/usr/local/include" \
    SQUISH_LIBS="=L/usr/local/lib -lsquish" \
    FFMPEG_OPTS="--cpu=arm1176jzf-s" \
    ./configure --with-platform=raspberry-pi \
    ...
With libsquish in place, configure's OK
Code:
    ------------------------
      Kodi Configuration:
    ------------------------
      Kodi Version: 15.0-RC1
      git Rev.:     20150628-bef5713
    ...
but make step fails @ squish
Code:
    make
        ...
        /usr/bin/ccache /usr/bin/g++-4.9 -MF DDSImage.d -MD -c -O2 -DNDEBUG=1 -O3 -pipe -D_FORTIFY_SOURCE=2 -fmessage-length=0 -fstack-protector  -march=armv6zk  -mfpu=vfp  -mfloat-abi=hard  -mtune=arm1176jzf-s  -mcpu=arm1176jzf-s -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DNDEBUG=1 -O3 -pipe -D_FORTIFY_SOURCE=2 -fmessage-length=0 -fstack-protector  -march=armv6zk  -mfpu=vfp  -mfloat-abi=hard  -mtune=arm1176jzf-s  -mcpu=arm1176jzf-s -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DNDEBUG=1 -O3 -pipe -D_FORTIFY_SOURCE=2 -fmessage-length=0 -fstack-protector  -march=armv6zk  -mfpu=vfp  -mfloat-abi=hard  -mtune=arm1176jzf-s  -mcpu=arm1176jzf-s -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -std=c++11 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI -D_FILE_DEFINED -D__STDC_CONSTANT_MACROS -DBIN_INSTALL_PATH="\"/usr/local/kodi/lib/kodi\"" -DINSTALL_PATH="\"/usr/local/kodi/share/kodi\"" -D'GIT_REV="20150628-bef5713"' -DMID -DNPT_CONFIG_ENABLE_LOGGING -DPLT_HTTP_DEFAULT_USER_AGENT="\"UPnP/1.0 DLNADOC/1.50 Kodi\"" -DPLT_HTTP_DEFAULT_SERVER="\"UPnP/1.0 DLNADOC/1.50 Kodi\"" -DHAVE_CONFIG_H  -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/alsa -I/usr/include/dbus-1.0 -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/libpng12 -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/samba-4.0 -I/usr/include/taglib -I/usr/include/yajl -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/local/include -I/usr/local/include/libcec -I/home/work/xbmc -I/home/work/xbmc/tools/depends/target/ffmpeg/ffmpeg-install/include -I/home/work/xbmc/lib -I/home/work/xbmc/xbmc -I/home/work/xbmc/addons/library.kodi.guilib -I/home/work/xbmc/addons/library.xbmc.addon -I/home/work/xbmc/addons/library.xbmc.pvr -I/home/work/xbmc/addons/library.xbmc.codec -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/alsa -I/usr/include/dbus-1.0 -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/libpng12 -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/samba-4.0 -I/usr/include/taglib -I/usr/include/yajl -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/local/include -I/usr/local/include/libcec -I/home/work/xbmc -I/home/work/xbmc/tools/depends/target/ffmpeg/ffmpeg-install/include -I/home/work/xbmc/xbmc/linux -I/home/work/xbmc/xbmc/cores/dvdplayer -I/home/work/xbmc/lib -I/home/work/xbmc/xbmc -I/home/work/xbmc/addons/library.kodi.guilib -I/home/work/xbmc/addons/library.xbmc.addon -I/home/work/xbmc/addons/library.xbmc.pvr -I/home/work/xbmc/addons/library.xbmc.codec -I/opt/vc/include -I/opt/vc/include/interface/vcos -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/alsa -I/usr/include/dbus-1.0 -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/libpng12 -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/samba-4.0 -I/usr/include/taglib -I/usr/include/yajl -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/local/include -I/usr/local/include/libcec -I/home/work/xbmc -I/home/work/xbmc/tools/depends/target/ffmpeg/ffmpeg-install/include -I/home/work/xbmc/xbmc/linux -I/home/work/xbmc/xbmc/cores/dvdplayer DDSImage.cpp -o DDSImage.o \
        && cp DDSImage.d DDSImage.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e '/^$/ d' -e 's/$/ :/' < DDSImage.d >> DDSImage.P && rm -f DDSImage.d || ( rm -f DDSImage.P DDSImage.o && exit 1 )
        DDSImage.cpp: In member function ‘bool CDDSImage::Compress(unsigned int, unsigned int, unsigned int, const unsigned char*, double)’:
        DDSImage.cpp:168:77: error: ‘kSourceBGRA’ is not a member of ‘squish’
           squish::CompressImage(brga, width, height, pitch, m_data, squish::kDxt1 | squish::kSourceBGRA);
                                                                                     ^
        DDSImage.cpp:172:3: error: ‘ComputeMSE’ is not a member of ‘squish’
           squish::ComputeMSE(brga, width, height, pitch, m_data, squish::kDxt1 | squish::kSourceBGRA, colorMSE, alphaMSE);
           ^
        DDSImage.cpp:172:74: error: ‘kSourceBGRA’ is not a member of ‘squish’
           squish::ComputeMSE(brga, width, height, pitch, m_data, squish::kDxt1 | squish::kSourceBGRA, colorMSE, alphaMSE);
                                                                                  ^
        DDSImage.cpp:191:81: error: ‘kSourceBGRA’ is not a member of ‘squish’
               squish::CompressImage(brga, width, height, pitch, m_data, squish::kDxt3 | squish::kSourceBGRA);
                                                                                         ^
        DDSImage.cpp:192:7: error: ‘ComputeMSE’ is not a member of ‘squish’
               squish::ComputeMSE(brga, width, height, pitch, m_data, squish::kDxt3 | squish::kSourceBGRA, colorMSE, alphaMSE);
               ^
        DDSImage.cpp:192:78: error: ‘kSourceBGRA’ is not a member of ‘squish’
               squish::ComputeMSE(brga, width, height, pitch, m_data, squish::kDxt3 | squish::kSourceBGRA, colorMSE, alphaMSE);
                                                                                      ^
        DDSImage.cpp:197:82: error: ‘kSourceBGRA’ is not a member of ‘squish’
                 squish::CompressImage(brga, width, height, pitch, data2, squish::kDxt5 | squish::kSourceBGRA);
                                                                                          ^
        DDSImage.cpp:198:9: error: ‘ComputeMSE’ is not a member of ‘squish’
                 squish::ComputeMSE(brga, width, height, pitch, data2, squish::kDxt5 | squish::kSourceBGRA, colorMSE, dxt5MSE);
                 ^
        DDSImage.cpp:198:79: error: ‘kSourceBGRA’ is not a member of ‘squish’
                 squish::ComputeMSE(brga, width, height, pitch, data2, squish::kDxt5 | squish::kSourceBGRA, colorMSE, dxt5MSE);
                                                                                       ^
        DDSImage.cpp: In static member function ‘static bool CDDSImage::Decompress(unsigned char*, unsigned int, unsigned int, unsigned int, const unsigned char*, unsigned int)’:
        DDSImage.cpp:227:78: error: ‘kSourceBGRA’ is not a member of ‘squish’
             squish::DecompressImage(argb, width, height, pitch, dxt, squish::kDxt1 | squish::kSourceBGRA);
                                                                                      ^
        DDSImage.cpp:229:78: error: ‘kSourceBGRA’ is not a member of ‘squish’
             squish::DecompressImage(argb, width, height, pitch, dxt, squish::kDxt3 | squish::kSourceBGRA);
                                                                                      ^
        DDSImage.cpp:231:78: error: ‘kSourceBGRA’ is not a member of ‘squish’
             squish::DecompressImage(argb, width, height, pitch, dxt, squish::kDxt5 | squish::kSourceBGRA);
                                                                                      ^
        /home/work/xbmc/Makefile.include:93: recipe for target 'DDSImage.o' failed
        make[1]: *** [DDSImage.o] Error 1
        make[1]: Leaving directory '/home/work/xbmc/xbmc/guilib'
        Makefile:470: recipe for target 'xbmc/guilib/guilib.a' failed
        make: *** [xbmc/guilib/guilib.a] Error 2

Is there additional, or changed, config needed to squash the squish-problems?
not really. squish is built by the dependency-system for cross builds. if you are trying to cross manually, it's up to you to provide it. it looks like it's picking up a system-level (/usr/local) squish - did you build this yourself and if so, from which source? you should use the one sitting in tools/depends/native/libsquish-native
Yep, built & installed myself from

http://libsquish.googlecode.com/svn/trunk

ONLY did that because without it configure fails.

I.e.,

Code:
-    SQUISH_CFLAGS="-I/usr/local/include" \
-    SQUISH_LIBS="=L/usr/local/lib -lsquish" \
    FFMPEG_OPTS="--cpu=arm1176jzf-s" \
    ./configure --with-platform=raspberry-pi \
    ...
        ...
        checking for uint64_t... yes
        checking whether byte ordering is bigendian... no
        make: Entering directory '/home/work/xbmc/tools/depends/native/libsquish-native'
        make: Nothing to be done for 'all'.
        make: Leaving directory '/home/work/xbmc/tools/depends/native/libsquish-native'
        checking for SQUISH... no
        configure: error: "squish not found"

Am I missing some step here?

In tools/depends/native/libsquish-native/src/README, I notice

"New releases are announced on the squish library homepage at http://sjbrown.co.uk/?code=squish"

But at THAT page you read

"Currently having some technical difficulties! Sorry for all the broken links, stay tuned, hopefully I can get things back again soon. The usual email at this domain should still be working. Ta, Simon (2015/1/11)"

I.e., out of commission since January.
the source is hosted in the kodi git for a reason (we need that specific version - it contains some fixes and the API keeps changing).
Ok.

So, specifically, how do I get this to configure AND build using the kodi-hosted version?
you build and install the dir i pointed you to then configure kodi.

i really think you should use the cross support all done for you in the kodi buildsystem...