Re: [PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro

2020-07-07 Thread Michele Denber




On 07/06/20 13:04, Laurent Vivier wrote:

Le 04/07/2020 à 20:13, Michele Denber a écrit :

On 07/04/20 13:11, Thomas Huth wrote:

On 04/07/2020 11.23, Peter Maydell wrote:

In commit a8d2532645cf5ce4 we cleaned up usage of the qemu-common.h header
so that it was always included from .c files and never from other .h files.
We missed adding it to net/tap-solaris.c (which previously was pulling it
in via tap-int.h), which broke building on Solaris hosts.

Fixes: a8d2532645cf5ce4
Reported-by: Michele Denber
Signed-off-by: Peter Maydell
---
Untested: Michele, could you give this a try?
---
  net/tap-solaris.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index 4725d2314ee..d03165c57c9 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -27,6 +27,7 @@
  #include "tap_int.h"
  #include "qemu/ctype.h"
  #include "qemu/cutils.h"
+#include "qemu-common.h"

  #include
  #include


I can confirm that this works in Solaris 11.4:

root@hemlock:~/qemu-5.0.0# gpatch -p1<  tap-solaris.patch.diff
patching file net/tap-solaris.c
root@hemlock:~/qemu-5.0.0#

Do you mean building on Solaris hosts works well now?
In that message I meant that the tap-solaris patch worked.  However, 
yes, I have now successfully built all of QEMU 5.0 on Solaris 11.4 SPARC.


In this case, you can add a "Tested-by:" tag.

I'd be glad to but how do I do that?

- Michele




Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber
Update: actually, after using it for a bit, it appears that XP runs at 
about the same speed in 5.0 as it did in 2.12.  It's just the initial 
boot that's very slow.  Does this message (which I discovered hiding 
under the QEMU window) have anything to do with it?


(qemu:27712): Gtk-WARNING **: Could not load a pixbuf from 
/org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could not be 
found.



- Michele



Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber

On 07/04/20 11:57, Philippe Mathieu-Daudé wrote:

Odd...

Assuming you are using gcc, have you tried 'configure --host-cc=gcc'?

OK, so I changed it from

# /opt/csw/bin/bash ./configure --cc=gcc  --extra-cflags="-m32"

to

# /opt/csw/bin/bash ./configure --cc=gcc  --extra-cflags="-m32" 
--host-cc=gcc


and then reran gmake -j16.   That seems to have fixed it.  ppc64 is 
there now:


root@hemlock:~/qemu-5.0.0# ppc64-softmmu/qemu-system-ppc64 -machine help
Supported machines are:
40p  IBM RS/6000 7020 (40p)
bamboo   bamboo
g3beige  Heathrow based PowerMAC
mac99Mac99 based PowerMAC
mpc8544dsmpc8544ds
... and a bunch more ...
root@hemlock:~/qemu-5.0.0#

And I also have the right stuff in x86_64-softmmu. So I tried running my 
Win XP image and it started up OK, opening the QEMU window and 
displaying the XP logo.  But unfortunately it's really really slow, like 
20 minutes just to get to the XP desktop appearing.  That takes about 2 
minutes in QEMU 2.12 on the same host hardware.  I had been hoping 5.0 
would be faster.  Is there a reason for it to be an order of magnitude 
slower?  I'm saying:


root@hemlock:~/qemu-5.0.0/x86_64-softmmu# ./qemu-system-x86_64  -m 2047  
-usb -device usb-tablet -smp 3 -device rtl8139,netdev=net0 -netdev 
user,id=net0 -boot d -hda  /bkpool/qemuimages/XP.img -cdrom 
/bkpool/qemuimages/xp.iso &


But in any case, I will now cautiously claim  that I have succeeded in 
building QEMU 5.0 in Solaris 11.4 SPARC.  Thanks very much to everyone 
for all your help.


- Michele




Re: [PATCH] net/tap-solaris.c: Include qemu-common.h for TFR macro

2020-07-04 Thread Michele Denber

On 07/04/20 13:11, Thomas Huth wrote:

On 04/07/2020 11.23, Peter Maydell wrote:

In commit a8d2532645cf5ce4 we cleaned up usage of the qemu-common.h header
so that it was always included from .c files and never from other .h files.
We missed adding it to net/tap-solaris.c (which previously was pulling it
in via tap-int.h), which broke building on Solaris hosts.

Fixes: a8d2532645cf5ce4
Reported-by: Michele Denber
Signed-off-by: Peter Maydell
---
Untested: Michele, could you give this a try?
---
  net/tap-solaris.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index 4725d2314ee..d03165c57c9 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -27,6 +27,7 @@
  #include "tap_int.h"
  #include "qemu/ctype.h"
  #include "qemu/cutils.h"
+#include "qemu-common.h"

  #include
  #include


I can confirm that this works in Solaris 11.4:

root@hemlock:~/qemu-5.0.0# gpatch -p1 < tap-solaris.patch.diff
patching file net/tap-solaris.c
root@hemlock:~/qemu-5.0.0#


- Michele



Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber

On 07/04/20 08:02, Thomas Huth wrote:

TFR is a macro that is defined in our qemu-common.h header ... does it
work if you add a #include "qemu-common.h" somewhere at the beginning of
net/tap-solaris.c ?

Yes, thank you, that fixed it:

root@hemlock:~/qemu-5.0.0# gmake -j16
gmake[1]: Entering directory '/export/home/denber/qemu-5.0.0/slirp'
grep: illegal option -- m
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
gmake[1]: Nothing to be done for 'all'.
gmake[1]: Leaving directory '/export/home/denber/qemu-5.0.0/slirp'
CHK version_gen.h
  CC  net/tap-solaris.o
  LINKmoxie-softmmu/qemu-system-moxie
  LINKcris-softmmu/qemu-system-cris
  LINKmicroblaze-softmmu/qemu-system-microblaze
  LINKmicroblazeel-softmmu/qemu-system-microblazeel
  LINKnios2-softmmu/qemu-system-nios2
  LINKlm32-softmmu/qemu-system-lm32
  LINKm68k-softmmu/qemu-system-m68k
  LINKhppa-softmmu/qemu-system-hppa
  LINKalpha-softmmu/qemu-system-alpha
  LINKmips64-softmmu/qemu-system-mips64
  LINKmips64el-softmmu/qemu-system-mips64el
  LINKmipsel-softmmu/qemu-system-mipsel
  LINKmips-softmmu/qemu-system-mips
  LINKi386-softmmu/qemu-system-i386
  LINKaarch64-softmmu/qemu-system-aarch64
  LINKarm-softmmu/qemu-system-arm
  LINKor1k-softmmu/qemu-system-or1k
  CC  s390x-softmmu/gen-features
/bin/sh: cc: not found
gmake[1]: *** 
[/export/home/denber/qemu-5.0.0/target/s390x/Makefile.objs:25: 
/export/home/denber/qemu-5.0.0/s390x-softmmu/gen-features] Error 127

gmake: *** [Makefile:527: s390x-softmmu/all] Error 2
gmake: *** Waiting for unfinished jobs
  LINKrx-softmmu/qemu-system-rx
  LINKriscv32-softmmu/qemu-system-riscv32
  LINKriscv64-softmmu/qemu-system-riscv64
  LINKppc64-softmmu/qemu-system-ppc64
  LINKppc-softmmu/qemu-system-ppc
root@hemlock:~/qemu-5.0.0#

I still have one grep/ggrep issue and one "wrong sh" issue.  And it 
doesn't look like it really completed correctly because for example I see:


root@hemlock:~/qemu-5.0.0# cd x86_64-softmmu
root@hemlock:~/qemu-5.0.0/x86_64-softmmu# ls
config-devices.mak  config-devices.mak.old  Makefile
config-devices.mak.dconfig-target.mak
root@hemlock:~/qemu-5.0.0/x86_64-softmmu#

So even though gmake finished, it didn't make at least one VM.  Is that 
because of the two remaining errors?


- Michele



Re: gmake in Solaris 11.4: TFR missing

2020-07-04 Thread Michele Denber




On 07/03/20 17:55, Philippe Mathieu-Daudé wrote:
TFR() is defined in include/qemu-common.h: #define TFR(expr) do { if 
((expr) != -1) break; } while (errno == EINTR) 
Ah ha, thank you.  It figures, the one place I didn't look.  I assumed 
that QEMU would know how to find its own things so TFR must be something 
external.


- Michele




gmake in Solaris 11.4: TFR missing

2020-07-03 Thread Michele Denber




It appears that _IOR & friends are defined in 
/usr/include/sys/ioccom.h, but I can't figure out how to point gmake 
to that.  Do I need some sort of "-I" in the Makefile?



