View Issue Details

IDProjectCategoryView StatusLast Update
0007889libextractorpluginspublic2023-12-02 13:46
Reporterwiz Assigned ToChristian Grothoff  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.11 
Target Version1.12Fixed in Version1.12 
Summary0007889: exiv2 0.28 breaks exiv2_extractor.cc
DescriptionThe exiv2 project has changed the API in the 0.28 release, breaking the exiv2 plugin.

I noticed it in libextractor 1.11, but I tried building libextractor git head to confirm the problem is still there and see:

```
libtool: link: ( cd ".libs" && rm -f "libextractor_archive.la" && ln -s "../libextractor_archive.la" "libextractor_archive.la" )
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -I../../src/common -I/usr/pkg/include -g -O2 -MT exiv2_extractor.lo -MD -MP -MF .deps/exiv2_extractor.Tpo -c -o exiv2_extractor.lo exiv2_extractor.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -I../../src/common -I/usr/pkg/include -g -O2 -MT exiv2_extractor.lo -MD -MP -MF .deps/exiv2_extractor.Tpo -c exiv2_extractor.cc -fPIC -DPIC -o .libs/exiv2_extractor.o
exiv2_extractor.cc:233:25: error: 'AutoPtr' in 'class Exiv2::BasicIo' does not name a type
  233 | virtual Exiv2::BasicIo::AutoPtr temporary () const;
      | ^~~~~~~
exiv2_extractor.cc:129:14: error: conflicting return type specified for 'virtual long int ExtractorIO::write(Exiv2::BasicIo&)'
  129 | virtual long write (Exiv2::BasicIo &src);
      | ^~~~~
In file included from /usr/pkg/include/exiv2/exiv2.hpp:8,
                 from exiv2_extractor.cc:30:
/usr/pkg/include/exiv2/basicio.hpp:92:18: note: overridden function is 'virtual size_t Exiv2::BasicIo::write(Exiv2::BasicIo&)'
   92 | virtual size_t write(BasicIo& src) = 0;
      | ^~~~~
exiv2_extractor.cc:175:18: error: conflicting return type specified for 'virtual long int ExtractorIO::tell() const'
  175 | virtual long int tell (void) const;
      | ^~~~
In file included from /usr/pkg/include/exiv2/exiv2.hpp:8,
                 from exiv2_extractor.cc:30:
/usr/pkg/include/exiv2/basicio.hpp:203:32: note: overridden function is 'virtual size_t Exiv2::BasicIo::tell() const'
  203 | [[nodiscard]] virtual size_t tell() const = 0;
      | ^~~~
exiv2_extractor.cc:216:21: error: conflicting return type specified for 'virtual std::string ExtractorIO::path() const'
  216 | virtual std::string path () const;
      | ^~~~
In file included from /usr/pkg/include/exiv2/exiv2.hpp:8,
                 from exiv2_extractor.cc:30:
/usr/pkg/include/exiv2/basicio.hpp:221:44: note: overridden function is 'virtual const string& Exiv2::BasicIo::path() const'
  221 | [[nodiscard]] virtual const std::string& path() const noexcept = 0;
      | ^~~~
exiv2_extractor.cc: In member function 'virtual int ExtractorIO::getb()':
exiv2_extractor.cc:323:18: error: 'BasicError' is not a member of 'Exiv2'; did you mean 'strError'?
  323 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~~~~~~~
      | strError
exiv2_extractor.cc:323:29: error: expected primary-expression before 'char'
  323 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~
exiv2_extractor.cc: In member function 'virtual void ExtractorIO::transfer(Exiv2::BasicIo&)':
exiv2_extractor.cc:382:16: error: 'BasicError' is not a member of 'Exiv2'; did you mean 'strError'?
  382 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~~~~~~~
      | strError
exiv2_extractor.cc:382:27: error: expected primary-expression before 'char'
  382 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~
exiv2_extractor.cc: In member function 'virtual Exiv2::byte* ExtractorIO::mmap(bool)':
exiv2_extractor.cc:431:16: error: 'BasicError' is not a member of 'Exiv2'; did you mean 'strError'?
  431 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~~~~~~~
      | strError
exiv2_extractor.cc:431:27: error: expected primary-expression before 'char'
  431 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~
exiv2_extractor.cc:435:1: warning: no return statement in function returning non-void [-Wreturn-type]
  435 | }
      | ^
exiv2_extractor.cc: In member function 'virtual std::string ExtractorIO::path() const':
exiv2_extractor.cc:523:16: error: 'BasicError' is not a member of 'Exiv2'; did you mean 'strError'?
  523 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~~~~~~~
      | strError
exiv2_extractor.cc:523:27: error: expected primary-expression before 'char'
  523 | throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
      | ^~~~
exiv2_extractor.cc:527:1: warning: no return statement in function returning non-void [-Wreturn-type]
  527 | }
      | ^
exiv2_extractor.cc: At global scope:
exiv2_extractor.cc:555:17: error: 'AutoPtr' in 'class Exiv2::BasicIo' does not name a type
  555 | Exiv2::BasicIo::AutoPtr
      | ^~~~~~~
exiv2_extractor.cc: In function 'void EXTRACTOR_exiv2_extract_method(EXTRACTOR_ExtractContext*)':
exiv2_extractor.cc:740:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
  740 | std::auto_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
      | ^~~~~~~~
In file included from /usr/include/g++/bits/locale_conv.h:41,
                 from /usr/include/g++/locale:43,
                 from /usr/include/g++/iomanip:43,
                 from exiv2_extractor.cc:26:
/usr/include/g++/bits/unique_ptr.h:57:28: note: declared here
   57 | template<typename> class auto_ptr;
      | ^~~~~~~~
exiv2_extractor.cc:740:59: error: invalid new-expression of abstract class type 'ExtractorIO'
  740 | std::auto_ptr<Exiv2::BasicIo> eio (new ExtractorIO (ec));
      | ^
exiv2_extractor.cc:42:7: note: because the following virtual functions are pure within 'ExtractorIO':
   42 | class ExtractorIO : public Exiv2::BasicIo
      | ^~~~~~~~~~~
In file included from /usr/pkg/include/exiv2/exiv2.hpp:8,
                 from exiv2_extractor.cc:30:
/usr/pkg/include/exiv2/basicio.hpp:82:18: note: 'virtual size_t Exiv2::BasicIo::write(const byte*, size_t)'
   82 | virtual size_t write(const byte* data, size_t wcount) = 0;
      | ^~~~~
/usr/pkg/include/exiv2/basicio.hpp:111:19: note: 'virtual Exiv2::DataBuf Exiv2::BasicIo::read(size_t)'
  111 | virtual DataBuf read(size_t rcount) = 0;
      | ^~~~
/usr/pkg/include/exiv2/basicio.hpp:124:18: note: 'virtual size_t Exiv2::BasicIo::read(Exiv2::byte*, size_t)'
  124 | virtual size_t read(byte* buf, size_t rcount) = 0;
      | ^~~~
/usr/pkg/include/exiv2/basicio.hpp:230:16: note: 'virtual void Exiv2::BasicIo::populateFakeData()'
  230 | virtual void populateFakeData() = 0;
      | ^~~~~~~~~~~~~~~~
exiv2_extractor.cc:741:19: error: 'AutoPtr' is not a member of 'Exiv2::Image'
  741 | Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open (eio);
      | ^~~~~~~
exiv2_extractor.cc:742:14: error: 'image' was not declared in this scope
  742 | if (0 == image.get ())
      | ^~~~~
exiv2_extractor.cc:744:5: error: 'image' was not declared in this scope
  744 | image->readMetadata ();
      | ^~~~~
exiv2_extractor.cc:825:31: error: expected unqualified-id before '&' token
  825 | catch (const Exiv2::AnyError& e)
      | ^
exiv2_extractor.cc:825:31: error: expected ')' before '&' token
  825 | catch (const Exiv2::AnyError& e)
      | ~ ^
      | )
exiv2_extractor.cc:825:31: error: expected '{' before '&' token
exiv2_extractor.cc:825:33: error: 'e' was not declared in this scope; did you mean 'ec'?
  825 | catch (const Exiv2::AnyError& e)
      | ^
      | ec
exiv2_extractor.cc:831:3: error: expected primary-expression before 'catch'
  831 | catch (void *anything)
      | ^~~~~

```
Steps To ReproduceBuild libextractor from git against exiv2 0.28.0
TagsNo tags attached.

