On Thu, Dec 27, 2018 at 10:28:56PM +0100, Matthias Kilian wrote:
> Hi,
>=20
> let gdcm build with poppler-0.72.0.
>=20
> Build and runtime tests both against the old (0.61.1) and new
> (0.72.2) poppler are welcome.
>=20
> If it still builds and works with the old poppler, this could be
> committed before the poppler update.

Fails to build with old poppler (0.61.1) on amd64:


[98/409] /hack/objdirs/pobj/gdcm-2.8.8/bin/c++   -ISource/Common -I/hack/ob=
jdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Source/Common -I/hack/objdirs/pobj/gdcm-2.=
8.8/gdcm-2.8.8/Source/DataStructureAndEncodingDefinition -I/hack/objdirs/po=
bj/gdcm-2.8.8/gdcm-2.8.8/Source/MediaStorageAndFileFormat -I/hack/objdirs/p=
obj/gdcm-2.8.8/gdcm-2.8.8/Source/InformationObjectDefinition -I/hack/objdir=
s/pobj/gdcm-2.8.8/gdcm-2.8.8/Source/MessageExchangeDefinition -I/hack/objdi=
rs/pobj/gdcm-2.8.8/gdcm-2.8.8/Source/DataDictionary -I/hack/objdirs/pobj/gd=
cm-2.8.8/gdcm-2.8.8/Utilities -I/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Ut=
ilities/socketxx -I/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Utilities/socke=
txx/socket++ -IUtilities/socketxx/socket++ -I/usr/local/include -I/usr/loca=
l/include/poppler -I/usr/local/include/libxml2 -I/usr/local/include/openjp2=
 -O2 -pipe  -std=3Dc++11 -DNDEBUG   -DLIBPOPPLER_GLOBALPARAMS_CSTOR_HAS_PAR=
AM -DLIBPOPPLER_CATALOG_HAS_STRUCTTREEROOT -DLIBPOPPLER_NEW_OBJECT_API -MD =
-MT Applications/Cxx/CMakeFiles/gdcmpdf.dir/gdcmpdf.cxx.o -MF Applications/=
Cxx/CMakeFiles/gdcmpdf.dir/gdcmpdf.cxx.o.d -o Applications/Cxx/CMakeFiles/g=
dcmpdf.dir/gdcmpdf.cxx.o -c /hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Applic=
ations/Cxx/gdcmpdf.cxx
FAILED: Applications/Cxx/CMakeFiles/gdcmpdf.dir/gdcmpdf.cxx.o=20
/hack/objdirs/pobj/gdcm-2.8.8/bin/c++   -ISource/Common -I/hack/objdirs/pob=
j/gdcm-2.8.8/gdcm-2.8.8/Source/Common -I/hack/objdirs/pobj/gdcm-2.8.8/gdcm-=
2.8.8/Source/DataStructureAndEncodingDefinition -I/hack/objdirs/pobj/gdcm-2=
=2E8.8/gdcm-2.8.8/Source/MediaStorageAndFileFormat -I/hack/objdirs/pobj/gdc=
m-2.8.8/gdcm-2.8.8/Source/InformationObjectDefinition -I/hack/objdirs/pobj/=
gdcm-2.8.8/gdcm-2.8.8/Source/MessageExchangeDefinition -I/hack/objdirs/pobj=
/gdcm-2.8.8/gdcm-2.8.8/Source/DataDictionary -I/hack/objdirs/pobj/gdcm-2.8.=
8/gdcm-2.8.8/Utilities -I/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Utilities=
/socketxx -I/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Utilities/socketxx/soc=
ket++ -IUtilities/socketxx/socket++ -I/usr/local/include -I/usr/local/inclu=
de/poppler -I/usr/local/include/libxml2 -I/usr/local/include/openjp2 -O2 -p=
ipe  -std=3Dc++11 -DNDEBUG   -DLIBPOPPLER_GLOBALPARAMS_CSTOR_HAS_PARAM -DLI=
BPOPPLER_CATALOG_HAS_STRUCTTREEROOT -DLIBPOPPLER_NEW_OBJECT_API -MD -MT App=
lications/Cxx/CMakeFiles/gdcmpdf.dir/gdcmpdf.cxx.o -MF Applications/Cxx/CMa=
keFiles/gdcmpdf.dir/gdcmpdf.cxx.o.d -o Applications/Cxx/CMakeFiles/gdcmpdf.=
dir/gdcmpdf.cxx.o -c /hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Applications/=
Cxx/gdcmpdf.cxx
/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Applications/Cxx/gdcmpdf.cxx:53:13=
: error: no member named 'c_str' in 'GooString'
    s =3D gs->c_str();
        ~~  ^
/hack/objdirs/pobj/gdcm-2.8.8/gdcm-2.8.8/Applications/Cxx/gdcmpdf.cxx:453:1=
4: warning: bool literal returned from 'main' [-Wmain]
  if( !res ) return false;
             ^      ~~~~~