When I built QEMU 2.12, I ran into this too and ended up just 
commenting out all the references to _IOR, etc. in hw/tpm/tpm_ioctl.h 
but maybe we can do something more elegant this time.  Thanks.


OK, I fixed this by adding the line

#include 

to hw/tpm/tpm_ioctl.h.

gmake now went to the end but threw a bunch of errors all complaining 
about something called TFR.  This is the tail:


 ...
CC  aarch64-softmmu/trace/generated-helpers.o
Undefined   first referenced
 symbol in file
TFR ../net/tap-solaris.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:208: qemu-system-mipsel] Error 1
gmake: *** [Makefile:527: mipsel-softmmu/all] Error 2
  LINKmips-softmmu/qemu-system-mips
Undefined   first referenced
 symbol in file
TFR ../net/tap-solaris.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:208: qemu-system-mips] Error 1
gmake: *** [Makefile:527: mips-softmmu/all] Error 2
  LINKarm-softmmu/qemu-system-arm
Undefined   first referenced
 symbol in file
TFR ../net/tap-solaris.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:208: qemu-system-arm] Error 1
gmake: *** [Makefile:527: arm-softmmu/all] Error 2
  LINKaarch64-softmmu/qemu-system-aarch64
Undefined   first referenced
 symbol in file
TFR ../net/tap-solaris.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:208: qemu-system-aarch64] Error 1
gmake: *** [Makefile:527: aarch64-softmmu/all] Error 2
root@hemlock:~/qemu-5.0.0#

A web search for "solaris undefined symbol TFR" turned up nothing and 
I'm not seeing it on the machine.  man TFR returns nothing.  I didn't 
encounter this error while building 2.12.  Here's an example of its use 
(in tap-solaris.c):


 TFR(ip_fd = open("/dev/udp", O_RDWR, 0));

  What is TFR?

- Michele




gmake in Solaris 11.4: _IOR missing

2020-07-03 Thread Michele Denber

On 07/03/20 12:50, Peter Maydell wrote:

...
This is because you're trying to apply the patch to the
5.0.0 release, but it was made against the current head-of-git,
and this file has changed a little between the two.
Generally we do all development against head-of-git, so
I would suggest that you try again with that.

As it happens, the current preferred fix for the drm.c issue
is this one:
https://patchew.org/QEMU/20200703145614.16684-1-peter.mayd...@linaro.org/20200703145614.16684-10-peter.mayd...@linaro.org/
I see.  I downloaded 5.0.0 mainly because I don't understand how git 
works.  Anyway, I applied your new  patch and it worked.


I tried gmake again and got further.  This time it's stopping here:

root@hemlock:~/qemu-5.0.0# gmake -j16
...
CC  hw/usb/hcd-uhci.o
In file included from hw/tpm/tpm_emulator.c:37:0:
hw/tpm/tpm_ioctl.h:222:30: warning: implicit declaration of function 
'_IOR\'; did you mean '_IORW'? [-Wimplicit-function-declaration]

 PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
  ^~~~
  _IORW
hw/tpm/tpm_ioctl.h:222:43: error: expected expression before 
\u2018ptm_cap\u2019

 PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
   ^~~
hw/tpm/tpm_ioctl.h:223:30: warning: implicit declaration of function 
\u2018_IOWR\u2019; did you mean \u2018_IOWRT\u2019? 
[-Wimplicit-function-declaration]

 PTM_INIT   = _IOWR('P', 1, ptm_init),
  ^
  _IOWRT
hw/tpm/tpm_ioctl.h:223:44: error: expected expression before 
\u2018ptm_init\u2019

 PTM_INIT   = _IOWR('P', 1, ptm_init),
^~~~
hw/tpm/tpm_ioctl.h:224:43: error: expected expression before 
\u2018ptm_res\u2019

 PTM_SHUTDOWN   = _IOR('P', 2, ptm_res),
   ^~~
hw/tpm/tpm_ioctl.h:225:43: error: expected expression before 
\u2018ptm_est\u2019

 PTM_GET_TPMESTABLISHED = _IOR('P', 3, ptm_est),
   ^~~
hw/tpm/tpm_ioctl.h:226:44: error: expected expression before 
\u2018ptm_loc\u2019

 PTM_SET_LOCALITY   = _IOWR('P', 4, ptm_loc),
^~~
hw/tpm/tpm_ioctl.h:227:43: error: expected expression before 
\u2018ptm_res\u2019

 PTM_HASH_START = _IOR('P', 5, ptm_res),
   ^~~
hw/tpm/tpm_ioctl.h:228:44: error: expected expression before 
\u2018ptm_hdata\u2019

 PTM_HASH_DATA  = _IOWR('P', 6, ptm_hdata),
^
hw/tpm/tpm_ioctl.h:229:43: error: expected expression before 
\u2018ptm_res\u2019

 PTM_HASH_END   = _IOR('P', 7, ptm_res),
   ^~~
hw/tpm/tpm_ioctl.h:230:43: error: expected expression before 
\u2018ptm_res\u2019

 PTM_CANCEL_TPM_CMD = _IOR('P', 8, ptm_res),
   ^~~
hw/tpm/tpm_ioctl.h:231:43: error: expected expression before 
\u2018ptm_res\u2019

 PTM_STORE_VOLATILE = _IOR('P', 9, ptm_res),
   ^~~
hw/tpm/tpm_ioctl.h:232:47: error: expected expression before 
\u2018ptm_reset_est\u2019

 PTM_RESET_TPMESTABLISHED = _IOWR('P', 10, ptm_reset_est),
   ^
hw/tpm/tpm_ioctl.h:233:45: error: expected expression before 
\u2018ptm_getstate\u2019

 PTM_GET_STATEBLOB  = _IOWR('P', 11, ptm_getstate),
 ^~~~
hw/tpm/tpm_ioctl.h:234:45: error: expected expression before 
\u2018ptm_setstate\u2019

 PTM_SET_STATEBLOB  = _IOWR('P', 12, ptm_setstate),
 ^~~~
  CC  hw/usb/hcd-ohci.o
hw/tpm/tpm_ioctl.h:235:44: error: expected expression before 
\u2018ptm_res\u2019

 PTM_STOP   = _IOR('P', 13, ptm_res),
^~~
hw/tpm/tpm_ioctl.h:236:44: error: expected expression before 
\u2018ptm_getconfig\u2019

 PTM_GET_CONFIG = _IOR('P', 14, ptm_getconfig),
^
hw/tpm/tpm_ioctl.h:237:44: error: expected expression before 
\u2018ptm_res\u2019

 PTM_SET_DATAFD = _IOR('P', 15, ptm_res),
^~~
hw/tpm/tpm_ioctl.h:238:45: error: expected expression before 
\u2018ptm_setbuffersize\u2019

 PTM_SET_BUFFERSIZE = _IOWR('P', 16, ptm_setbuffersize),
 ^
  CC  hw/usb/hcd-ohci-pci.o
gmake: *** [/export/home/denber/qemu-5.0.0/rules.mak:69: 
hw/tpm/tpm_emulator.o] Error 1


It appears that _IOR & friends are defined in /usr/include/sys/ioccom.h, 
but I can't figure out how to point gmake to that.  Do I need some sort 
of 

Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-03 Thread Michele Denber

Oops, I hit Send before I was done.  I tried  the Haiku patch:

diff --git a/util/Makefile.objs b/util/Makefile.objs
index cc5e37177a..faebc13fac 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -39,7 +39,7 @@ util-obj-y += qsp.o
 util-obj-y += range.o
 util-obj-y += stats64.o
 util-obj-y += systemd.o
-util-obj-$(CONFIG_POSIX) += drm.o
+util-obj-$(CONFIG_LINUX) += drm.o
 util-obj-y += guest-random.o
 util-obj-$(CONFIG_GIO) += dbus.o
 dbus.o-cflags = $(GIO_CFLAGS)

but it didn't work:

root@hemlock:~/qemu-5.0.0# gpatch -p1 < Makefile.objs.patch.diff
patching file util/Makefile.objs
Hunk #1 FAILED at 39.
1 out of 1 hunk FAILED -- saving rejects to file util/Makefile.objs.rej
root@hemlock:~/qemu-5.0.0# cat util/Makefile.objs.rej
--- util/Makefile.objs
+++ util/Makefile.objs
@@ -39,7 +39,7 @@ util-obj-y += qsp.o
 util-obj-y += range.o
 util-obj-y += stats64.o
 util-obj-y += systemd.o
-util-obj-$(CONFIG_POSIX) += drm.o
+util-obj-$(CONFIG_LINUX) += drm.o
 util-obj-y += guest-random.o
 util-obj-$(CONFIG_GIO) += dbus.o
 dbus.o-cflags = $(GIO_CFLAGS)
root@hemlock:~/qemu-5.0.0#

