All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michele Denber <1785698@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’
Date: Mon, 13 Aug 2018 18:58:16 -0000	[thread overview]
Message-ID: <5B71D4C8.7060006@gmx.com> (raw)
In-Reply-To: 153414808571.8168.1723488818633453757.malone@wampee.canonical.com

On 08-13-2018 4:14 AM, Thomas Huth wrote:
> For providing a Solaris build machine, you best get in touch with Peter
> Maydell (see MAINTAINERS file for his mail address).
I notice he already checked in later in my inbox.  I'll reply to that there.
>
> Now for your build problems, it seems like "libgcrypt-config --cflags"
> already should add /opt/csw/include to the list of header search paths,
> so I wonder why the "#include <gcrypt.h>" does not pick up that file yet
> and you had to add "#include </opt/csw/include/gcrypt.h>" instead? Is
> there maybe another gcrypt.h file somewhere else on your system which
> conflicts with the one from /opt/csw/include ?
Well this is odd but I was poking around trying to resolve a bunch of 
syntax errors in the Makefiles.  This is usually the result of a wrong 
sh being called.  I've had some luck in the past building other things 
by adding a line "!#/usr/xpg4/bin/sh" at the top of the sh file but that 
trick did not work for qemu.  So I finally took the default sh, which is 
/usr/bin/sh (which is a link to /sbin/sh) and instead linked it directly 
to /usr/xpg4/bin/sh.  That immediately took care of all the syntax 
errors and the gcrypt error too.  I don't know why qemu is picky about 
POSIX, but there you have it.
>
> Concerning the "-lutil" problem - no clue where this is coming from.
> Could you maybe try to compile with "gmake V=1" and post the line where
> the executable is linked? Maybe that gives some more indication what is
> going on here...
This will probably make you cringe, but what I ended up doing was simply 
copying some random .so file in /opt/csw/lib and calling it libutil.so.  
The linker then seemed happy and that error went away. I figure that if 
someone is actually using lutil I will get a runtime error, once I get 
it running, if I ever get it running. Then I'll be able to tell who is 
calling it and what they're trying to do.  It may be that no one is 
using it.  I saw some post on the web to the effect that lutil should 
just be commented out in Solaris.  I was unable to figure out from the 
linker error the source of lutil.

I now have a new problem: dtc/checks.c won't compile because it can't 
find strnlen.  So I put in #include <string.h>.  Still wouldn't 
compile.  So I looked in /usr/include/string.h and sure enough, strnlen 
is missing.  I'm like, what the heck?  So I ended up providing the 
source code of strnlen at the top of checks.c.  This was also a problem 
in fdt_ro.c.  It's that sort of thing.  Now it's compiling again.  I 
configured without any target options, so it's making everything.  And I 
forgot to give gmake a -j so it's taking a while.

             - Michele

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1785698

Title:
  Solaris build error: unknown type name ‘gcry_error_t’

Status in QEMU:
  New

