GNOME Builder fails with: "Error: module ModemManager: Child process exited with code 2"
The project fails to build with GNOME Builder. These are the last lines of the build log:
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from ../libmm-glib/mm-common-helpers.h:18,
from ../libmm-glib/libmm-glib.h:60,
from cinterion/mm-modem-helpers-cinterion.c:26:
cinterion/mm-modem-helpers-cinterion.c: In function ‘mm_cinterion_parse_smong_response’:
/usr/include/glib-2.0/glib/gmacros.h:1223:10: error: ‘regex’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
1223 | { if (_ptr) (cleanup) ((ParentName *) _ptr); } \
| ^
cinterion/mm-modem-helpers-cinterion.c:981:28: note: ‘regex’ was declared here
981 | g_autoptr(GRegex) regex;
| ^~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:4457: cinterion/libhelpers_cinterion_la-mm-modem-helpers-cinterion.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f huawei/.deps/libhelpers_huawei_la-mm-modem-helpers-huawei.Tpo huawei/.deps/libhelpers_huawei_la-mm-modem-helpers-huawei.Plo
mv -f huawei/.deps/libhelpers_huawei_la-mm-huawei-enums-types.Tpo huawei/.deps/libhelpers_huawei_la-mm-huawei-enums-types.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -DMM_MODULE_NAME=\"linktop\" -fno-strict-aliasing -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-cast-function-type -Wno-packed -Wno-error=cast-function-type -Wno-error=packed -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_DISABLE_DEPRECATION_WARNINGS -I/app/include/gudev-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPKGDATADIR=\"/app/share/ModemManager\" -I.. -I../src -I../src -I../src/kerneldevice -I../include -I../include -I../libmm-glib -I../libmm-glib/generated -I../libmm-glib/generated -DTESTUDEVRULESDIR_BROADMOBI=\"./broadmobi\" -DTESTUDEVRULESDIR_CINTERION=\"./cinterion\" -DTESTUDEVRULESDIR_DELL=\"./dell\" -DTESTUDEVRULESDIR_DLINK=\"./dlink\" -DTESTUDEVRULESDIR_FIBOCOM=\"./fibocom\" -DTESTUDEVRULESDIR_FOXCONN=\"./foxconn\" -DTESTKEYFILE_FOXCONN=\"./foxconn/mm-foxconn-carrier-mapping.conf\" -DTESTUDEVRULESDIR_GOSUNCN=\"./gosuncn\" -DTESTUDEVRULESDIR_HAIER=\"./haier\" -DTESTUDEVRULESDIR_HUAWEI=\"./huawei\" -DTESTUDEVRULESDIR_LONGCHEER=\"./longcheer\" -DTESTUDEVRULESDIR_MBM=\"./mbm\" -DTESTUDEVRULESDIR_MTK=\"./mtk\" -DTESTUDEVRULESDIR_NOKIA_ICERA=\"./nokia\" -DTESTUDEVRULESDIR_QUECTEL=\"./quectel\" -DTESTUDEVRULESDIR_SIMTECH=\"./simtech\" -DTESTUDEVRULESDIR_TELIT=\"./telit\" -DTESTUDEVRULESDIR_TPLINK=\"./tplink\" -DTESTUDEVRULESDIR_X22X=\"./x22x\" -DTESTUDEVRULESDIR_ZTE=\"./zte\" -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -std=gnu89 -MT linktop/libhelpers_linktop_la-mm-modem-helpers-linktop.lo -MD -MP -MF linktop/.deps/libhelpers_linktop_la-mm-modem-helpers-linktop.Tpo -c linktop/mm-modem-helpers-linktop.c -fPIC -DPIC -o linktop/.libs/libhelpers_linktop_la-mm-modem-helpers-linktop.o
mv -f linktop/.deps/libhelpers_linktop_la-mm-modem-helpers-linktop.Tpo linktop/.deps/libhelpers_linktop_la-mm-modem-helpers-linktop.Plo
make[3]: Leaving directory '/run/build/ModemManager/plugins'
make[2]: *** [Makefile:3226: all] Error 2
make[2]: Leaving directory '/run/build/ModemManager/plugins'
make[1]: *** [Makefile:522: all-recursive] Error 1
make[1]: Leaving directory '/run/build/ModemManager'
make: *** [Makefile:452: all] Error 2
Error: module ModemManager: Child process exited with code 2
Steps to reproduce:
- Open the project in GNOME Builder (Flatpak version)
- Click the Run button and wait for the compilation process to fail
Actually, the build fails even before compiling ModemManager, but I submitted !997 (merged) to fix that.
I am using Fedora 34 Workstation.
Edited by 1pav