- Michele




Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-03 Thread Michele Denber

On 07/03/20 01:11, Thomas Huth wrote:


Did you have a local modification to that file?

Oops yes, I had changed the line


static int openpty(int *amaster, int *aslave, char *name,
   struct termios *termp, struct winsize *winp)

to

int openpty(int *amaster, int *aslave, char *name,
   struct termios *termp, struct winsize *winp)
If so, please revert it first before applying the patch (or add the 
"#if !defined(HAVE_OPENPTY)" now manually to see whether it works).


OK - looks like that did it:

root@hemlock:~/qemu-5.0.0# gpatch -p1 < configpatch.diff
patching file configure
Hunk #1 succeeded at 5049 (offset -85 lines).
Hunk #2 succeeded at 7117 (offset -267 lines).
patching file util/qemu-openpty.c
Hunk #2 succeeded at 94 with fuzz 2.
root@hemlock:~/qemu-5.0.0#

Then

root@hemlock:~/qemu-5.0.0# /opt/csw/bin/bash ./configure --cc=gcc  
--extra-cflags="-m32"


succeeded with only one odd thing:

./configure: line 6326: pod2man: command not found

I fixed that with

root@hemlock:~/qemu-5.0.0# PATH=$PATH:/usr/perl5/5.26/bin

So I can confirm your patch works in Solaris 11.4.

gmake then ran successfully through qemu-openpty.c  becfore stopping with:

 ...
