Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892708 - dev-lang/vala: build failures
Summary: dev-lang/vala: build failures
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 919710 (view as bug list)
Depends on:
Blocks: c99-porting 881209 885711 887187 894328 895846 895884 895886 895888 895894
  Show dependency tree
 
Reported: 2023-01-31 11:07 UTC by Matt Jolly
Modified: 2023-12-13 00:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Failed Vala Build (VALACusrbinvalac-0-HWITM.txt,7.87 KB, text/plain)
2023-01-31 11:07 UTC, Matt Jolly
Details
build.log using gcc 14 (build.log,134.50 KB, text/plain)
2023-12-11 15:54 UTC, Christopher Fore
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2023-01-31 11:07:10 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-12 01:03:37 UTC
This may be fixed by the dev-lang/vala-0.56.4 bump today.
Comment 2 Matt Jolly gentoo-dev 2023-02-12 05:59:16 UTC
Can confirm that both `net-im/dino` and `app-editors/zile` still fail to build.

Both fail with `error: incompatible function pointer types`
Comment 3 cyrillic 2023-06-04 22:31:09 UTC
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
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-06 07:19:35 UTC
(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.
Comment 5 Larry the Git Cow gentoo-dev 2023-06-06 07:22:45 UTC
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(+)
Comment 6 Larry the Git Cow gentoo-dev 2023-12-04 07:32:50 UTC
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(-)
Comment 7 Christopher Fore 2023-12-11 15:54:15 UTC
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 *
Comment 8 Christopher Fore 2023-12-11 15:54:57 UTC
*** Bug 919710 has been marked as a duplicate of this bug. ***