[spice-gtk] Fix build with automake 1.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building a source file from a different directory, automake 1.14
is warning that the automake option 'subdir-objects' must be used:

automake: warnings are treated as errors
gtk/Makefile.am:218: warning: source file
'$(top_srcdir)/spice-common/common/sw_canvas.c' is in a subdirectory,
gtk/Makefile.am:218: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the
'subdir-objects'
automake: automake option hasn't been enabled.  For now, the
corresponding output
automake: object file(s) will be placed in the top-level directory.
However,
automake: this behaviour will change in future Automake versions: they
will
automake: unconditionally cause object files to be placed in the same
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option
throughout your
automake: project, to avoid future incompatibilities.
autoreconf: automake failed with exit status: 1

This causes the build to fail because we are also using the -Werror
automake option.
Updating the spice-common submodule to git master fixes part of this
issue as 7ea1cc5 'Fix generation of marshallers in VPATH builds' removed
directory references from some source files.
We still need to add 'subdir-objects' to spice-gtk configure.ac as
gtk/Makefile.am is referencing a source file from spice-common.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=67304
---
 configure.ac        |  2 +-
 gtk/spice-channel.c | 11 ++++++++---
 spice-common        |  2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index d89bd6f..f6bab4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_AUX_DIR([build-aux])
 
-AM_INIT_AUTOMAKE([foreign dist-bzip2 -Wall -Werror -Wno-portability])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects -Wall -Werror -Wno-portability])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT
 AM_MAINTAINER_MODE
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index e5ec68a..fc15125 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2223,10 +2223,15 @@ static int spice_channel_load_ca(SpiceChannel *channel)
 
     if (ca_file != NULL) {
         rc = SSL_CTX_load_verify_locations(c->ctx, ca_file, NULL);
-        if (rc != 1)
-            g_warning("loading ca certs from %s failed", ca_file);
-        else
+        if (rc != 1) {
+            if (g_file_test(ca_file, G_FILE_TEST_IS_REGULAR)) {
+                g_warning("loading ca certs from %s failed", ca_file);
+            } else {
+                g_debug("skipping ca certs from non-existing '%s'", ca_file);
+            }
+        } else {
             count++;
+        }
     }
 
     if (count == 0) {
diff --git a/spice-common b/spice-common
index 6edeb43..b3a00f4 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit 6edeb43747b6161cbff3bc7c18d221d81f2d3eb9
+Subproject commit b3a00f4411962e0c06c7ad89a9936df388aa0023
-- 
1.9.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]