CC  crypto/trace.o
util/drm.c: In function \u2018qemu_drm_rendernode_open\u2019:
util/drm.c:41:16: error: \u2018struct dirent\u2019 has no member named 
\u2018d_type\u2019; did you mean \u2018d_name\u2019?

 if (e->d_type != DT_CHR) {
^~
d_name
util/drm.c:41:26: error: \u2018DT_CHR\u2019 undeclared (first use in 
this function); did you mean \u2018TH_CWR\u2019?

 if (e->d_type != DT_CHR) {
  ^~
  TH_CWR
util/drm.c:41:26: note: each undeclared identifier is reported only once 
for each function it appears in

gmake: *** [/export/home/denber/qemu-5.0.0/rules.mak:69: util/drm.o] Error 1

PMM said about this:

Ah, the Haiku folks just ran into exactly this issue.
Their fix should also be good for Solaris:
https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg08800.html
(This whole file is for using a Linux-specific feature so there's
no point even compiling it for other OSes.)




- Michele



Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-02 Thread Michele Denber

On 07/02/20 13:34, Thomas Huth wrote:


That's just the context, cut at three lines after the last change. 
Simply try to apply the patch with "patch -p1 -i ..." or "git am" in a 
separate git branch if you're using git. It should hopefully apply 
cleanly.


Looks like it partly worked:

root@hemlock:~/qemu-5.0.0# gpatch -p1 -i < configpatch.diff
gpatch: option requires an argument -- 'i'
gpatch: Try 'gpatch --help' for more information.
root@hemlock:~/qemu-5.0.0# gpatch -p1 < configpatch.diff
patching file configure
Hunk #1 succeeded at 5049 (offset -85 lines).
Hunk #2 succeeded at 7117 (offset -267 lines).
patching file util/qemu-openpty.c
Hunk #1 FAILED at 52.
Hunk #2 succeeded at 95 with fuzz 2 (offset 2 lines).
1 out of 2 hunks FAILED -- saving rejects to file util/qemu-openpty.c.rej
root@hemlock:~/qemu-5.0.0# cat util/qemu-openpty.c.rej
--- util/qemu-openpty.c
+++ util/qemu-openpty.c
@@ -52,7 +52,8 @@
 #endif

 #ifdef __sun__
-/* Once Solaris has openpty(), this is going to be removed. */
+
+#if !defined(HAVE_OPENPTY)
 static int openpty(int *amaster, int *aslave, char *name,
struct termios *termp, struct winsize *winp)
 {
root@hemlock:~/qemu-5.0.0#


- Michele



Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-02 Thread Michele Denber



On 07/02/20 10:39, Thomas Huth wrote:

Recent versions of Solaris (v11.4) now feature an openpty() function,
too, causing a build failure since we ship our own implementation of
openpty() for Solaris in util/qemu-openpty.c so far. Since there are
now both variants available in the wild, with and without this function,
let's introduce a proper HAVE_OPENPTY define for this to fix the build
failure.

Signed-off-by: Thomas Huth
---
  Note: Untested, since I do not have a VM with Solaris. Michele,
  Peter, I'd really appreciate a "Tested-by:" from you here. Thanks!
Sorry, I was off on another project (doing my taxes).  Is this patch 
missing something?  It looks like there should be more.  The last line is


static void cfmakeraw (struct termios *termios_p) {

with no matching "}".


- Michele



  configure   | 9 -
  util/qemu-openpty.c | 4 +++-
  2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 4a22dcd563..0b5fd30fc4 100755
--- a/configure
+++ b/configure
@@ -5134,10 +5134,14 @@ extern int openpty(int *am, int *as, char *name, void 
*termp, void *winp);
  int main(void) { return openpty(0, 0, 0, 0, 0); }
  EOF

-if ! compile_prog "" "" ; then
+have_openpty="no"
+if compile_prog "" "" ; then
+  have_openpty="yes"
+else
if compile_prog "" "-lutil" ; then
  libs_softmmu="-lutil $libs_softmmu"
  libs_tools="-lutil $libs_tools"
+have_openpty="yes"
fi
  fi

@@ -7380,6 +7384,9 @@ fi
  if test "$have_broken_size_max" = "yes" ; then
  echo "HAVE_BROKEN_SIZE_MAX=y">>  $config_host_mak
  fi
+if test "$have_openpty" = "yes" ; then
+echo "HAVE_OPENPTY=y">>  $config_host_mak
+fi

  # Work around a system header bug with some kernel/XFS header
  # versions where they both try to define 'struct fsxattr':
diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c
index 2e8b43bdf5..14e5c8ae8f 100644
--- a/util/qemu-openpty.c
+++ b/util/qemu-openpty.c
@@ -52,7 +52,8 @@
  #endif

  #ifdef __sun__
-/* Once Solaris has openpty(), this is going to be removed. */
+
+#if !defined(HAVE_OPENPTY)
  static int openpty(int *amaster, int *aslave, char *name,
 struct termios *termp, struct winsize *winp)
  {
@@ -93,6 +94,7 @@ err:
  close(mfd);
  return -1;
  }
+#endif

  static void cfmakeraw (struct termios *termios_p)
  {


Re: [PATCH] configure / util: Auto-detect the availability of openpty()

2020-07-02 Thread Michele Denber




On 07/02/20 10:46, Daniel P. Berrangé wrote:

On Thu, Jul 02, 2020 at 04:39:55PM +0200, Thomas Huth wrote:

Recent versions of Solaris (v11.4) now feature an openpty() function,
too, causing a build failure since we ship our own implementation of
openpty() for Solaris in util/qemu-openpty.c so far. Since there are
now both variants available in the wild, with and without this function,
let's introduce a proper HAVE_OPENPTY define for this to fix the build
failure.

11.4 has been out since Aug 2018

The previous verison of solaris  11.3 was from Oct 2015, with EOL
in Oct 2020 [1].

Solaris isn't an officially supported platform for QEMU, but if it
was, then we'd probably consider it a long life distro, and thus
consider 11.3 to be out of scope for QEMU by now.

IOW, instead of checking for openpty being missing, I think there's
a decent argument to be made that we can just assume openpty exists,
and delete the old solaris compat code entirely.
Of course there are still many people (where "many" is a relative term) 
running Solaris 10 for compatibility reasons and Solaris 10 does not 
have openpty.  The only real reason to run 11.3 is because it still has 
support for the Sun Ray thin client and that was removed from 11.4 
(which is a giant pain).  So I'm stuck running Solaris 10 in an LDOM to 
run all my old code and have Sun Ray access, and 11.4 in the control 
domain because it's the latest thing.


- Michele




Regards,
Daniel

[1] https://en.wikipedia.org/wiki/Solaris_(operating_system)





Re: Building in Solaris 11.4

2020-06-29 Thread Michele Denber

On 06-29-2020 8:12 AM, Thomas Huth wrote:

...
It's not the same bug as last year, but a new one: Seems like newer
versions of Solaris now have this functions in their libraries!

Yes - I just checked. Solaris 10 does not have openpty, but Solaris 11.4
indeed does have it

So what you want is something like this (completely untested):


So just to make sure I have this right - I save that code into a patch
file and then apply it where?  At the qemu-5.0.0 level?  Then run
configure again?

Right now I'm looking at that "struct dirent" problem in gmake I
mentioned a few days ago.  I will try the Haiku patch offered by PMM.

- MIchele



Re: Building in Solaris 11.4

2020-06-27 Thread Michele Denber

Well I removed the "static" from the line

static int openpty(int *amaster, int *aslave, char *name,
   struct termios *termp, struct winsize *winp)

in util/qemu-openpty.c.  I odn't know if that was the right thing to do 
but it did allow it to compile.  Now I'm  stopped here:


...
CC  monitor/trace.o
util/drm.c: In function 'qemu_drm_rendernode_open':
util/drm.c:41:16: error: 'struct dirent' has no member named 'd_type'; 
did you mean 'd_name'?

 if (e->d_type != DT_CHR) {
^~
d_name
util/drm.c:41:26: error: 'DT_CHR' undeclared (first use in this 
function); did you mean 'TH_CWR'?

 if (e->d_type != DT_CHR) {
  ^~
  TH_CWR
util/drm.c:41:26: note: each undeclared identifier is reported only once 
for each function it appears in

gmake: *** [/export/home/denber/qemu-5.0.0/rules.mak:69: util/drm.o] Error 1

This looks like more "not in Solaris" POSIX stuff.  See

https://stackoverflow.com/questions/35215109/struct-dirent-does-not-have-de-type-in-header-file

   "The only fields in the dirent structure that are mandated by
   POSIX.1 are: d_name[], of unspecified size, with at most NAME_MAX
   characters preceding the terminating null byte; and (as an XSI
   extension) d_ino. /The other fields are unstandardized, and not
   present on all systems/; see NOTES below for some further details.

   then continues

   Only the fields d_name and d_ino are specified in POSIX.1-2001. The
   remaining fields are available on many, but not all systems. Under
   glibc, programs can check for the availability of the fields not
   defined in POSIX.1 by testing whether the macros
   _DIRENT_HAVE_D_NAMLEN, _DIRENT_HAVE_D_RECLEN, _DIRENT_HAVE_D_OFF, or
   _DIRENT_HAVE_D_TYPE are defined.

   *Other than Linux, the d_type field is available mainly only on BSD
   systems.* This field makes it possible to avoid the expense of
   calling lstat(2) if further actions depend on the type of the file.
   If the _BSD_SOURCE feature test macro is defined, then glibc defines
   the following macro constants for the value returned in d_type:"

But I'm not sure what to make of this.


- Michele




Re: Building in Solaris 11.4

2020-06-27 Thread Michele Denber

Well the make ran for a while and then stopped here:


root@hemlock:~/qemu-5.0.0# gmake -j16
...
  CC  util/bitops.o
util/qemu-openpty.c:56:12: error: static declaration of
\u2018openpty\u2019 follows non-static declaration
 static int openpty(int *amaster, int *aslave, char *name,
^~~
In file included from /usr/include/termios.h:8:0,
 from util/qemu-openpty.c:48:
/usr/include/sys/termios.h:538:12: note: previous declaration of
\u2018openpty\u2019 was here
 extern int openpty(int *, int *, char *, struct termios *, struct
winsize *);
^~~
gmake: *** [/export/home/denber/qemu-5.0.0/rules.mak:69:
util/qemu-openpty.o] Error 1

Interestingly, I ran across this openpty issue last year while building
QEMU 2.12 in Solaris 10, here: https://bugs.launchpad.net/qemu/+bug/1777252

It looks like the change to fix that issue (missing openpty in Solaris)
is having some trouble.  I'm not a good enough C programmer to figure it
out.  Remove the openpty declaration from util/openpty.c perhaps?

- Michele




Re: Building in Solaris 11.4

2020-06-25 Thread Michele Denber

Subject:Re: Building in Solaris 11.4
Date:   Wed, 24 Jun 2020 16:48:51 -0500
From:   Eric Blake 
Organization:   Red Hat, Inc.
To: Michele Denber , qemu-devel@nongnu.org





As a short-term workaround, you can always do:

/path/to/bash ./configure

Ah yes, thank you.  I now recall having that problem building 2.12  in
Solaris 10 a few years ago.  The default bash in Solaris 11.4 is
/usr/bin/bash and that won't work.  I used /opt/csw/bin/bash instead and
that took care of the "local" problem.

Similarly, the default Solaris grep is missing the -e option so I
changed grep to ggrep in configure.  POSIX was always problematic in
Solaris because, I believe of Sun's efforts to maintain backward
compatibility.

So now I've got:

root@hemlock:~/qemu-5.0.0# /opt/csw/bin/bash ./configure --cc=gcc

ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
   You probably need to set PKG_CONFIG_LIBDIR
   to point to the right pkg-config files for your
   build target
root@hemlock:~/qemu-5.0.0#

I fixed that by saying

# LD_LIBRARY_PATH
=/usr/openwin/lib:opt/csw/lib:/usr/local/lib:/lib:/opt/sfw/lib:/opt/csw/gxx/lib:/usr/X11/lib
#
PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/sfw/lib/pkgconfig:/usr/lib/pkgconfig
#
PKG_CONFIG_LIBDIR=/opt/csw/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/sfw/lib/pkgconfig:/usr/lib/pkgconfig
# /opt/csw/bin/bash ./configure --cc=gcc  --extra-cflags="-m32"

(Thankfully I still have some notes from building QEMU 2.12.)

That gave me a successful configure ending with:

The QEMU project intends to remove support for this host OS in
a future release if nobody volunteers to maintain it and to
provide a build host for our continuous integration setup.
configure has succeeded and you can continue to build, but
if you care about QEMU on this platform you should contact
us upstream at qemu-devel@nongnu.org.

So I hereby volunteer.  I have an 8 core 64 thread 2.85 GHz. Sun T4-1
with 64 GB and three 900 GB disks and a 500 MB/50 MB fiber Internet
connection..

Anyway, that's enough for one day.  On to the gmake.  I'm sure I'll have
more questions soon :-)

- Michele




Building in Solaris 11.4

2020-06-24 Thread Michele Denber

While trying to run configure in Solaris 11.4, I quickly run into:

root@hemlock:~/qemu-5.0.0# ./configure
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
./configure[62]: local: not found [No such file or directory]
grep: illegal option -- e
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
./configure[62]: local: not found [No such file or directory]

ERROR: "cc" either does not exist or does not work

root@hemlock:~/qemu-5.0.0# gcc --version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@hemlock:~/qemu-5.0.0#

Line 62 is

local compiler="$1"

I'm not familiar with this construct.  What does "local" do?  It wasn't
in the configure file for QEMU 2.12.  (And I already said "cc=gcc")

- Michele



[Qemu-devel] [Bug 1787505] Re: Solaris host: no network connection, mouse pointer mismatch

2018-08-31 Thread Michele Denber
Sorry about that.  I didn't know where to ask about this.  Anyway thank
you for the explanation.  That was the clue I needed.  Instead of giving
XP a gateway of 192.168.0.1 in the Networking TCP tab I just set gateway
and DNS to automatic.  Networking is all working fine now.  This was the
call:

./qemu-system-x86_64  -m 2047  -usb -device usb-tablet -smp 3 -device
rtl8139,netdev=net0 -netdev user,id=net0 -boot d -hda
/bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

So this is not a bug, but a configuration issue.

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

Title:
  Solaris host: no network connection, mouse pointer mismatch

Status in QEMU:
  New

Bug description:
  This is probably a bit far afield but on a Solaris 10 SPARC host (Sun
  M3000) running a Windows XP guest like this:

  ./qemu-system-x86_64 -m 1024 -boot d  -smp 3 -net nic -net user -hda
  /bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

  the vnc server starts up and Windows boots normally.  However, there
  is no network connectivity.  There are no network devices visible in
  XP's Networking tab of Control Panel and a ping of the local router
  reports "unreachable".

  Also, the keyboard works fine but the guest mouse pointer is offset
  from the host mouse position by an amount that varies by screen
  position.  This makes it impossible to point to locations near the
  edge of the qemu window.  This seems to be a previously reported
  problem, but the suggested fix, " -device usb-tablet", prevents qemu
  from even starting:

  qemu-system-x86_64: -device usb-tablet: No 'usb-bus' bus found for
  device 'usb-tablet'

  The physical mouse is connected to the USB port of a Sun Ray 2fs
  controlling the M3000 via Sun Ray server.  I apologize if this is a
  configuration issue and not a bug but I don't know where else to
  report it and have been unable to find a solution in the
  documentation.

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



[Qemu-devel] [Bug 1787505] Re: Solaris host: no network connection, mouse pointer mismatch

2018-08-30 Thread Michele Denber
Anyone?  I'm still trying to get my networking working.  On this page:
https://en.wikibooks.org/wiki/QEMU/Networking#User_mode_networking, it
says

"The guest OS will see an E1000 NIC with a virtual DHCP server on
10.0.2.2 and will be allocated an address starting from 10.0.2.15. A
virtual DNS server will be accessible on 10.0.2.3, and a virtual SAMBA
file server (if present) will be accessible on 10.0.2.4 allowing you to
access files on the host via SAMBA file shares."

That's fine, but my LAN is on 192.186.0.x not, 10.2.0.x.  The following
starts qemu but

./qemu-system-x86_64 -m 2047 -boot d  -usb -device usb-tablet  -smp 3
-netdev user,id=n0,net=192.168.0.0/24 -device rtl8139,netdev=n0 -hda
/bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

shows an Ethernet device in XP but is unable to connect to anything via
IE.


But it also says

"To use this network setup with the Linux kernel, you must set the
configuration option CONFIG_E1000=y when compiling."

Does this (to the extent that Linux applies to Solaris) also apply if
I'm using an rtl8139 card?

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

Title:
  Solaris host: no network connection, mouse pointer mismatch

Status in QEMU:
  New

Bug description:
  This is probably a bit far afield but on a Solaris 10 SPARC host (Sun
  M3000) running a Windows XP guest like this:

  ./qemu-system-x86_64 -m 1024 -boot d  -smp 3 -net nic -net user -hda
  /bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

  the vnc server starts up and Windows boots normally.  However, there
  is no network connectivity.  There are no network devices visible in
  XP's Networking tab of Control Panel and a ping of the local router
  reports "unreachable".

  Also, the keyboard works fine but the guest mouse pointer is offset
  from the host mouse position by an amount that varies by screen
  position.  This makes it impossible to point to locations near the
  edge of the qemu window.  This seems to be a previously reported
  problem, but the suggested fix, " -device usb-tablet", prevents qemu
  from even starting:

  qemu-system-x86_64: -device usb-tablet: No 'usb-bus' bus found for
  device 'usb-tablet'

  The physical mouse is connected to the USB port of a Sun Ray 2fs
  controlling the M3000 via Sun Ray server.  I apologize if this is a
  configuration issue and not a bug but I don't know where else to
  report it and have been unable to find a solution in the
  documentation.

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



[Qemu-devel] [Bug 1787505] Re: Solaris host: no network connection, mouse pointer mismatch

2018-08-18 Thread Michele Denber
Thank you very much.  The following invocation fixed the mouse problem
(mostly) and made the Ethernet device available to the guest:

./qemu-system-x86_64 -m 2047 -boot d  -usb -device usb-tablet -smp 3
-netdev user,id=n0 -device rtl8139,netdev=n0 -hda
/bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso

There is one minor problem with the mouse.  Without the "-usb" qemu
displays the guest cursor position with an arrow, and the host cursor
position with a four pixel-wide box, separated by a distance that varies
with position on the screen.  After adding "-usb", the guest cursor
correctly tracks the host mouse, but the little box remains displayed,
speared on the tip on the guest cursor arrow.

Also, while the guest now has a network device it still can't talk to
any destination.  Oddly, if I try to ftp to some server it says
"connected" but then nothing else.  Web pages all come back as
"unreachable" even when requested by IP rather than name.  Even pinging
the router fails (though the documentation states that ping won't work
anyway).  The guest shows packets beign sent, but none received.  I
tried various other options listed in the documentation without success,
eg.

# qemu-system-x86_64: Host doesn't belong to network
 ./qemu-system-x86_64 -m 2047 -boot d  -usb -device usb-tablet  -smp 3 -netdev 
user,id=n0,host=192.168.0.20, \
> hostname=canadiceq,dns=127.0.0.1,net=192.168.0.20/24 -device 
> rtl8139,netdev=n0 -hda  /bkpool/qemuimages/XP.img -cdrom 
> /bkpool/qemuimages/xp.iso &
1212
# qemu-system-x86_64: Host doesn't belong to network

My best guess also didn't work:

./qemu-system-x86_64 -m 2047 -boot d  -usb -device usb-tablet  -smp 3 -netdev 
user,id=n0,hostfwd=tcp::8080-:80,\
> net=192.168.0.0/24 -device rtl8139,netdev=n0 -hda  /bkpool/qemuimages/XP.img 
> -cdrom /bkpool/qemuimages/xp.iso &

That at least starts up, but no communication.

I guess I just don't understand what needs to be listed where in the
qemu invocation.  My guest TCP parameters are set up the same way as a
different working XP system.  I can't tell what I need to get the guest
to talk to the Internet.  I have a host IP (192.168.0.20), guest IP
(192.168.0.21), router IP (192.168.0.1), and DNS IP (208.67.222.222).
What goes where?  Do I need to set up anything special on the Solaris
end?  I've read over the documenation but still can't figure it out.

"If you have access to a Linux box, I'd definitely recommend testing the
same setup there."

I do, but I only have one legit XP license.

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

Title:
  Solaris host: no network connection, mouse pointer mismatch

Status in QEMU:
  New

Bug description:
  This is probably a bit far afield but on a Solaris 10 SPARC host (Sun
  M3000) running a Windows XP guest like this:

  ./qemu-system-x86_64 -m 1024 -boot d  -smp 3 -net nic -net user -hda
  /bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

  the vnc server starts up and Windows boots normally.  However, there
  is no network connectivity.  There are no network devices visible in
  XP's Networking tab of Control Panel and a ping of the local router
  reports "unreachable".

  Also, the keyboard works fine but the guest mouse pointer is offset
  from the host mouse position by an amount that varies by screen
  position.  This makes it impossible to point to locations near the
  edge of the qemu window.  This seems to be a previously reported
  problem, but the suggested fix, " -device usb-tablet", prevents qemu
  from even starting:

  qemu-system-x86_64: -device usb-tablet: No 'usb-bus' bus found for
  device 'usb-tablet'

  The physical mouse is connected to the USB port of a Sun Ray 2fs
  controlling the M3000 via Sun Ray server.  I apologize if this is a
  configuration issue and not a bug but I don't know where else to
  report it and have been unable to find a solution in the
  documentation.

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



[Qemu-devel] [Bug 1787505] [NEW] Solaris host: no network connection, mouse pointer mismatch

2018-08-16 Thread Michele Denber
Public bug reported:

This is probably a bit far afield but on a Solaris 10 SPARC host (Sun
M3000) running a Windows XP guest like this:

./qemu-system-x86_64 -m 1024 -boot d  -smp 3 -net nic -net user -hda
/bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

the vnc server starts up and Windows boots normally.  However, there is
no network connectivity.  There are no network devices visible in XP's
Networking tab of Control Panel and a ping of the local router reports
"unreachable".

Also, the keyboard works fine but the guest mouse pointer is offset from
the host mouse position by an amount that varies by screen position.
This makes it impossible to point to locations near the edge of the qemu
window.  This seems to be a previously reported problem, but the
suggested fix, " -device usb-tablet", prevents qemu from even starting:

qemu-system-x86_64: -device usb-tablet: No 'usb-bus' bus found for
device 'usb-tablet'

The physical mouse is connected to the USB port of a Sun Ray 2fs
controlling the M3000 via Sun Ray server.  I apologize if this is a
configuration issue and not a bug but I don't know where else to report
it and have been unable to find a solution in the documentation.

** Affects: qemu
 Importance: Undecided
 Status: New

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

Title:
  Solaris host: no network connection, mouse pointer mismatch

Status in QEMU:
  New

Bug description:
  This is probably a bit far afield but on a Solaris 10 SPARC host (Sun
  M3000) running a Windows XP guest like this:

  ./qemu-system-x86_64 -m 1024 -boot d  -smp 3 -net nic -net user -hda
  /bkpool/qemuimages/XP.img -cdrom /bkpool/qemuimages/xp.iso &

  the vnc server starts up and Windows boots normally.  However, there
  is no network connectivity.  There are no network devices visible in
  XP's Networking tab of Control Panel and a ping of the local router
  reports "unreachable".

  Also, the keyboard works fine but the guest mouse pointer is offset
  from the host mouse position by an amount that varies by screen
  position.  This makes it impossible to point to locations near the
  edge of the qemu window.  This seems to be a previously reported
  problem, but the suggested fix, " -device usb-tablet", prevents qemu
  from even starting:

  qemu-system-x86_64: -device usb-tablet: No 'usb-bus' bus found for
  device 'usb-tablet'

  The physical mouse is connected to the USB port of a Sun Ray 2fs
  controlling the M3000 via Sun Ray server.  I apologize if this is a
  configuration issue and not a bug but I don't know where else to
  report it and have been unable to find a solution in the
  documentation.

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



[Qemu-devel] [Bug 1787012] Re: Solaris build error: Bad string

2018-08-15 Thread Michele Denber
You are absolutely correct.  I found the right problem but the wrong
reason.  Note that:

# which tr
/usr/bin/tr
#  uname -s | tr '[/]' '[_]'
Bad string
# uname -s | /usr/xpg4/bin/tr '[/]' '[_]'
SunOS
#

So it's just another POSIX problem with Solaris, not a bug.  Solaris
provides all the POSIX stuff, it just doesn't make it the default.

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

Title:
  Solaris build error: Bad string

Status in QEMU:
  New

Bug description:
  While building qemu2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII
  running Solaris 10U11, opencsw toolchain, gcc 7.3.0, and python 3.3.6
  I get:

  # gmake
  mkdir -p dtc/libfdt
  mkdir -p dtc/tests
  Bad string
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dumptrees.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/trees.S
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/testutils.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/value-labels.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/asm_tree_dump.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/truncated_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/check_path.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay_bad_fixup.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/property_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/integer-expressions.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/utilfdt_test.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset_aliases.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/add_subnode_with_nops.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_unordered.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtb_reverse.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_ordered.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/extra-terminating-null.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/incbin.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/boot-cpuid.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/phandle_format.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path-references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/string_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/propname_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop2.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/set_name.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/rw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/open_pack.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nopulate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/mangle-layout.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/move_and_save.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop_inplace.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/stringlist.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/addr_size_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/notfound.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sized_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/char_literal.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_alias.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_compatible.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_check_compatible.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_phandle.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_prop_value.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/parent_offset.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/supernode_atdepth_offset.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_path.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_phandle.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/getprop.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_name.c
   DEP 

Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-15 Thread Michele Denber
On 08-15-2018 6:50 AM, Peter Maydell wrote:
> The executables are created in the subdirectories for each target, so
> x86_64-softmmu/qemu-system-x86_64 and so on.
>
Oh duh!  :-)  I'm really glad I asked.  I've been trying to figure out 
why there was no executable and no errors.  Sure enough, I found 
qemu-system-x86_64 right there in the x86_64-softmmu directory.  I ran 
that and it started right up.  I guess I was thinking more along the 
lines of VirtualBox where you start one program and choose a VM from 
there.  Thanks!

 - 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 

[Qemu-devel] [Bug 1785698] Did this work?

2018-08-14 Thread Michele Denber
Here's a mystery.  It looks like I finally have a clean compile - there 
are no error messages but I don't see an executable.  Is there supposed 
to be something called "qemu" somewhere now?  I looked in build/, the 
top level, and /usr/local/bin/.

# gmake V=1
(cd /export/home/denber/qemu-2.12.0; if test -n ""; then pkgvers=""; 
else if test -d .git; then pkgvers=$(git describe --match 'v*' 
2>/dev/null | tr -d '\n'); if ! git diff-index --quiet HEAD &>/dev/null; 
then pkgvers="${pkgvers}-dirty"; fi; fi; fi; printf "#define 
QEMU_PKGVERSION \"${pkgvers}\"\n"; if test -n "${pkgvers}"; then printf 
'#define QEMU_FULL_VERSION QEMU_VERSION " (" QEMU_PKGVERSION ")"\n'; 
else printf '#define QEMU_FULL_VERSION QEMU_VERSION\n'; fi; ) > 
qemu-version.h.tmp
if ! cmp -s qemu-version.h qemu-version.h.tmp; then mv 
qemu-version.h.tmp qemu-version.h; else rm qemu-version.h.tmp; fi
mkdir -p dtc/libfdt
mkdir -p dtc/tests
gmake -I/export/home/denber/qemu-2.12.0/dtc 
VPATH=/export/home/denber/qemu-2.12.0/dtc -C dtc V="1" 
LIBFDT_srcdir=/export/home/denber/qemu-2.12.0/dtc/libfdt 
CPPFLAGS="-I/export/home/denber/qemu-2.12.0/build/dtc 
-I/export/home/denber/qemu-2.12.0/dtc 
-I/export/home/denber/qemu-2.12.0/dtc/libfdt" CFLAGS="-O2 
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g  -I/opt/csw/include/pixman-1   
-I/export/home/denber/qemu-2.12.0/dtc/libfdt -D_REENTRANT -D_PTHREADS 
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include   -m32 
-mv8plus -mcpu=ultrasparc -std=gnu99 -D__EXTENSIONS__ 
-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef 
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common 
-fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value 
-Wno-missing-include-dirs -Wempty-body -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers 
-Wold-style-declaration -Wold-style-definition -Wtype-limits 
-fstack-protector-strong -I/opt/csw/include  -I/usr/include/libpng12   
-I/export/home/denber/qemu-2.12.0/capstone/include 
-I/export/home/denber/qemu-2.12.0/tests" LDFLAGS="-m32 -mv8plus -g " 
ARFLAGS="rv" CC="gcc" AR="ar" LD="ld"  
BUILD_DIR=/export/home/denber/qemu-2.12.0/build libfdt/libfdt.a
gmake[1]: Entering directory '/export/home/denber/qemu-2.12.0/build/dtc'
gmake[1]: 'libfdt/libfdt.a' is up to date.
gmake[1]: Leaving directory '/export/home/denber/qemu-2.12.0/build/dtc'
gmake -C /export/home/denber/qemu-2.12.0/capstone CAPSTONE_SHARED=no 
BUILDDIR="/export/home/denber/qemu-2.12.0/build/capstone" CC="gcc" 
AR="ar" LD="ld" RANLIB="ranlib" CFLAGS="-O2 -U_FORTIFY_SOURCE 
-D_FORTIFY_SOURCE=2 -g -I/opt/csw/include/pixman-1 
-I/export/home/denber/qemu-2.12.0/dtc/libfdt -D_REENTRANT -D_PTHREADS 
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include -m32 
-mv8plus -mcpu=ultrasparc -std=gnu99 -D__EXTENSIONS__ 
-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv 
-fstack-protector-strong -I/opt/csw/include -I/usr/include/libpng12 
-I/export/home/denber/qemu-2.12.0/capstone/include 
-I/export/home/denber/qemu-2.12.0/tests -DCAPSTONE_USE_SYS_DYN_MEM 
-DCAPSTONE_HAS_ARM -DCAPSTONE_HAS_ARM64 -DCAPSTONE_HAS_POWERPC 
-DCAPSTONE_HAS_X86"  BUILD_DIR=/export/home/denber/qemu-2.12.0/build 
/export/home/denber/qemu-2.12.0/build/capstone/libcapstone.a
gmake[1]: Entering directory '/export/home/denber/qemu-2.12.0/capstone'
gmake[1]: '/export/home/denber/qemu-2.12.0/build/capstone/libcapstone.a' 
is up to date.
gmake[1]: Leaving directory '/export/home/denber/qemu-2.12.0/capstone'
gmake  BUILD_DIR=/export/home/denber/qemu-2.12.0/build -C x86_64-softmmu 
V="1" TARGET_DIR="x86_64-softmmu/" all
gmake[1]: Entering directory 
'/export/home/denber/qemu-2.12.0/build/x86_64-softmmu'
gmake[1]: Leaving directory 
'/export/home/denber/qemu-2.12.0/build/x86_64-softmmu'
#

I even did a gmake clean and then gmake again.  No change - no errors 
and no executable.  ???

 - 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, 

Re: [Qemu-devel] Fwd: [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-14 Thread Michele Denber
>
>
> >  I notice in the Makefile in dtc/ that it's calling python. My default
> >  python is 2.6.9. I found some discussion about qemu moving to python
> >  3. Could this be the problem?
>
> We require either Python 2.7.x, or Python 3.x versions.  Support for
> 2.6.x was dropped I'm afraid.
>
>
Thanks.  I upgraded to python 3.3 though that turned out not to be the 
problem.  I documented the solution here:

https://bugs.launchpad.net/qemu/+bug/1787012

 - 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 

Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-14 Thread Michele Denber
On 08-14-2018 2:17 PM, Peter Maydell wrote:
>
>   dtc stuff really necessary?
> It is necessary, but only for certain guest CPU types. You can
> disable it by passing configure both "--disable-fdt" and also
> "--target-list= any arm, ppc, mips, microblaze or riscv targets>"
> (for instance "--target-list=x86_64-softmmu".)
Thanks.  Turns out I found where "Bad string" was coming from - there's 
a call to "uname -s | tr" in dtc/Makefile and that is known not to work 
in Solaris 10..  So I just replaced that with "HOSTOS=SunOS" and that 
took care of that.  dtc compiled just fine.

Now I'm getting a "ld: fatal: unrecognized option '--'" linking libfdt 
so I'm going to try a different linker.

Onward :-)

 - 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 

[Qemu-devel] [Bug 1787012] Re: Solaris build error: Bad string

2018-08-14 Thread Michele Denber
Oh, and how I found this.  From
http://lists.xymon.com/archive/2012-July/035109.html:

> Sorry to reply to myself. Looks like this line:
> 
> uname -s | tr '[/]' '[_]'
> 
> ...is not acceptable to /usr/bin/tr on Solaris 10. It worked fine
> on 9. On 10, one receives this error:
> 
> # uname -s | tr '[/]' '[_]' Bad string

And indeed I get:

# uname -s | tr '[/]' '[_]'
Bad string
#

So this is a bug in the Makefile, but only for Solaris 10.

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

Title:
  Solaris build error: Bad string

Status in QEMU:
  New

Bug description:
  While building qemu2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII
  running Solaris 10U11, opencsw toolchain, gcc 7.3.0, and python 3.3.6
  I get:

  # gmake
  mkdir -p dtc/libfdt
  mkdir -p dtc/tests
  Bad string
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dumptrees.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/trees.S
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/testutils.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/value-labels.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/asm_tree_dump.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/truncated_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/check_path.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay_bad_fixup.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/property_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/integer-expressions.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/utilfdt_test.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset_aliases.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/add_subnode_with_nops.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_unordered.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtb_reverse.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_ordered.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/extra-terminating-null.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/incbin.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/boot-cpuid.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/phandle_format.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path-references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/string_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/propname_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop2.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/set_name.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/rw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/open_pack.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nopulate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/mangle-layout.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/move_and_save.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop_inplace.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/stringlist.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/addr_size_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/notfound.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sized_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/char_literal.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_alias.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_compatible.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_check_compatible.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_phandle.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_prop_value.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/parent_offset.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/supernode_atdepth_offset.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_path.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_phandle.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/getprop.c
   

[Qemu-devel] [Bug 1787012] Re: Solaris build error: Bad string

2018-08-14 Thread Michele Denber
[Solved]

There's nothing like going public with a problem to find the answer
yourself shortly after.  In case it helps someone else in the future, it
turns out that the Makefile in dtc/ contains the following line:

HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
   sed -e 's/\(cygwin\|msys\).*/\1/')

Apparently there's something in there that gmake doesn't like which
causes it to emit "Bad string" so I just replaced that line with:

HOSTOS=SunOS

(a call to uname -s from the command line returns SunOS) and I'm no
longer getting the "Bad string" from gmake.  (I'm getting soemthing else
now but that's a different matter).

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

Title:
  Solaris build error: Bad string

Status in QEMU:
  New

Bug description:
  While building qemu2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII
  running Solaris 10U11, opencsw toolchain, gcc 7.3.0, and python 3.3.6
  I get:

  # gmake
  mkdir -p dtc/libfdt
  mkdir -p dtc/tests
  Bad string
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dumptrees.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/trees.S
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/testutils.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/value-labels.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/asm_tree_dump.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/truncated_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/check_path.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay_bad_fixup.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/property_iterate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/integer-expressions.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/utilfdt_test.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset_aliases.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/add_subnode_with_nops.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_unordered.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtb_reverse.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_ordered.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/extra-terminating-null.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/incbin.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/boot-cpuid.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/phandle_format.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/path-references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/references.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/string_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/propname_escapes.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop2.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/set_name.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/rw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/open_pack.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nopulate.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/mangle-layout.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/move_and_save.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sw_tree1.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_node.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_property.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop_inplace.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/stringlist.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/addr_size_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/notfound.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/sized_cells.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/char_literal.c
   DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_alias.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_compatible.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_check_compatible.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_phandle.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_prop_value.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/parent_offset.c
   DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/supernode_atdepth_offset.c
   DEP 

[Qemu-devel] [Bug 1787012] [NEW] Solaris build error: Bad string

2018-08-14 Thread Michele Denber
Public bug reported:

While building qemu2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII
running Solaris 10U11, opencsw toolchain, gcc 7.3.0, and python 3.3.6 I
get:

# gmake
mkdir -p dtc/libfdt
mkdir -p dtc/tests
Bad string
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/dumptrees.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/trees.S
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/testutils.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/value-labels.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/asm_tree_dump.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/truncated_property.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/check_path.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay_bad_fixup.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/overlay.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_iterate.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/property_iterate.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/integer-expressions.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/utilfdt_test.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset_aliases.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/add_subnode_with_nops.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_unordered.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtb_reverse.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/dtbs_equal_ordered.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/extra-terminating-null.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/incbin.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/boot-cpuid.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/phandle_format.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/path-references.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/references.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/string_escapes.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/propname_escapes.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop2.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/appendprop1.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_node.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/del_property.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/set_name.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/rw_tree1.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/open_pack.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/nopulate.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/mangle-layout.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/move_and_save.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/sw_tree1.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_node.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/nop_property.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/setprop_inplace.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/stringlist.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/addr_size_cells.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/notfound.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/sized_cells.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/char_literal.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_alias.c
 DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_compatible.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_check_compatible.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_phandle.c
 DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/node_offset_by_prop_value.c 
DEP /export/home/denber/qemu-2.12.0/dtc/tests/parent_offset.c
 DEP 
/export/home/denber/qemu-2.12.0/dtc/tests/supernode_atdepth_offset.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_path.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_phandle.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/getprop.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_name.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/path_offset.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/subnode_offset.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/find_property.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/root_node.c
 DEP /export/home/denber/qemu-2.12.0/dtc/tests/get_mem_rsv.c
 DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_overlay.c
 DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_addresses.c
 DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_empty_tree.c
 DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_strerror.c
 DEP /export/home/denber/qemu-2.12.0/dtc/libfdt/fdt_rw.c
 DEP 

Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-14 Thread Michele Denber
On 08-14-2018 4:42 AM, Peter Maydell wrote:
>
> We do assume a posix shell and that that shell is /bin/sh.
> We may have bugs where we assume non-posix behaviour
> from it, since almost all users are going to be on systems
> where /bin/sh is bash or dash or whatever the BSD /bin/sh is.
Apparently Solaris is different in that regard (among others).
>
> (dtc is a sort-of-third-party module, not part of QEMU
> proper.)
I notice in the Makefile in dtc/ that it's calling python.  My default 
python is 2.6.9.  I found some discussion about qemu moving to python 
3.  Could this be the problem?  Or is this dtc stuff really necessary?  
Is there some way to comment it out just to see what happens?  I didn't 
see any mention of it in the configure help.

I feel like I'm getting pretty close to success here.

 - 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: 

Re: [Qemu-devel] Fwd: [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-13 Thread Michele Denber
Well my gmake finally went all the way to the end building all of the 
guest architectures but I didn't see a qemu executable (unless it isn't 
called qemu).  I ran gmake again to see what happened and all I got was 
this:

# gmake
mkdir -p dtc/libfdt
mkdir -p dtc/tests
Bad string
#

I then ran gmake V=1.  That didn't really help::


(cd /export/home/denber/qemu-2.12.0; if test -n ""; then pkgvers=""; 
else if test -d .git; then pkgvers=$(git describe --match 'v*' 
2>/dev/null | tr -d '\n'); if ! git diff-index --quiet HEAD &>/dev/null; 
then pkgvers="${pkgvers}-dirty"; fi; fi; fi; printf "#define 
QEMU_PKGVERSION \"${pkgvers}\"\n"; if test -n "${pkgvers}"; then printf 
'#define QEMU_FULL_VERSION QEMU_VERSION " (" QEMU_PKGVERSION ")"\n'; 
else printf '#define QEMU_FULL_VERSION QEMU_VERSION\n'; fi; ) > 
qemu-version.h.tmp
if ! cmp -s qemu-version.h qemu-version.h.tmp; then mv 
qemu-version.h.tmp qemu-version.h; else rm qemu-version.h.tmp; fi
mkdir -p dtc/libfdt
mkdir -p dtc/tests
gmake -I/export/home/denber/qemu-2.12.0/dtc 
VPATH=/export/home/denber/qemu-2.12.0/dtc -C dtc V="1" 
LIBFDT_srcdir=/export/home/denber/qemu-2.12.0/dtc/libfdt 
CPPFLAGS="-I/export/home/denber/qemu-2.12.0/build/dtc 
-I/export/home/denber/qemu-2.12.0/dtc 
-I/export/home/denber/qemu-2.12.0/dtc/libfdt" CFLAGS="-O2 
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g  -I/opt/csw/include/pixman-1   
-I/export/home/denber/qemu-2.12.0/dtc/libfdt -D_REENTRANT -D_PTHREADS 
-I/opt/csw/include/glib-2.0 -I/opt/csw/lib/glib-2.0/include   -m32 
-mv8plus -mcpu=ultrasparc -std=gnu99 -D__EXTENSIONS__ 
-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef 
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common 
-fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value 
-Wno-missing-include-dirs -Wempty-body -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers 
-Wold-style-declaration -Wold-style-definition -Wtype-limits 
-fstack-protector-strong -I/opt/csw/include  -I/usr/include/libpng12   
-I/export/home/denber/qemu-2.12.0/capstone/include 
-I/export/home/denber/qemu-2.12.0/tests" LDFLAGS="-m32 -mv8plus -g " 
ARFLAGS="rv" CC="gcc" AR="ar" LD="ld"  
BUILD_DIR=/export/home/denber/qemu-2.12.0/build libfdt/libfdt.a
gmake[1]: Entering directory '/export/home/denber/qemu-2.12.0/build/dtc'
Bad string
gmake[1]: 'libfdt/libfdt.a' is up to date.
gmake[1]: Leaving directory '/export/home/denber/qemu-2.12.0/build/dtc'
...

It doesn't say "Error: Bad string", it just says "Bad string".  Is that 
even an error?  A web search for this turned up nothing and the string 
"Bad string" does not seem to appear in the entire qemu directory.  I'm 
not sure what's going on now.  There seems to be something in the dtc 
subdirectory it doesn't like.

 - 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 = 

Re: [Qemu-devel] QEMU on Solaris

2018-08-13 Thread Michele Denber

On 08-13-2018 6:08 AM, Peter Tribble wrote:



From the point of view of software such as qemu, divergences should be 
slight
(there are going to be changes around packaging, shipped compilers, 
but that's
true for different Linux distros in the same family). If it builds and 
works on
Solaris, it'll build and work on one of the illumos distributions, and 
vice versa.

(Although I note that's Solaris 10 mentioned above, which is now EOL, and
may be a little more problematic due to its age.)
I'm still using Solaris 10 because upgrading to Solaris 11 is a giant 
pain, and they did away with the Java Desktop Environment GUI in 11.  I 
really like the JDE.  However, I believe that Solaris 10 programs should 
also work in Solaris 11.  And it looks like Solaris 11 may be the end of 
the line anyway.


You can certainly run illumos (such as OpenIndiana or Tribblix) in a 
VM easily,

and freely. I can help with that.

That's for x86, of course. Building on a SPARC platform is a different 
matter
entirely. (Although that's one of the reasons some of us are 
interested in qemu

in the first place.)
That's exactly why I'm interested.  I'd like to declare my independence 
form Microsoft and Windows but I still have a few important Windows 
programs that won't run on anything else.  One can debate Solaris vx. 
Linux, but I've made my choice.


- Michele




Re: [Qemu-devel] QEMU on Solaris

2018-08-13 Thread Michele Denber

On 08-13-2018 4:34 AM, Daniel P. Berrangé wrote:

Copying Peter, as he would need access to a Solaris host to do GIT pre-merge
build testing.

Then there's the question of what ordinary developers would use for their own
testing if they needed to work on some portability issue. We've got support
in tree for running builds against VM images for the various *BSDs, and have
mingw cross build toolchain for Windows. Is it possible to provide free-to-use
VM disk images for Solaris build testing, or are software licensing requirements
going to get in the way of developers using them ?
Correct me if I'm wrong but I assume you're referring to the use of the 
Solaris OS itself.  Solaris 10 and 11 are both available for free 
download from Oracle.  I read the license agreement 
(http://www.oracle.com/technetwork/licenses/solaris-cluster-express-license-167852.html) 
and while I'm not a lawyer and do not even play one on the Internet, the 
relevant part seems to be:


*"LICENSE RIGHTS *
Except for any included software package or file that is licensed to you 
by Oracle under different license terms, we grant you a perpetual 
(unless terminated as provided in this agreement), nonexclusive, 
nontransferable, limited License to use the Programs only for the 
purpose of developing, testing, prototyping and demonstrating your 
applications, and not for any other purpose. If You are an educational 
institution vested with the power to confer official high school, 
associate, bachelor, master and/or doctorate degrees, or local 
equivalent, (“Degree(s)”), You may also use the Programs as part of Your 
educational curriculum for students enrolled in Your Degree program(s) 
solely as required for the conferral of such Degree (collectively 
“Educational Use”)."


I /think /that means it's OK to use it.  ???


There is OpenIndiana that forked off OpenSolaris, but I'm unclear how far
OpenIndiana and commercial Solaris have diverged since then ?
One problem with OpenIndiana is that it's not available for SPARC. 
However, they refer to Dilos, OpenSXCE and Tribblix, though I know 
nothing of any of those.


- Michele



Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-13 Thread Michele Denber
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 " does not pick up that file yet
> and you had to add "#include " 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 .  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: 

[Qemu-devel] QEMU on Solaris

2018-08-12 Thread Michele Denber

After configuring QEMU on my Sun I got this message:

"Host OS SunOS support is not currently maintained.
The QEMU project intends to remove support for this host OS in
a future release if nobody volunteers to maintain it and to
provide a build host for our continuous integration setup.
configure has succeeded and you can continue to build, but
if you care about QEMU on this platform you should contact
us upstream at qemu-devel@nongnu.org."

Well I do care about QEMU on my platform so I'd like to volunteer to 
provide a host for support.  I can provide you with a free account on my 
Sun Oracle Enterprise M3000 quad-core 2.75 GHz. SPARC64 VII running 
Solaris 10 Update 11.  I've got plenty of spare CPU cycles and lots of 
free disk.  Please let me know.


- Michele



[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-10 Thread Michele Denber
Anyone?  My offer of free use of my machine to support Qemu on Solaris
still stands.  Perhaps I'm asking in the wrong place?

-- 
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 

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-08 Thread Michele Denber
"echo  $solaris "

That gives:

# /usr/xpg4/bin/sh ../configure --extra-cflags="-m32" 
--target-list=x86_64-softmmu
 yes 
Install prefix/usr/local
BIOS directory/usr/local/share/qemu
firmware path /usr/local/share/qemu-firmware
binary directory  /usr/local/bin
library directory /usr/local/lib
module directory  /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory  /usr/local/etc
local state directory   /usr/local/var
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
...

Then:

# libgcrypt-config --cflags
-I/opt/csw/include
# libgcrypt-config --libs
-L/opt/csw/lib -lgcrypt -lgpg-error
# echo $SHELL
/bin/bash
# bash --version
GNU bash, version 4.3.33(1)-release (sparc-sun-solaris2.10)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
#

-- 
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 

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-07 Thread Michele Denber
Ah, I see:

"in a future QEMU release we may drop support for those hosts unless
somebody volunteers to help us with maintaining them (and can provide
build/CI machines)."

OK, so I happily volunteer an account on my machine to help maintain
this.

"What's the content of the $solaris variable at that point in time?"

How do I tell that?

$solaris seems to be set in a line earlier on:

case $targetos in
...
SunOS)
  solaris="yes"

and targetos is set before that by

elif check_define __sun__ ; then
  targetos='SunOS'

but I don't know what "check_define __sun__" is.  I am not a good
Makefile reader.

-- 
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 

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-07 Thread Michele Denber
"The libgcrypt-config command should be in $PATH"

I'm sorry - I don't understand.  Isn't $PATH a list of directories?  I
need to put a command in there?  I'm clearly missing something here.

-- 
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:
  

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-06 Thread Michele Denber
It turns out I needed
#include 
in crypto/cipher-grypt.c

However, now I'm stuck on

# gmake
mkdir -p dtc/libfdt
mkdir -p dtc/tests
Bad string
  LINKqemu-nbd
ld: fatal: library -lutil: not found
ld: fatal: file processing errors. No output written to qemu-nbd
collect2: error: ld returned 1 exit status
gmake: *** [/export/home/denber/qemu-2.12.0/rules.mak:122: qemu-nbd] Error 1
#

I can't find who's asking for -lutil.  There's no mention of it in qemu-
nbd.c.  Can someone tell me where thsi need for -lutil is coming from?

-- 
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,
   

[Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-06 Thread Michele Denber
** Description changed:

  Building qemu 2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII,
- opencsw toolchain and gcc 7.3.0, gmake fails with a bunch of related
- errors all in cypher-gcrypt.c:
+ 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
+  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); ^~~
+  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);   ^~~
+  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:
+  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,
-  ^~~
+  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
+  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
+  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); ^~~
+  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);   ^~~
+  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:
+  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,
-  ^~~
+  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
+  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,
-  ^~~
+  xts_encrypt(ctx->handle, ctx->tweakhandle,
+  ^~~
  In file included from 
/export/home/denber/qemu-2.12.0/crypto/cipher-gcrypt.c:22:0,
-   

[Qemu-devel] [Bug 1785698] [NEW] Solaris build error: unknown type name ‘gcry_error_t’

2018-08-06 Thread Michele Denber
Public bug reported:

Building qemu 2.12.0 on a Sun Oracle Enterprise M3000 SPARC64 VII,
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