Created attachment 849550 [details] Failed Vala Build While reviewing a PR in ::gentoo I noticed that the software was unable to build with modern Clang due to the following: - [-Wint-conversion] - [-Wincompatible-function-pointer-types] I raised this issue with Vala upstream and was advised that it is likely a Vala bug and to raise an issue upstream: https://gitlab.gnome.org/GNOME/vala/-/issues/1407
This may be fixed by the dev-lang/vala-0.56.4 bump today.
Can confirm that both `net-im/dino` and `app-editors/zile` still fail to build. Both fail with `error: incompatible function pointer types`
This is what I am doing until the upstream bug gets fixed : # diff -u /mnt/repos/{gentoo,fixes}/eclass/vala.eclass --- /mnt/repos/gentoo/eclass/vala.eclass 2023-03-26 08:27:04.386773000 -0400 +++ /mnt/repos/fixes/eclass/vala.eclass 2023-06-04 10:08:32.206192000 -0400 @@ -22,6 +22,8 @@ if [[ -z ${_VALA_ECLASS} ]] ; then _VALA_ECLASS=1 +inherit flag-o-matic + # @ECLASS_VARIABLE: VALA_MIN_API_VERSION # @DESCRIPTION: # Minimum vala API version (e.g. 0.56). @@ -169,6 +171,9 @@ done : "${PKG_CONFIG_PATH:="${EPREFIX}/usr/$(get_libdir)/pkgconfig:${EPREFIX}/usr/share/pkgconfig"}" export PKG_CONFIG_PATH="${T}/pkgconfig:${PKG_CONFIG_PATH}" + + # Workaround for https://gitlab.gnome.org/GNOME/vala/-/issues/1408 + append-cflags -Wno-incompatible-function-pointer-types } # @FUNCTION: vala_src_prepare
(In reply to cyrillic from comment #3) > This is what I am doing until the upstream bug gets fixed : > Heh, I was putting off finding a way to get Vala to emit diff. flags or something, forgot we could do it in the eclass. This is good enough for now.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a834d5d13cdaea1cd1755c88ab35adc49f9a454 commit 7a834d5d13cdaea1cd1755c88ab35adc49f9a454 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-06-06 07:21:32 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-06 07:22:24 +0000 vala.eclass: workaround Vala breakage with Clang 16 Conditionally pass -Wno-incompatible-function-pointer-types for now in vala_setup until Vala itself is fixed. While this will affect other stuff in the same package, it's limited to when Vala is enabled, so it's better than before at least. Right now, the situation is both difficult for users & also blocks further testing. Thanks to cyrillic for the nudge. Bug: https://bugs.gentoo.org/892708 Signed-off-by: Sam James <sam@gentoo.org> eclass/vala.eclass | 6 ++++++ 1 file changed, 6 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe21d4ec04889a3019dea71ffd69b31825dc394 commit 5fe21d4ec04889a3019dea71ffd69b31825dc394 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-12-04 07:12:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-12-04 07:32:13 +0000 vala.eclass: adapt modern c workaround for gcc GCC doesn't have -Wincompatible-function-pointer-types, just -Wincompatible-pointer-types, and it makes the latter fatal in GCC 14. Just adapt the workaround to use that for now until Vala is fixed properly upstream. Bug: https://bugs.gentoo.org/892708 Signed-off-by: Sam James <sam@gentoo.org> eclass/vala.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Created attachment 878669 [details] build.log using gcc 14 Fails on GCC 14 as well valacodecontext.c:2669:33: error: assignment to 'gchar **' {aka 'char **'} from incompatible pointer type 'const gchar * const*' {aka 'const char * const*'} [-Wincompatible-pointer-types] 2669 | _tmp4_ = _tmp3_ = g_get_system_data_dirs (); | ^ valacodecontext.c:2700:33: error: assignment to 'gchar **' {aka 'char **'} from incompatible pointer type 'const gchar * const*' {aka 'const char * const*'} [-Wincompatible-pointer-types] 2700 | _tmp9_ = _tmp8_ = g_get_system_data_dirs (); | ^ $ gcc-config -l ... [3] x86_64-pc-linux-gnu-13 [4] x86_64-pc-linux-gnu-14 *
*** Bug 919710 has been marked as a duplicate of this bug. ***