[mythtv] android compile problems

David Hampton mythtv at love2code.net
Mon Jun 8 16:42:29 UTC 2020


On Mon, 2020-06-08 at 12:07 -0400, Peter Bennett wrote:
> Hi David
> 
> Compiling fixes/31 for android 64 bit I am getting the following
> errors
> 
> imagemetadata.cpp:281:19: error: no type named 'AutoPtr' in
> 'Exiv2::Image'
>      Exiv2::Image::AutoPtr m_image;
>      ~~~~~~~~~~~~~~^
> 
> I see you added the following comment:
> 
> // Clang8 warns that 'AutoPtr' is deprecated. It was apparently
> // deprecated in glibc-2.27, and the exiv2 library hasn't been
> // updated yet.
> Exiv2::Image::AutoPtr m_image;
> 
> Perhaps the exiv2 library has now been updated? Do you know more
> about what is going on here?

Hi Peter,

The MythTV master branch was updated to use an embedded copy of exiv2
git on March 15th (commit 2807de0a74) so that using a c++17 compiler
would work.  C++17 dropped the AutoPtr type.   Android was also updated
on Mar 23 (commit f3c1cd0408) to build exiv2 from git so that it could
build using c++17 and master.

What you're running into appears to be trying to compile fixes/31,
which expects the old pre-c++17 exiv2-0.25 library, using the newer
c++17 clean exiv2-git library.

> The other error is
> 
> imagemetadata.cpp:704:10: error: cannot initialize return object of
> type 
> 'ImageMetaData *' with an rvalue of type 'PictureMetaData *'
> { return new PictureMetaData(filePath); }
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Perhaps this needs to be changed to some sort of <cast> syntax. Old 
> style cast no longer working? Don't know why this errors for android
> but not for linux.

This is probably a side effect of the first problem.  The
PictureMetaData object contains an Exiv2::Image::AutoPtr, which doesn't
exist when compiling against the git version of exiv2.

David
 



More information about the mythtv-dev mailing list