kraj / meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
MIT License
155 stars 198 forks source link

gtk4: Compile with gcc for musl/x86_64 #922

Closed kraj closed 6 months ago

kraj commented 6 months ago

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_booleanvar, 9); if ((weak_pointer) == ((void)0)) G_PASTE (_g_booleanvar, 9) = 1; else G_PASTE (_g_booleanvar, 9) = 0; GPASTE ( g_booleanvar, 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_booleanvar, 9); if ((weak_pointer) == ((void)0)) G_PASTE (_g_booleanvar, 9) = 1; else G_PASTE (_g_booleanvar, 9) = 0; G_PASTE (_g_booleanvar, 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" )


Contributor checklist

Reviewer Guidelines