libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

classic Classic list List threaded Threaded
6 messages Options
John Frankish-2 John Frankish-2
Reply | Threaded
Open this post in threaded view
|

libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

Using linux gcc-7.2.0, Libreoffice-6.0.1.1 will compile without errors without the configure switch "--with-systemgpgmepp".

With "--with-system-gpgmepp:


1. configure/make looks for headers in include rather than include/gpgme++

2. make fails with:

[CXX] xmlsecurity/source/gpg/CertificateImpl.cxx
[CXX] xmlsecurity/source/gpg/CipherContext.cxx
In file included from /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:12:0:
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:36:5: error: 'GpgME' does not name a type
     GpgME::Key m_pKey;
     ^~~~~
In file included from /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:12:0:
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:85:25: error: 'GpgME' has not been declared
     void setCertificate(GpgME::Context* ctx, const GpgME::Key& key);
                         ^~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:85:39: error: expected ',' or '...' before '*' token
     void setCertificate(GpgME::Context* ctx, const GpgME::Key& key);
                                       ^
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:86:11: error: 'GpgME' does not name a type
     const GpgME::Key* getCertificate() const;
           ^~~~~
[CXX] xmlsecurity/source/gpg/DigestContext.cxx
[CXX] xmlsecurity/source/gpg/SecurityEnvironment.cxx
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In constructor 'CertificateImpl::CertificateImpl()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:30:5: error: class 'CertificateImpl' does not have any field named 'm_pKey'
     m_pKey()
     ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual rtl::OUString CertificateImpl::getIssuerName()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:53:34: error: 'm_pKey' was not declared in this scope
     const GpgME::UserID userId = m_pKey.userID(0);
                                  ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:53:34: note: suggested alternative: 'ecKey'
     const GpgME::UserID userId = m_pKey.userID(0);
                                  ^~~~~~
                                  ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual com::sun::star::util::DateTime CertificateImpl::getNotValidBefore()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:83:34: error: 'm_pKey' was not declared in this scope
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:83:34: note: suggested alternative: 'ecKey'
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
                                  ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual com::sun::star::util::DateTime CertificateImpl::getNotValidAfter()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:92:34: error: 'm_pKey' was not declared in this scope
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:92:34: note: suggested alternative: 'ecKey'
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
                                  ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual rtl::OUString CertificateImpl::getSubjectPublicKeyAlgorithm()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:131:34: error: 'm_pKey' was not declared in this scope
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:131:34: note: suggested alternative: 'ecKey'
     const GpgME::Subkey subkey = m_pKey.subkey(0);
                                  ^~~~~~
                                  ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual rtl::OUString CertificateImpl::getSignatureAlgorithm()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:145:34: error: 'm_pKey' was not declared in this scope
     const GpgME::UserID userId = m_pKey.userID(0);
                                  ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:145:34: note: suggested alternative: 'ecKey'
     const GpgME::UserID userId = m_pKey.userID(0);
                                  ^~~~~~
                                  ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual com::sun::star::uno::Sequence<signed char> CertificateImpl::getSHA1Thumbprint()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:159:25: error: 'm_pKey' was not declared in this scope
     const char* keyId = m_pKey.primaryFingerprint();
                         ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:159:25: note: suggested alternative: 'ecKey'
     const char* keyId = m_pKey.primaryFingerprint();
                         ^~~~~~
                         ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual com::sun::star::uno::Sequence<signed char> CertificateImpl::getSHA256Thumbprint()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:168:25: error: 'm_pKey' was not declared in this scope
     const char* keyId = m_pKey.primaryFingerprint();
                         ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:168:25: note: suggested alternative: 'ecKey'
     const char* keyId = m_pKey.primaryFingerprint();
                         ^~~~~~
                         ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: In member function 'virtual com::sun::star::uno::Sequence<signed char> CertificateImpl::getMD5Thumbprint()':
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:176:25: error: 'm_pKey' was not declared in this scope
     const char* keyId = m_pKey.keyID();
                         ^~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:176:25: note: suggested alternative: 'ecKey'
     const char* keyId = m_pKey.keyID();
                         ^~~~~~
                         ecKey
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx: At global scope:
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:211:6: error: prototype for 'void CertificateImpl::setCertificate(GpgME::Context*, const GpgME::Key&)' does not match any in class 'CertificateImpl'
 void CertificateImpl::setCertificate(GpgME::Context* ctx, const GpgME::Key& key)
      ^~~~~~~~~~~~~~~
In file included from /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:12:0:
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:85:10: error: candidate is: void CertificateImpl::setCertificate(int)
     void setCertificate(GpgME::Context* ctx, const GpgME::Key& key);
          ^~~~~~~~~~~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:244:53: error: no 'const GpgME::Key* CertificateImpl::getCertificate() const' member function declared in class 'CertificateImpl'
 const GpgME::Key* CertificateImpl::getCertificate() const
                                                     ^~~~~
/mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:67:14: warning: 'com::sun::star::util::DateTime {anonymous}::convertUnixTimeToDateTime(time_t)' defined but not used [-Wunused-function]
     DateTime convertUnixTimeToDateTime(time_t time)
              ^~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/mnt/sdc8/usr/src/libreoffice-6.0.1.1/solenv/gbuild/LinkTarget.mk:293: /mnt/sdc8/usr/src/libreoffice-6.0.1.1/workdir/CxxObject/xmlsecurity/source/gpg/CertificateImpl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:268: build] Error 2
