Skip to content

Commit

Permalink
gtk4: Compile with gcc for musl/x86_64
Browse files Browse the repository at this point in the history
There is a gir generation error when compiled with clang

| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/recipe-sysroot/usr/include/glib-2.0/gobject/gobject.h:822: syntax error, unexpected INTEGER, expecting identifier in '  do
 { if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 9); if ((weak_pointer) == ((void*)0)) G_PASTE (_g_boolean_var_, 9) = 1; else G_PASTE (_g_boolean_var_, 9) = 0; G_PASTE (_
g_boolean_var_, 9); }), 1)) ; else g_assertion_message (((gchar*) 0), "/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/recipe-sysroot/usr/include/glib-2.0/gobject/gobject.h
", 822, ((const char*) (__func__)), "'" "weak_pointer" "' should be NULL"); } while (0);' at '9'
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/recipe-sysroot/usr/include/glib-2.0/gobject/gobject.h:822: syntax error, unexpected ')', expecting identifier or '(' in '
 do { if (__builtin_expect (__extension__ ({ int G_PASTE (_g_boolean_var_, 9); if ((weak_pointer) == ((void*)0)) G_PASTE (_g_boolean_var_, 9) = 1; else G_PASTE (_g_boolean_var_, 9) = 0; G_PASTE
 (_g_boolean_var_, 9); }), 1)) ; else g_assertion_message (((gchar*) 0), "/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/recipe-sysroot/usr/include/glib-2.0/gobject/gobjec
t.h", 822, ((const char*) (__func__)), "'" "weak_pointer" "' should be NULL"); } while (0);' at ')'
| Error relocating /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/build/gtk/libgtk-4.so.1: unsupported relocation type 37
| Error relocating /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/build/gtk/libgtk-4.so.1: unsupported relocation type 37
| Error relocating /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/gtk4/4.12.5/build/gtk/libgtk-4.so.1: unsupported relocation type 37
| If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help.
| (typically like this: GIR_EXTRA_LIBS_PATH="${B}/something/.libs" )

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Mar 18, 2024
1 parent 03130b5 commit 6d98192
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conf/nonclangable.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# https://github.com/llvm/llvm-project/issues/78337
TOOLCHAIN:pn-kernel-selftest = "gcc"

# x86_64/musl build fails with
# gtk4/4.12.5/build/gtk/libgtk-4.so.1: unsupported relocation type 37
TOOLCHAIN:pn-gtk4:libc-musl:x86-64 = "gcc"

TOOLCHAIN:pn-cpufrequtils = "gcc"

TOOLCHAIN:pn-grub:genericx86-64 = "gcc"
Expand Down

0 comments on commit 6d98192

Please sign in to comment.