GNOME Bugzilla – Bug 752265
Implement CPU usage reader and fix ctags problem on FreeBSD
Last modified: 2015-07-21 06:09:17 UTC
After contrib/rg is added, gnome-builder no longer builds on FreeBSD because CPU usage reader is not implmented. I will attach 3 patches here to implment it and fix other issues.
Created attachment 307292 [details] [review] rg: implement CPU usage reader for FreeBSD
Created attachment 307293 [details] [review] build: don't use unknown warning options when compiling with clang Clang usually doesn't show error when unknown warning options are used. In order to check whether clang really supports a warning options, we have to add -Werror=unknown-warning-option. This commit is based on ax_compiler_flags_cflags.m4, which already does the check to prevent useless warnings when compiling with clang.
Created attachment 307294 [details] [review] libide: find Exuberant ctags via configure instead of hard-coding ctags libide/ctags/ide-ctags-builder.c uses many Exuberant ctags features and arguments, which are not supported by other ctags implementations, such as BSD ctags and Emacs ctags. In order to make gnome-builder work without user configurations, we check several names of Exuberant ctags when running configure to set the correct default value for several systems, including Debian(ctags-exuberant), FreeBSD(exctags), OpenBSD(ectags).
Thanks for doing this! I need a few more days to review things (limited access to internet for a few more days). I pushed some big changes to master, so we'll need to rebase these. I'd be happy to do that, but will have to wait until I have a day with dedicated access to internet) :) If you find time to rebase, that'd be appreciated, but not required.
Created attachment 307376 [details] [review] rg: implement CPU usage reader for FreeBSD
Created attachment 307377 [details] [review] build: don't use unknown warning options when compiling with clang Clang usually doesn't show error when unknown warning options are used. In order to check whether clang really supports a warning options, we have to add -Werror=unknown-warning-option. This commit is based on ax_compiler_flags_cflags.m4, which already does the check to prevent useless warnings when compiling with clang.
Created attachment 307378 [details] [review] libide: find Exuberant ctags via configure instead of hard-coding ctags libide/ctags/ide-ctags-builder.c uses many Exuberant ctags features and arguments, which are not supported by other ctags implementations, such as BSD ctags and Emacs ctags. In order to make gnome-builder work without user configurations, we check several names of Exuberant ctags when running configure to set the correct default value for several systems, including Debian(ctags-exuberant), FreeBSD(exctags), OpenBSD(ectags).
Created attachment 307379 [details] [review] build: Add missing CLANG_CFLAGS for plugins/clang
There are still some problems when I try to use it. If I try to open libgxps project, it shows this message and exits. Its path in recent-projects.xbel is /home/lantw44/tmp/libgxps/configure.ac, which does not exist. gb-greeter-window[406998128]: WARNING: No implementations of extension point. I find my XDG_DOWNLOAD_DIR is also listed in recent projects, but clicking it causes segfault.
+ Trace 235256
In frame #1, the value of str1_norm is "buubdinfou\001\001\001\001iunm", and str2_norm is a null pointer.
Created attachment 307414 [details] [review] project-tree: use strcmp instead of g_utf8_collate to compare collation keys It seems it is possible for g_utf8_collate_key_for_filename() to return an invalid UTF-8 string, which causes crashes in g_utf8_collate() because the string cannot be normalized. According to the documentation of g_utf8_collate_key_for_filename(), we should just use strcmp() to compare its return value.
Thanks for taking care of this! So glad we have your contributions to keep this up to date.
(In reply to Ting-Wei Lan from comment #6) > Clang usually doesn't show error when unknown warning options are used. > In order to check whether clang really supports a warning options, we > have to add -Werror=unknown-warning-option. Can we avoid needing this workaround by switching to the recommended AX_COMPILER_FLAGS macro instead?
Yes, AX_COMPILER_FLAGS uses the same check to prevent useless warnings.