Activities

wiz

2023-07-19 09:34

reporter   ~0020358

The Arch project has a patch for libextractor 1.11 here:
https://gitlab.archlinux.org/archlinux/packaging/packages/libextractor/-/blob/main/exiv2-0.28.patch
Additionally, libexiv2 now needs C++11.

anonymous

2023-09-03 00:54

viewer   ~0020472

Fix committed to master branch.

Christian Grothoff

2023-09-03 00:54

manager   ~0020473

Thanks for pointing me to the patch, applied to Git master now.

Related Changesets

libextractor: master 7a6166a6

1970-01-01 02:00


Details Diff
fix 0007889 using patch form Arch as suggested by reporter Affected Issues
0007889
mod - src/plugins/exiv2_extractor.cc Diff File

Issue History

Date Modified Username Field Change
2023-07-19 09:29 wiz New Issue
2023-07-19 09:34 wiz Note Added: 0020358
2023-09-03 00:54 Changeset attached => libextractor master 7a6166a6
2023-09-03 00:54 anonymous Note Added: 0020472
2023-09-03 00:54 Christian Grothoff Note Added: 0020473
2023-09-03 00:54 Christian Grothoff Assigned To => Christian Grothoff
2023-09-03 00:54 Christian Grothoff Status new => resolved
2023-09-03 00:54 Christian Grothoff Resolution open => fixed
2023-09-03 00:54 Christian Grothoff Fixed in Version => 1.12
2023-09-03 00:55 Christian Grothoff Target Version => 1.12
2023-12-02 13:46 Christian Grothoff Status resolved => closed