Still repairing the environment

Wednesday, September 27, 2017

Missing software on the macOS side

There are some pieces of software that were not correctly restored from the backup. Typically, things that installed stuff outside of the most standard areas, like /Applications. That notably includes the Red Hat certificates, so I have to go through multiple warnings every time I want to access an https:// web page, and then some stuff like Ajax does not work too well. Fortunately, the setup is quite easy (keyword "Red Hat Mac Setup").

Building Spice for macOS

Reinstalling the missing pieces to build Spice. Will need to add a README.macos, or better yet, a build script, to explain how to do it. It's not entirely trivial yet.

Recap of the things I had to install just to pass configure:

brew install pkg-config pixman gtk+3 gstreamer gstreamermm libjpeg-turbo

Among the changes:

  • Now, openssl is at 1.0.2l (up from 1.0.2j). Since openssl is put in the Cellar (i.e. it conflicts with built-in macOS features), I still have to add the following before building:
      export PATH=$PATH:/usr/local/Cellar/gettext/0.19.8.1/bin
      export CFLAGS="-ObjC -g"
      export CXXFLAGS=" -g"
      export CPPFLAGS="-I/usr/local/opt/jpeg-turbo/include -I/usr/local/include -I/usr/local/Cellar/openssl/1.0.2l/include"
      export LDFLAGS="-g -L/usr/local/opt/jpeg-turbo/lib -L/usr/local/lib -L/usr/local/Cellar/openssl/1.0.2l/lib"
      

One thing that I noticed and I did not know about is that CPPFLAGS is apparently only active for ./configure, i.e. you cannot just set CPPFLAGS after configure.

AFter that, I have a failure when running it against my Linux VMs:

% spicy -h 192.168.77.42 -p 5901

** Message: main channel: opened Wrong JPEG library version: library is 80, caller expects 90

Building spice for Linux

Rebuilding work environment from scratch in the Linux partition, based on Fedora 26.

There is a bogus warning from configure:

configure: WARNING: The avdec_h264 GStreamer element(s) are missing. You should be able to find them in the gstreamer-libav 1.0 package.

The message talks about gstreamer-libav, but the actual package for gstreamer 1.0 is called gstreamer1-libav.

Then, there is an unfriendly error message at build time:

ddd@ptitfed spice-common> make

make all-recursive make[1]: Entering directory '/home/ddd/Work/spice/spice-gtk/spice-common' Making all in python_modules make[2]: Entering directory '/home/ddd/Work/spice/spice-gtk/spice-common/python_modules' make[2]: Leaving directory '/home/ddd/Work/spice/spice-gtk/spice-common/python_modules' Making all in common make[2]: Entering directory '/home/ddd/Work/spice/spice-gtk/spice-common/common' GEN generated_client_demarshallers.c make[2]: *** [Makefile:809: generated_client_demarshallers.c] Error 1 make[2]: Leaving directory '/home/ddd/Work/spice/spice-gtk/spice-common/common' make[1]: *** [Makefile:455: all-recursive] Error 1 make[1]: Leaving directory '/home/ddd/Work/spice/spice-gtk/spice-common' make: *** [Makefile:387: all] Error 2

Building with make V=1 shows:

Making all in common

make[4]: Entering directory '/home/ddd/Work/spice/spice-gtk/spice-common/common' /usr/bin/python ../spice_codegen.py --generate-demarshallers --client --include common/messages.h ../spice.proto generated_client_demarshallers.c >/dev/null make[4]: *** [Makefile:809: generated_client_demarshallers.c] Error 1

Running manually to avoid the redirection to /dev/null:

> /usr/bin/python ../spice_codegen.py --generate-demarshallers --client --include common/messages.h ../spice.proto generated_client_demarshallers.c

Module pyparsing not found.