Command exited with non-zero status 2
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Rene Engelhard Rene Engelhard
Reply | Threaded
Open this post in threaded view
|

Re: libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

On Fri, Feb 16, 2018 at 05:43:54AM +0000, John Frankish wrote:
> Using linux gcc-7.2.0, Libreoffice-6.0.1.1 will compile without errors without the configure switch "--with-systemgpgmepp".
>
> With "--with-system-gpgmepp:

I also use that option (Debian):

Builds fine here. with 1.8.0 and 1.10 and also built fine when Debian
had 1.9.0

With both gcc 6.3 and 7.3 (and also back then with 7.2.x)

Regards,

Rene
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Thorsten Behrens-6 Thorsten Behrens-6
Reply | Threaded
Open this post in threaded view
|

Re: libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

In reply to this post by John Frankish-2
Hi John,

John Frankish wrote:
> 1. configure/make looks for headers in include rather than include/gpgme++
>
Distros put things into different places I guess - can you fix
configure.ac and submit a patch?

> 2. make fails with:
>
> [CXX] xmlsecurity/source/gpg/CertificateImpl.cxx
> [CXX] xmlsecurity/source/gpg/CipherContext.cxx
> In file included from /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:12:0:
> /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:36:5: error: 'GpgME' does not name a type
>      GpgME::Key m_pKey;
>      ^~~~~
>
Is that after you've fixed the path lookup? I would expect it to fail
earlier, while trying to include gpgme.h.

Cheers,

-- Thorsten

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (968 bytes) Download Attachment
John Frankish-2 John Frankish-2
Reply | Threaded
Open this post in threaded view
|

RE: libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

> > 1. configure/make looks for headers in include rather than
> > include/gpgme++
> >
>
> Distros put things into different places I guess - can you fix configure.ac and submit a patch?
>
The problem is with:

AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],

It needs to check in /usr/include/gpgme++ and /usr/local/include/gpgme++

> > 2. make fails with:
> >
> > [CXX] xmlsecurity/source/gpg/CertificateImpl.cxx
> > [CXX] xmlsecurity/source/gpg/CipherContext.cxx
> > In file included from /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.cxx:12:0:
> > /mnt/sdc8/usr/src/libreoffice-6.0.1.1/xmlsecurity/source/gpg/CertificateImpl.hxx:36:5: error:
> > 'GpgME' does > not name a type
> >      GpgME::Key m_pKey;
> >      ^~~~~
> >
> Is that after you've fixed the path lookup? I would expect it to fail earlier, while trying to include gpgme.h.
>
In fact after adding "-D_GLIBCXX_USE_C99_MATH" (I'm using glibc-2.26) and adjusting this in configure:

if test "$gccvisbroken" = "yes"; then
        as_fn_error $? "Your gcc is not -fvisibility=hidden safe. This is no longer supported." "$LINENO" 5

..to read "no", the build then succeeds.

John
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Thorsten Behrens-6 Thorsten Behrens-6
Reply | Threaded
Open this post in threaded view
|

Re: libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

John Frankish wrote:
> The problem is with:
>
> AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
>
Ah right, I guess the GPGMEPP_CFLAGS=... part there is entirely
redundant. Should work fine w/o.

If you have libs at non-standard places, please set CFLAGS/CPPFLAGS
accordingly.

> if test "$gccvisbroken" = "yes"; then
>         as_fn_error $? "Your gcc is not -fvisibility=hidden safe. This is no longer supported." "$LINENO" 5
>
> ..to read "no", the build then succeeds.
>
You should never need to hack configure (instead of
configure.ac). Still not sure what the fundamental problem really is
there.

Cheers,

-- Thorsten

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (968 bytes) Download Attachment
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: libreoffice-6.0.1.1 fails to compile with system gpgme-1.9.0

On 18.02.2018 21:37, Thorsten Behrens wrote:
> John Frankish wrote:
>> The problem is with:
>>
>> AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
>>
> Ah right, I guess the GPGMEPP_CFLAGS=... part there is entirely
> redundant. Should work fine w/o.

Note that we include gpgme++ include files without the leading
"gpgme++/" (e.g.

> #if HAVE_FEATURE_GPGME
> # include <gpgme.h>
> # include <context.h>
> # include <encryptionresult.h>
> # include <key.h>
> # include <data.h>
> #endif

in comphelper/source/misc/storagehelper.cxx), presumably because
external/gpgmepp/ExternalProject_gpgmepp.mk in its current form doesn't
provide those gpgme++ include files in a gpgme++ directory.

So setting GPGMEPP_CFLAGS for the --with-system-gpgmepp /is/ necessary
with the current setup, it just does not work to arbitrarily guess that
the gpgme++ directory is in /usr/include merely because the compiler is
able to include gpgme++/gpgmepp_version.h from one of its system locations.

Probably best to make external/gpgmepp/ExternalProject_gpgmepp.mk run
`make install` to somewhere, and use proper includes with "gpgme++/"
prefix across our code.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice