[{"id":2653,"web_url":"https://patchwork.libcamera.org/comment/2653/","msgid":"<20190913190651.GF12549@bigcity.dyn.berto.se>","date":"2019-09-13T19:06:51","subject":"Re: [libcamera-devel] [PATCH] qcam: Fix compilation errors with\n\tgcc-9 and Qt < 5.13","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-09-13 21:01:32 +0300, Laurent Pinchart wrote:\n> gcc-9 has introduced a deprecated-copy warning that is triggered by Qt\n> header files. The issue has been fixed in Qt 5.13. Fix compilation with\n> earlier Qt versions by disabling the warning. In order to still benefit\n> from the warning when possible, only disable it for gcc-9 and Qt < 5.13.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/qcam/meson.build | 14 +++++++++++++-\n>  1 file changed, 13 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/qcam/meson.build b/src/qcam/meson.build\n> index 21f91f25cec0..1e71f20fa15e 100644\n> --- a/src/qcam/meson.build\n> +++ b/src/qcam/meson.build\n> @@ -18,11 +18,23 @@ qt5_dep = dependency('qt5',\n>                       required : false)\n>  \n>  if qt5_dep.found()\n> +    qt5_cpp_args = [ '-DQT_NO_KEYWORDS' ]\n> +\n> +    # gcc 9 introduced a deprecated-copy warning that is triggered by Qt until\n> +    # Qt 5.13. Disable it manually.\n> +    if cc.get_id() == 'gcc'\n> +        gcc_version = cc.version().split('.')\n> +        qt5_version = qt5_dep.version().split('.')\n> +        if qt5_version[1].to_int() < 13 and gcc_version[0].to_int() >= 9\n> +            qt5_cpp_args += [ '-Wno-deprecated-copy' ]\n> +        endif\n> +    endif\n> +\n>      moc_files = qt5.preprocess(moc_headers: qcam_moc_headers,\n>                                 dependencies: qt5_dep)\n>  \n>      qcam  = executable('qcam', qcam_sources, moc_files,\n>                         install : true,\n>                         dependencies : [libcamera_dep, qt5_dep],\n> -                       cpp_args : '-DQT_NO_KEYWORDS')\n> +                       cpp_args : qt5_cpp_args)\n>  endif\n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x144.google.com (mail-lf1-x144.google.com\n\t[IPv6:2a00:1450:4864:20::144])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B9D9D60BE6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2019 21:06:52 +0200 (CEST)","by mail-lf1-x144.google.com with SMTP id u3so7805072lfl.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2019 12:06:52 -0700 (PDT)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\tq26sm7114294lfd.53.2019.09.13.12.06.51\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Sep 2019 12:06:51 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=IT+UFg/Tuez/xoOCN7A5RhcV0DULFXGLzZvFMxsrGmI=;\n\tb=cZRAQef0sGngdamIbEdQBNS0kHnoCcJhyBm9hGuyJgmJW6xGSYdrsaSNUEZibYMU2K\n\tbuhjDO/8DhMEtZI7FJR1iRxDH9hj8OwOYH/AjPL6Lp/d1BKz0XZk5jJIBV7uHJji+zTu\n\tamt4fx3fVxIk+49yL/UpLoMegxUcMDJC/zT/FCqt3fB5EaaurTvK8ZdOKT50vLuMfXEv\n\tCR+wlI/9350Cotznjpd1ZVSuf98zgHKbXTdjuta45FJ+6I/FSzdjDg4P3m4cOS4icFNr\n\to6iT/M2FxcNSGSnz1NzY38883+//YKJ6APo6LL80VTupXd98OJnQDo9DM/io3C+wwkjV\n\tOAmw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=IT+UFg/Tuez/xoOCN7A5RhcV0DULFXGLzZvFMxsrGmI=;\n\tb=su0MICn/GyZyN4TUS7bWDagelMfl05jpWBf86aXK451luAi2kYkXnd5YPpksGaIZg1\n\tL+TCLArzCD96ByULpjR1eaduB5Cfu29nSUhiLbJzw1xY4crhA9OwojmZBLXUU5+mCt4g\n\tZE1YZ8EwBQVcL3xdYIrP3okZaUyZ45Fj70cWgG8047tAWgMwS9E1uki1rKI0BXYj3EZb\n\tHZgwu+IwoCrt8iaQx2Qun3mnkT/nDNXZ7UIZo3ZEUeTfYZZfUGBZzrY3l+1kWOG+8QEJ\n\tV6M4YC70B58OKEEXjvktUHmlKkUirBc0HWka/h4t4ps++nMvZamAsR80AdMMHlAZ09nh\n\toxAw==","X-Gm-Message-State":"APjAAAV6kFicfPqr7vDBYr49sfvrPctwVr9iNeYenOT37BHWmcymWnZF\n\txrFFrnKHG3+0t5WAUUH+uRRtEAU6vME=","X-Google-Smtp-Source":"APXvYqwQf2kih7kei5PuqJJDSZABwtoxEzGfSqO9A5qZWfPlqqt9k/ehRjJwfMKpxFnWN3v07zPhLA==","X-Received":"by 2002:a05:6512:75:: with SMTP id\n\ti21mr7680152lfo.95.1568401611974; \n\tFri, 13 Sep 2019 12:06:51 -0700 (PDT)","Date":"Fri, 13 Sep 2019 21:06:51 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190913190651.GF12549@bigcity.dyn.berto.se>","References":"<20190913180132.31000-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190913180132.31000-1-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH] qcam: Fix compilation errors with\n\tgcc-9 and Qt < 5.13","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 13 Sep 2019 19:06:53 -0000"}}]