|Summary:||warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option]|
|Product:||Mesa||Reporter:||Vinson Lee <vlee>|
|Status:||RESOLVED FIXED||QA Contact:||mesa-dev|
|i915 platform:||i915 features:|
|Bug Depends on:|
Description Vinson Lee 2018-09-27 03:01:32 UTC
These warning messages are appearing with clang. warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option] Introduced with this commit. commit 97ae5a858d2a2da9144ea9793b67b360a3a7c5fa Author: Eric Engestrom <firstname.lastname@example.org> Date: Fri Sep 21 11:42:38 2018 +0100 meson+autotools: get rid of spammy GCC warning -Wformat-truncation That warning fires every time a string function takes an argument that could possibly be longer than its max output, which triggers all over the place, especially when working with file paths ("what if every file path is MAX_PATH long?" is what GCC is saying, which is really annoying when we *know* that "/dev/dri/cardN" is not gonna be 4096 char long and it's safe to store it in a 32-char array). Anyway, we either add a ton of dead code all over the place to make GCC happy, or we get rid of its spam. I chose the latter. Signed-off-by: Eric Engestrom <email@example.com> Reviewed-by: Emil Velikov <firstname.lastname@example.org>
Comment 1 Illia Iorin 2018-09-27 11:35:35 UTC
I haven't got this warning at this commit. I used these meson parameters: 1. meson -Dbuildtype=debug -Dvalgrind=false -Ddri-drivers=i965 -Dgallium-drivers= -Dvulkan-drivers= -Dgallium-omx="disabled" -Dplatforms=x11,drm,surfaceless -Dtools=intel ./mbuild64/ 2. meson -Dbuildtype=realese -Dvalgrind=false -Ddri-drivers=i965 -Dgallium-drivers= -Dvulkan-drivers= -Dgallium-omx="disabled" -Dplatforms=x11,drm,surfaceless -Dtools=intel ./mbuild64/ clang version is 6.0 Could you please provide command line by which you run meson, and your clang version.
Comment 2 Vinson Lee 2018-09-28 03:02:08 UTC
The warnings appear with autotools. ./autogen.sh --disable-egl --with-dri-drivers=swrast --with-gallium-drivers=swrast --with-platforms=x11 $ clang --version Apple LLVM version 10.0.0 (clang-1000.10.44.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Comment 3 Illia Iorin 2018-10-01 10:58:23 UTC
Created attachment 141819 [details] [review] workaround I've got this warning, and another one: warning: unknown warning option '-Wno-override-init'; did you mean '-Wno-override-module'? [-Wunknown-warning-option] It looks like the reason of problem is "AX_CHECK_COMPILE_FLAG". There is need ed to report problem to their bug tracer. I've wrote workaround for this issue which hides the problem, until this problem will be fixed in autoconf.
Comment 4 Eric Engestrom 2018-10-01 11:55:58 UTC
(In reply to Illia from comment #3) > I've wrote workaround for > this issue which hides the problem, until this problem will be fixed in > autoconf. You can't have any logic based on the value of $CC (or $CXX), because `gcc` might be a symlink to `clang` (as is the case by default on MacOS for instance, but I've seen it on Linux as well), and users also use it to add compiler flags. As for the issue, do you guys see the same warning for any other -Wno-foo from our list? I'm 90% sure this is NOTOURBUG as we're already doing all the checks needed, but I want to figure out if it's clang or autotools going bad. Vinson, can you also try meson on your system? It would help narrow down the issue. (I've also checked that there's no typo in the configure.ac check, just in case, and there isn't)
Comment 5 Vinson Lee 2018-10-01 20:21:55 UTC
The warning messages do not appear with meson.
Comment 6 Vinson Lee 2018-10-04 18:48:52 UTC
These warnings also appear with Intel C Compiler. icc: command line warning #10148: option '-Wno-format-truncation' not supported
Comment 7 Dylan Baker 2018-10-24 16:15:45 UTC
We're not going to track down every ICC unsupported argument warning, ICC is very spammy about unsupported arguments, and getting compiler checks to work with ICC is a huge pain. As long as they're just warnings lets not worry about them. As an aside, I'm trying to get ICC in shape for meson, and there are lots of annoying "helpful" features in that compiler. Hopeuflly it'll be basically working by meson 0.49.0.