elementary / files

File browser designed for elementary OS
https://elementary.io
GNU General Public License v3.0
323 stars 75 forks source link

Build Failures #2439

Closed SolarAquarion closed 1 month ago

SolarAquarion commented 4 months ago

What Happened?

Build failure while trying to build the version from git

Steps to Reproduce

Download the git?

Expected Behavior

Successful build from git?

OS Version

Other Linux

Software Version

Compiled from git

Log Output

329/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkListBox.c.o
FAILED: src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkListBox.c.o 
cc -Isrc/io.elementary.files.p -Isrc -I../pantheon-files/src -Ilibcore -I../pantheon-files/libcore -I. -I../pantheon-files -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gee-0.8 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/cloudproviders -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/granite -I/usr/include/libhandy-1 -I/usr/include/zeitgeist-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch '-DGETTEXT_PACKAGE="io.elementary.files"' -DHANDY_USE_UNSTABLE_API -w -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/pantheon-files-git/src=/usr/src/debug/pantheon-files-git -flto=auto -fPIE -pthread -D_REENTRANT -MD -MQ src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkListBox.c.o -MF src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkListBox.c.o.d -o src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkListBox.c.o -c src/io.elementary.files.p/View/Sidebar/BookmarkListBox.c
src/io.elementary.files.p/View/Sidebar/BookmarkListBox.c: In function ‘sidebar_bookmark_list_box_constructor’:
src/io.elementary.files.p/View/Sidebar/BookmarkListBox.c:1198:9: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_list_box’; did you mean ‘sidebar_sidebar_list_interface_get_list_box’? [-Wimplicit-function-declaration]
 1198 |         sidebar_sidebar_list_interface_set_list_box ((SidebarSidebarListInterface*) self, _tmp1_);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         sidebar_sidebar_list_interface_get_list_box
