After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749138 - Compilation with clang fails
Compilation with clang fails
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-05-08 20:17 UTC by jutaky
Modified: 2015-05-12 02:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make -k's stderr (138.75 KB, text/plain)
2015-05-09 17:48 UTC, jutaky
Details

Description jutaky 2015-05-08 20:17:34 UTC
Compilation with clang (3.6.0) fails with the following message:

analysis-frequency.c:155:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
                        dao_set_cell_printf (dao, col, 1, format, col);
                                                          ^~~~~~

Identical compilation settings with gcc without "export CC=/usr/bin/clang" works.

(11:09:10 PM) jean: Jutaky, that's because we use a glib macro which apprently does not supports clang, bt only gcc
(11:10:22 PM) jean: please file a bug report
Comment 1 Jean Bréfort 2015-05-09 05:10:39 UTC
This happens because the G_GNUC_PRINTF macro does not support clang. The solution insid this macro is supposed to work as well with clang.
Comment 2 Morten Welinder 2015-05-09 14:30:28 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.


If there are more, we will need a more general approach.
Comment 3 jutaky 2015-05-09 14:57:36 UTC
Next one would be:

analysis-histogram.c:329:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
                        dao_set_cell_printf (dao, col, 1, format, col - to_col);
                                                          ^~~~~~
Comment 4 Morten Welinder 2015-05-09 16:11:13 UTC
can you try a "make -k" to see how many we're talking about?
Comment 5 jutaky 2015-05-09 17:48:26 UTC
Created attachment 303154 [details]
make -k's stderr
Comment 6 Morten Welinder 2015-05-12 02:12:46 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.