1 warning and 1 error generated.
ninja: build stopped: subcommand failed.





> Index: patches/patch-Applications_Cxx_gdcminfo_cxx
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: patches/patch-Applications_Cxx_gdcminfo_cxx
> diff -N patches/patch-Applications_Cxx_gdcminfo_cxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-Applications_Cxx_gdcminfo_cxx       27 Dec 2018 21:23:01 
> -0000
> @@ -0,0 +1,40 @@
> +$OpenBSD$
> +
> +Fix for newer poppler.
> +
> +Index: Applications/Cxx/gdcminfo.cxx
> +--- Applications/Cxx/gdcminfo.cxx.orig
> ++++ Applications/Cxx/gdcminfo.cxx
> +@@ -202,7 +202,7 @@ static std::string getInfoDate(Dict *infoDict, const=
 c
> + #endif
> +     {
> +     const GooString* gs =3D obj.getString();
> +-    s =3D gs->getCString();
> ++    s =3D gs->c_str();
> +     if (s[0] =3D=3D 'D' && s[1] =3D=3D ':')
> +       {
> +       s +=3D 2;
> +@@ -258,7 +258,7 @@ static std::string getInfoString(Dict *infoDict, con=
st
> + {
> +   Object obj;
> +   const GooString *s1;
> +-  GBool isUnicode;
> ++  bool isUnicode;
> +   Unicode u;
> +   char buf[8];
> +   int i, n;
> +@@ -274,12 +274,12 @@ static std::string getInfoString(Dict *infoDict, c=
onst
> +     if ((s1->getChar(0) & 0xff) =3D=3D 0xfe &&
> +       (s1->getChar(1) & 0xff) =3D=3D 0xff)
> +       {
> +-      isUnicode =3D gTrue;
> ++      isUnicode =3D true;
> +       i =3D 2;
> +       }
> +     else
> +       {
> +-      isUnicode =3D gFalse;
> ++      isUnicode =3D false;
> +       i =3D 0;
> +       }
> +     while (i < obj.getString()->getLength())
> Index: patches/patch-Applications_Cxx_gdcmpdf_cxx
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: patches/patch-Applications_Cxx_gdcmpdf_cxx
> diff -N patches/patch-Applications_Cxx_gdcmpdf_cxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-Applications_Cxx_gdcmpdf_cxx        27 Dec 2018 21:23:01 
> -0000
> @@ -0,0 +1,54 @@
> +$OpenBSD$
> +
> +Fix for newer poppler.
> +
> +Index: Applications/Cxx/gdcmpdf.cxx
> +--- Applications/Cxx/gdcmpdf.cxx.orig
> ++++ Applications/Cxx/gdcmpdf.cxx
> +@@ -50,7 +50,7 @@ static std::string getInfoDate(Dict *infoDict, const c
> + #endif
> +     {
> +     const GooString* gs =3D obj.getString();
> +-    s =3D gs->getCString();
> ++    s =3D gs->c_str();
> +     if (s[0] =3D=3D 'D' && s[1] =3D=3D ':')
> +       {
> +       s +=3D 2;
> +@@ -102,11 +102,11 @@ static std::string getInfoDate(Dict *infoDict, con=
st c
> +   return out;
> + }
> +=20
> +-static std::string getInfoString(Dict *infoDict, const char *key, Unico=
deMap *uMap, GBool & unicode)
> ++static std::string getInfoString(Dict *infoDict, const char *key, Unico=
deMap *uMap, bool & unicode)
> + {
> +   Object obj;
> +   const GooString *s1;
> +-  GBool isUnicode =3D gFalse;
> ++  bool isUnicode =3D false;
> +   Unicode u;
> +   char buf[8];
> +   int i, n;
> +@@ -122,12 +122,12 @@ static std::string getInfoString(Dict *infoDict, c=
onst
> +     if ((s1->getChar(0) & 0xff) =3D=3D 0xfe &&
> +       (s1->getChar(1) & 0xff) =3D=3D 0xff)
> +       {
> +-      isUnicode =3D gTrue;
> ++      isUnicode =3D true;
> +       i =3D 2;
> +       }
> +     else
> +       {
> +-      isUnicode =3D gFalse;
> ++      isUnicode =3D false;
> +       i =3D 0;
> +       }
> +     while (i < obj.getString()->getLength())
> +@@ -398,7 +398,7 @@ http://msdn.microsoft.com/en-us/library/078sfkak(VS.=
80
> +   std::string creationdate;
> +   std::string moddate;
> +=20
> +-  GBool isUnicode =3D gFalse;
> ++  bool isUnicode =3D false;
> +   if (doc->isOk())
> +     {
> + #ifdef LIBPOPPLER_NEW_OBJECT_API
>=20

--=20
Antoine

Reply via email to