src/io.elementary.files.p/View/Sidebar/BookmarkListBox.c: In function ‘_vala_sidebar_bookmark_list_box_set_property’:
src/io.elementary.files.p/View/Sidebar/BookmarkListBox.c:1329:17: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_sidebar’; did you mean ‘sidebar_sidebar_list_interface_get_sidebar’? [-Wimplicit-function-declaration]
 1329 |                 sidebar_sidebar_list_interface_set_sidebar ((SidebarSidebarListInterface*) self, g_value_get_object (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_list_interface_get_sidebar
[330/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Window.c.o
[331/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkRow.c.o
FAILED: src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkRow.c.o 
cc -Isrc/io.elementary.files.p -Isrc -I../pantheon-files/src -Ilibcore -I../pantheon-files/libcore -I. -I../pantheon-files -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gee-0.8 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/cloudproviders -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/granite -I/usr/include/libhandy-1 -I/usr/include/zeitgeist-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch '-DGETTEXT_PACKAGE="io.elementary.files"' -DHANDY_USE_UNSTABLE_API -w -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/pantheon-files-git/src=/usr/src/debug/pantheon-files-git -flto=auto -fPIE -pthread -D_REENTRANT -MD -MQ src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkRow.c.o -MF src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkRow.c.o.d -o src/io.elementary.files.p/meson-generated_View_Sidebar_BookmarkRow.c.o -c src/io.elementary.files.p/View/Sidebar/BookmarkRow.c
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c: In function ‘sidebar_bookmark_row_constructor’:
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c:2312:9: error: implicit declaration of function ‘sidebar_sidebar_item_interface_set_id’; did you mean ‘sidebar_sidebar_item_interface_get_id’? [-Wimplicit-function-declaration]
 2312 |         sidebar_sidebar_item_interface_set_id ((SidebarSidebarItemInterface*) self, sidebar_sidebar_item_interface_get_next_item_id ());
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         sidebar_sidebar_item_interface_get_id
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c: In function ‘_vala_sidebar_bookmark_row_set_property’:
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c:2666:17: error: implicit declaration of function ‘sidebar_sidebar_item_interface_set_list’; did you mean ‘sidebar_sidebar_item_interface_get_list’? [-Wimplicit-function-declaration]
 2666 |                 sidebar_sidebar_item_interface_set_list ((SidebarSidebarItemInterface*) self, g_value_get_object (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_item_interface_get_list
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c:2678:17: error: implicit declaration of function ‘sidebar_sidebar_item_interface_set_pinned’; did you mean ‘sidebar_sidebar_item_interface_get_pinned’? [-Wimplicit-function-declaration]
 2678 |                 sidebar_sidebar_item_interface_set_pinned ((SidebarSidebarItemInterface*) self, g_value_get_boolean (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_item_interface_get_pinned
src/io.elementary.files.p/View/Sidebar/BookmarkRow.c:2681:17: error: implicit declaration of function ‘sidebar_sidebar_item_interface_set_permanent’; did you mean ‘sidebar_sidebar_item_interface_get_permanent’? [-Wimplicit-function-declaration]
 2681 |                 sidebar_sidebar_item_interface_set_permanent ((SidebarSidebarItemInterface*) self, g_value_get_boolean (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_item_interface_get_permanent
[332/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_DeviceListBox.c.o
FAILED: src/io.elementary.files.p/meson-generated_View_Sidebar_DeviceListBox.c.o 
cc -Isrc/io.elementary.files.p -Isrc -I../pantheon-files/src -Ilibcore -I../pantheon-files/libcore -I. -I../pantheon-files -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gee-0.8 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/cloudproviders -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/granite -I/usr/include/libhandy-1 -I/usr/include/zeitgeist-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch '-DGETTEXT_PACKAGE="io.elementary.files"' -DHANDY_USE_UNSTABLE_API -w -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/pantheon-files-git/src=/usr/src/debug/pantheon-files-git -flto=auto -fPIE -pthread -D_REENTRANT -MD -MQ src/io.elementary.files.p/meson-generated_View_Sidebar_DeviceListBox.c.o -MF src/io.elementary.files.p/meson-generated_View_Sidebar_DeviceListBox.c.o.d -o src/io.elementary.files.p/meson-generated_View_Sidebar_DeviceListBox.c.o -c src/io.elementary.files.p/View/Sidebar/DeviceListBox.c
src/io.elementary.files.p/View/Sidebar/DeviceListBox.c: In function ‘sidebar_device_list_box_constructor’:
src/io.elementary.files.p/View/Sidebar/DeviceListBox.c:1246:9: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_list_box’; did you mean ‘sidebar_sidebar_list_interface_get_list_box’? [-Wimplicit-function-declaration]
 1246 |         sidebar_sidebar_list_interface_set_list_box ((SidebarSidebarListInterface*) self, _tmp1_);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         sidebar_sidebar_list_interface_get_list_box
src/io.elementary.files.p/View/Sidebar/DeviceListBox.c: In function ‘_vala_sidebar_device_list_box_set_property’:
src/io.elementary.files.p/View/Sidebar/DeviceListBox.c:1375:17: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_sidebar’; did you mean ‘sidebar_sidebar_list_interface_get_sidebar’? [-Wimplicit-function-declaration]
 1375 |                 sidebar_sidebar_list_interface_set_sidebar ((SidebarSidebarListInterface*) self, g_value_get_object (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_list_interface_get_sidebar
[333/354] Compiling C object src/io.elementary.files.p/meson-generated_View_AbstractDirectoryView.c.o
[334/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_AbstractMountableRow.c.o
[335/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkListBox.c.o
FAILED: src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkListBox.c.o 
cc -Isrc/io.elementary.files.p -Isrc -I../pantheon-files/src -Ilibcore -I../pantheon-files/libcore -I. -I../pantheon-files -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/gee-0.8 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/cloudproviders -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/granite -I/usr/include/libhandy-1 -I/usr/include/zeitgeist-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch '-DGETTEXT_PACKAGE="io.elementary.files"' -DHANDY_USE_UNSTABLE_API -w -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/pantheon-files-git/src=/usr/src/debug/pantheon-files-git -flto=auto -fPIE -pthread -D_REENTRANT -MD -MQ src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkListBox.c.o -MF src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkListBox.c.o.d -o src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkListBox.c.o -c src/io.elementary.files.p/View/Sidebar/NetworkListBox.c
src/io.elementary.files.p/View/Sidebar/NetworkListBox.c: In function ‘sidebar_network_list_box_constructor’:
src/io.elementary.files.p/View/Sidebar/NetworkListBox.c:734:9: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_list_box’; did you mean ‘sidebar_sidebar_list_interface_get_list_box’? [-Wimplicit-function-declaration]
  734 |         sidebar_sidebar_list_interface_set_list_box ((SidebarSidebarListInterface*) self, _tmp1_);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         sidebar_sidebar_list_interface_get_list_box
src/io.elementary.files.p/View/Sidebar/NetworkListBox.c: In function ‘_vala_sidebar_network_list_box_set_property’:
src/io.elementary.files.p/View/Sidebar/NetworkListBox.c:857:17: error: implicit declaration of function ‘sidebar_sidebar_list_interface_set_sidebar’; did you mean ‘sidebar_sidebar_list_interface_get_sidebar’? [-Wimplicit-function-declaration]
  857 |                 sidebar_sidebar_list_interface_set_sidebar ((SidebarSidebarListInterface*) self, g_value_get_object (value));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 sidebar_sidebar_list_interface_get_sidebar
[336/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_DriveRow.c.o
[337/354] Linking target plugins/pantheon-files-cloud/libpantheon-files-cloudproviders.so
[338/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_NetworkRow.c.o
[339/354] Linking target plugins/pantheon-files-trash/libpantheon-files-trash.so
[340/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Widgets_SearchResults.c.o
[341/354] Linking target plugins/contractor/libpantheon-files-contractor.so
[342/354] Linking target libcore/tests/GOFFileTests/GOFFileTests
[343/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_SidebarWindow.c.o
[344/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_VolumeRow.c.o
[345/354] Linking target libcore/tests/MarlinIconInfoTests/MarlinIconInfoTests
[346/354] Compiling C object src/io.elementary.files.p/meson-generated_View_Sidebar_VolumelessMountRow.c.o
[347/354] Linking target libcore/tests/GOFDirectoryAsyncTests/GOFDirectoryAsyncTests
[348/354] Linking target libcore/tests/UtilTests/UtilTests
[349/354] Linking target plugins/pantheon-files-ctags/libpantheon-files-ctags.so
[350/354] Linking target pantheon-files-daemon/io.elementary.files-daemon
ninja: build stopped: subcommand failed.

Hardware Info

No response

jeremypw commented 3 months ago

What versions of valac and C compiler are you using? There seems to be a mismatch between the code the Vala compiler is producing and what the compiler is set to accept.

On elementary 7.1 (the current stable version) this is what is used:

C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
Vala compiler for the host machine: valac (valac 0.56.17)

and this produces no C compiler warnings on the current main source code.

meisenzahl commented 1 month ago

I get the same error messages under Fedora 40. meson outputs the following versions:

C compiler for the host machine: cc (gcc 14.0.1 “cc (GCC) 14.0.1 20240411 (Red Hat 14.0.1-0)”)
C linker for the host machine: cc ld.bfd 2.41-37
Vala compiler for the host machine: valac (valac 0.56.17)

Here is the full build log: https://github.com/meisenzahl/distro-agnostic/actions/runs/10476492737/job/29015506125?pr=23

@tintou do you know if it is somehow possible to fix the errors?

meisenzahl commented 1 month ago

@ryonakano could this be a similar problem to https://github.com/elementary/gala/pull/2045?

If so, could you perhaps provide some assistance to solve the problem?

jeremypw commented 1 month ago

The Files main branch is building on OS8 Early Access with these tools:

C compiler for the host machine: cc (gcc 13.2.0 "cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0")
C linker for the host machine: cc ld.bfd 2.42
Vala compiler for the host machine: valac (valac 0.56.17)

So it looks like an incompatibility with gcc 14 of some of the code generated by valac 0.56. If I can get gcc 14 installed on OS8 I'll see whether the code can be tweaked to produce compatible C code as was done with gala.

jeremypw commented 1 month ago

There are currently 8 non-fatal compiler warnings being generated on OS8. Should probably fix those first ...

jeremypw commented 1 month ago

I can confirm that the build fails on OS8 if CC=gcc-14 is specified.