Bug description:
  Building qemu 2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII,
  Solaris 10 Update 11, opencsw toolchain and gcc 7.3.0, gmake fails
  with a bunch of related errors all in cypher-gcrypt.c:

  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:262:32: error: ‘gcry_cipher_hd_t’ undeclared (first use in this function); did you mean ‘gcry_cipher_info’?
       err = gcry_cipher_encrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);                                ^~~~~~~~~~~~~~~~
                                  gcry_cipher_info
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:262:49: error: expected ‘)’ before ‘ctx’
       err = gcry_cipher_encrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);                                                 ^~~
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:262:11: error: too few arguments to function ‘gcry_cipher_encrypt’
       err = gcry_cipher_encrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);           ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:25:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /usr/include/gcrypt.h:566:5: note: declared here
   int gcry_cipher_encrypt (GcryCipherHd h,
       ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c: In function ‘qcrypto_gcrypt_xts_decrypt’:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:271:5: error: unknown type name ‘gcry_error_t’; did you mean ‘g_error’?
       gcry_error_t err;
       ^~~~~~~~~~~~
       g_error
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:272:32: error: ‘gcry_cipher_hd_t’ undeclared (first use in this function); did you mean ‘gcry_cipher_info’?
       err = gcry_cipher_decrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);                                ^~~~~~~~~~~~~~~~
                                  gcry_cipher_info
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:272:49: error: expected ‘)’ before ‘ctx’
       err = gcry_cipher_decrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);                                                 ^~~
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:272:11: error: too few arguments to function ‘gcry_cipher_decrypt’
       err = gcry_cipher_decrypt((gcry_cipher_hd_t)ctx, dst, length, src, length);           ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:25:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /usr/include/gcrypt.h:571:5: note: declared here
   int gcry_cipher_decrypt (GcryCipherHd h,
       ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c: In function ‘qcrypto_gcrypt_cipher_encrypt’:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:284:5: error: unknown type name ‘gcry_error_t’; did you mean ‘g_error’?
       gcry_error_t err;
       ^~~~~~~~~~~~
       g_error
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:293:21: warning: passing argument 1 of ‘xts_encrypt’ makes pointer from integer without a cast [-Wint-conversion]
           xts_encrypt(ctx->handle, ctx->tweakhandle,
                       ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:22:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /export/home/denber/qemu-2.12.0/include/crypto/xts.h:73:6: note: expected ‘const void *’ but argument is of type ‘int’
   void xts_encrypt(const void *datactx,
        ^~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:293:34: warning: passing argument 2 of ‘xts_encrypt’ makes pointer from integer without a cast [-Wint-conversion]
           xts_encrypt(ctx->handle, ctx->tweakhandle,
                                    ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:22:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /export/home/denber/qemu-2.12.0/include/crypto/xts.h:73:6: note: expected ‘const void *’ but argument is of type ‘int’
   void xts_encrypt(const void *datactx,
        ^~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:298:35: warning: passing argument 1 of ‘gcry_cipher_encrypt’ makes pointer from integer without a cast [-Wint-conversion]
           err = gcry_cipher_encrypt(ctx->handle,
                                     ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:25:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /usr/include/gcrypt.h:566:5: note: expected ‘GcryCipherHd {aka struct gcry_cipher_handle *}’ but argument is of type ‘int’
   int gcry_cipher_encrypt (GcryCipherHd h,
       ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c: In function ‘qcrypto_gcrypt_cipher_decrypt’:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:320:5: error: unknown type name ‘gcry_error_t’; did you mean ‘g_error’?
       gcry_error_t err;
       ^~~~~~~~~~~~
       g_error
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:329:21: warning: passing argument 1 of ‘xts_decrypt’ makes pointer from integer without a cast [-Wint-conversion]
           xts_decrypt(ctx->handle, ctx->tweakhandle,
                       ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:22:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /export/home/denber/qemu-2.12.0/include/crypto/xts.h:51:6: note: expected ‘const void *’ but argument is of type ‘int’
   void xts_decrypt(const void *datactx,
        ^~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:329:34: warning: passing argument 2 of ‘xts_decrypt’ makes pointer from integer without a cast [-Wint-conversion]
           xts_decrypt(ctx->handle, ctx->tweakhandle,
                                    ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:22:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /export/home/denber/qemu-2.12.0/include/crypto/xts.h:51:6: note: expected ‘const void *’ but argument is of type ‘int’
   void xts_decrypt(const void *datactx,
        ^~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:334:35: warning: passing argument 1 of ‘gcry_cipher_decrypt’ makes pointer from integer without a cast [-Wint-conversion]
           err = gcry_cipher_decrypt(ctx->handle,
                                     ^~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:25:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /usr/include/gcrypt.h:571:5: note: expected ‘GcryCipherHd {aka struct gcry_cipher_handle *}’ but argument is of type ‘int’
   int gcry_cipher_decrypt (GcryCipherHd h,
       ^~~~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:0:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c: In function ‘qcrypto_gcrypt_cipher_setiv’:
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:353:5: error: unknown type name ‘gcry_error_t’; did you mean ‘g_error’?
       gcry_error_t err;
       ^~~~~~~~~~~~
       g_error
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:365:19: warning: implicit declaration of function ‘gcry_cipher_setctr’; did you mean ‘gcry_cipher_setiv’? [-Wimplicit-function-declaration]
               err = gcry_cipher_setctr(ctx->handle, iv, niv);
                     ^~~~~~~~~~~~~~~~~~
                     gcry_cipher_setiv
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:365:19: warning: nested extern declaration of ‘gcry_cipher_setctr’ [-Wnested-externs]
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:372:13: warning: implicit declaration of function ‘gcry_cipher_reset’; did you mean ‘gcry_cipher_close’? [-Wimplicit-function-declaration]
               gcry_cipher_reset(ctx->handle);
               ^~~~~~~~~~~~~~~~~
               gcry_cipher_close
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:372:13: warning: nested extern declaration of ‘gcry_cipher_reset’ [-Wnested-externs]
  /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:373:19: warning: passing argument 1 of ‘gcry_cipher_ctl’ makes pointer from integer without a cast [-Wint-conversion]
               err = gcry_cipher_setiv(ctx->handle, iv, niv);
                     ^~~~~~~~~~~~~~~~~
  In file included from /export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:25:0,
                   from /export/home/denber/qemu-2.12.0/crypto/cipher.c:153:
  /usr/include/gcrypt.h:540:5: note: expected ‘GcryCipherHd {aka struct gcry_cipher_handle *}’ but argument is of type ‘int’
   int gcry_cipher_ctl( GcryCipherHd h, int cmd, void *buffer, size_t buflen);
       ^~~~~~~~~~~~~~~
  gmake: *** [/export/home/denber/qemu-2.12.0/rules.mak:67: crypto/cipher.o] Error 1

  ---------------------------------------------------------------------

  I do have libgcrypt, libgcrypt_dev, and libgcrypt_utils installed from
  opencsw.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1785698/+subscriptions

  reply	other threads:[~2018-08-13 19:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 19:41 [Qemu-devel] [Bug 1785698] [NEW] Solaris build error: unknown type name ‘gcry_error_t’ Michele Denber
2018-08-06 20:49 ` [Qemu-devel] [Bug 1785698] " Michele Denber
2018-08-07  0:46 ` Michele Denber
2018-08-07  6:12 ` Thomas Huth
2018-08-07  8:38 ` Daniel Berrange
2018-08-07 15:41 ` Michele Denber
2018-08-07 15:45 ` Michele Denber
2018-08-08  4:52 ` Thomas Huth
2018-08-08 16:17 ` Michele Denber
2018-08-10 16:46 ` Michele Denber
2018-08-13  8:14 ` Thomas Huth
2018-08-13 18:58   ` Michele Denber [this message]
2018-08-14  8:42     ` Peter Maydell
2018-08-14 17:44       ` Michele Denber
2018-08-14 18:17         ` Peter Maydell
2018-08-14 19:54           ` Michele Denber
2018-08-15  3:59           ` Markus Armbruster
2018-08-13 20:51 ` [Qemu-devel] Fwd: " Michele Denber
2018-08-14 18:05 ` [Qemu-devel] " Daniel Berrange
2018-08-14 20:00 ` [Qemu-devel] Fwd: " Michele Denber
2018-08-15  0:45   ` [Qemu-devel] [Bug 1785698] Did this work? Michele Denber
2018-08-15 10:50 ` [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’ Peter Maydell
2018-08-15 15:56   ` Michele Denber
2019-01-15  3:22 ` WHR
2019-01-15  8:28 ` Thomas Huth
2019-01-15 19:31 ` Michele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B71D4C8.7060006@gmx.com \
    --to=1785698@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.