There is a package for that, so dnf install python2-pyparsing does the trick (so would pip install pyparsing I guess. The benefit of using the module is that it means we can add the dependency so that dnf builddep spice-gtk works correctly.

3D acceleration for guests

The 3D acceleration for guests no longer works on Fedora 26 host. The qemu process crashes with:

Process 20868 (virt-manager) of user 1026 dumped core.

Stack trace of thread 20868: #0 0x00007f9e25b4c69b raise (libc.so.6) #1 0x00007f9e25b4e4a0 abort (libc.so.6) #2 0x00007f9e0996ec9c gl_provider_resolver (libepoxy.so.0) #3 0x00007f9e09974bf1 gl_single_resolver (libepoxy.so.0) #4 0x00007f9e09979ada epoxy_glEGLImageTargetTexture2DOES_global_rewrite_ptr (libepoxy.so.0) #5 0x00007f9dd56c7851 spice_egl_update_scanout (libspice-client-gtk-3.0.so.5) #6 0x00007f9dd56c13ba spice_display_widget_gl_scanout (libspice-client-gtk-3.0.so.5) #7 0x00007f9dd56c6ac7 spice_egl_init (libspice-client-gtk-3.0.so.5) #8 0x00007f9dd56c135c spice_display_widget_gl_scanout (libspice-client-gtk-3.0.so.5) #9 0x00007f9e1d0d930d g_closure_invoke (libgobject-2.0.so.0) #10 0x00007f9e1d0eb98e signal_emit_unlocked_R (libgobject-2.0.so.0) #11 0x00007f9e1d0f41a5 g_signal_emit_valist (libgobject-2.0.so.0) #12 0x00007f9e1d0f4b0f g_signal_emit (libgobject-2.0.so.0) #13 0x00007f9e1d0dd594 g_object_dispatch_properties_changed (libgobject-2.0.so.0) #14 0x00007f9e1d0dfa19 g_object_notify (libgobject-2.0.so.0) #15 0x00007f9de6cfd030 notify_main_context (libspice-client-glib-2.0.so.8) #16 0x00007f9e1cdfdc27 g_idle_dispatch (libglib-2.0.so.0) #17 0x00007f9e1ce01247 g_main_context_dispatch (libglib-2.0.so.0) #18 0x00007f9e1ce015e8 g_main_context_iterate.isra.25 (libglib-2.0.so.0) #19 0x00007f9e1ce0167c g_main_context_iteration (libglib-2.0.so.0) #20 0x00007f9e1c43cebd g_application_run (libgio-2.0.so.0) #21 0x00007f9e1cbb4bde ffi_call_unix64 (libffi.so.6) #22 0x00007f9e1cbb454f ffi_call (libffi.so.6) #23 0x00007f9e1d77dce4 pygi_invoke_c_callable (_gi.so) #24 0x00007f9e1d77f838 pygi_function_cache_invoke (_gi.so) #25 0x00007f9e1d773c89 _callable_info_call (_gi.so) #26 0x00007f9e268bca53 PyObject_Call (libpython2.7.so.1.0) #27 0x00007f9e2699f454 PyEval_EvalFrameEx (libpython2.7.so.1.0) #28 0x00007f9e269a1d99 PyEval_EvalFrameEx (libpython2.7.so.1.0) #29 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #30 0x00007f9e269a1433 PyEval_EvalFrameEx (libpython2.7.so.1.0) #31 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #32 0x00007f9e269a4609 PyEval_EvalCode (libpython2.7.so.1.0) #33 0x00007f9e2697c81f run_mod (libpython2.7.so.1.0) #34 0x00007f9e2697c8ca PyRun_FileExFlags (libpython2.7.so.1.0) #35 0x00007f9e2697d8ce PyRun_SimpleFileExFlags (libpython2.7.so.1.0) #36 0x00007f9e2697061e Py_Main (libpython2.7.so.1.0) #37 0x00007f9e25b3650a __libc_start_main (libc.so.6) #38 0x00005560d5eac77a _start (python2.7)

Stack trace of thread 20869: #0 0x00007f9e25c1aacd poll (libc.so.6) #1 0x00007f9e1ce01569 g_main_context_iterate.isra.25 (libglib-2.0.so.0) #2 0x00007f9e1ce0167c g_main_context_iteration (libglib-2.0.so.0) #3 0x00007f9e061ddf3d dconf_gdbus_worker_thread (libdconfsettings.so) #4 0x00007f9e1ce28536 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f9e2660b36d start_thread (libpthread.so.0) #6 0x00007f9e25c26bbf __clone (libc.so.6)

Stack trace of thread 20871: #0 0x00007f9e25c1aacd poll (libc.so.6) #1 0x00007f9e1ce01569 g_main_context_iterate.isra.25 (libglib-2.0.so.0) #2 0x00007f9e1ce01902 g_main_loop_run (libglib-2.0.so.0) #3 0x00007f9e1c468cb6 gdbus_shared_thread_func (libgio-2.0.so.0) #4 0x00007f9e1ce28536 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f9e2660b36d start_thread (libpthread.so.0) #6 0x00007f9e25c26bbf __clone (libc.so.6)

Stack trace of thread 20872: #0 0x00007f9e26614666 do_futex_wait.constprop.1 (libpthread.so.0) #1 0x00007f9e26614758 __new_sem_wait_slow.constprop.0 (libpthread.so.0) #2 0x00007f9e268e94c4 PyThread_acquire_lock (libpython2.7.so.1.0) #3 0x00007f9e268c9fd2 lock_PyThread_acquire_lock (libpython2.7.so.1.0) #4 0x00007f9e269a379e PyEval_EvalFrameEx (libpython2.7.so.1.0) #5 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #6 0x00007f9e269a1433 PyEval_EvalFrameEx (libpython2.7.so.1.0) #7 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #8 0x00007f9e269a1433 PyEval_EvalFrameEx (libpython2.7.so.1.0) #9 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #10 0x00007f9e268f3987 function_call.lto_priv.229 (libpython2.7.so.1.0) #11 0x00007f9e268bca53 PyObject_Call (libpython2.7.so.1.0) #12 0x00007f9e2699fc43 PyEval_EvalFrameEx (libpython2.7.so.1.0) #13 0x00007f9e269a1d99 PyEval_EvalFrameEx (libpython2.7.so.1.0) #14 0x00007f9e269a1d99 PyEval_EvalFrameEx (libpython2.7.so.1.0) #15 0x00007f9e269a43f8 PyEval_EvalCodeEx (libpython2.7.so.1.0) #16 0x00007f9e268f37ee function_call.lto_priv.229 (libpython2.7.so.1.0) #17 0x00007f9e268bca53 PyObject_Call (libpython2.7.so.1.0) #18 0x00007f9e268e888e instancemethod_call.lto_priv.144 (libpython2.7.so.1.0) #19 0x00007f9e268bca53 PyObject_Call (libpython2.7.so.1.0) #20 0x00007f9e2699aa67 PyEval_CallObjectWithKeywords (libpython2.7.so.1.0) #21 0x00007f9e26963e82 t_bootstrap (libpython2.7.so.1.0) #22 0x00007f9e2660b36d start_thread (libpthread.so.0) #23 0x00007f9e25c26bbf __clone (libc.so.6)

Stack trace of thread 20979: #0 0x00007f9e25c1aacd poll (libc.so.6) #1 0x00007f9de445d831 linux_udev_event_thread_main (libusb-1.0.so.0) #2 0x00007f9e2660b36d start_thread (libpthread.so.0) #3 0x00007f9e25c26bbf __clone (libc.so.6)

Stack trace of thread 20870: #0 0x00007f9e25c1aacd poll (libc.so.6) #1 0x00007f9e1ce01569 g_main_context_iterate.isra.25 (libglib-2.0.so.0) #2 0x00007f9e1ce0167c g_main_context_iteration (libglib-2.0.so.0) #3 0x00007f9e1ce016c1 glib_worker_main (libglib-2.0.so.0) #4 0x00007f9e1ce28536 g_thread_proxy (libglib-2.0.so.0) #5 0x00007f9e2660b36d start_thread (libpthread.so.0) #6 0x00007f9e25c26bbf __clone (libc.so.6)

Stack trace of thread 20980: #0 0x00007f9e25c1aacd poll (libc.so.6) #1 0x00007f9de44571fc handle_events (libusb-1.0.so.0) #2 0x00007f9de445827a libusb_handle_events_timeout_completed (libusb-1.0.so.0) #3 0x00007f9de445836f libusb_handle_events (libusb-1.0.so.0) #4 0x00007f9de6d134f1 spice_usb_device_manager_usb_ev_thread (libspice-client-glib-2.0.so.8) #5 0x00007f9e1ce28536 g_thread_proxy (libglib-2.0.so.0) #6 0x00007f9e2660b36d start_thread (libpthread.so.0) #7 0x00007f9e25c26bbf __clone (libc.so.6)

(Filed as Red Hat Bugzilla 1496766 the next day)

Laptop setup

Received a new Lenovo laptop. Began the setup late in the day. Now, Cortana is talking to you and listening to your responses during setup. Which, at first sight, looks like a great idea for beginners. Until someone called me and, while answering the phone (in French) Cortana politely asked me "It looks like you want a Finnish keyboard" and then somehow interpreted my next answer as "Yes".

Fortunately, the mouse still works and you can go back