Huawei ME909s-120 modem goes offline and disappears

Bruno Vetter bruno.vetter at outlook.com
Tue Jan 7 19:06:41 UTC 2020


Happy new year.

> Would you be able to test these two patches in the following MR?

I follow your gitlab-ci.yml in order to build for RPi.

While building libmbim I get the following error. This alignment issue (cast increases required alignment of target type) seems to occur often in projects built on ARM while building them on AMD64 is no problem. Any suggestions?

Other than that I need to figure out how to install MM on the target device where MM is already installed. Can I install MM and its libraries in a different location and run from there? How would I have to parametrize .configure etc.?

Bruno

root at 9d52738:/tmp/mm# balena-engine build .
Sending build context to Docker daemon   2.56kB
Step 1/5 : FROM gcc
 ---> b821fe8b6a0f
Step 2/5 : RUN apt update || true
 ---> Using cache
 ---> ef2c0ac3f021
Step 3/5 : RUN apt -y install autoconf automake libtool libglib2.0-dev libgudev-1.0-dev libgettextpo-dev autopoint xsltproc dbus autoconf-archive gettext
 ---> Using cache
 ---> a1a672c07c25
Step 4/5 : RUN apt -y install gtk-doc-tools libglib2.0-doc gobject-introspection libgirepository1.0-dev libsystemd-dev libpolkit-gobject-1-dev valac
 ---> Using cache
 ---> 5696a8893105
Step 5/5 : RUN git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git &&     cd libmbim &&     NOCONFIGURE=1 ./autogen.sh &&     ./configure --prefix=/tmp/usr &&     make &&     make install
 ---> Running in ca0e4dedc491
Cloning into 'libmbim'...
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4

autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:38: installing './compile'
configure.ac:44: installing './config.guess'
configure.ac:44: installing './config.sub'
configure.ac:29: installing './install-sh'
configure.ac:29: installing './missing'
Makefile.am: installing './INSTALL'
src/common/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether C compiler accepts -Werror=unknown-warning-option... no
checking whether C compiler accepts -Wno-suggest-attribute=format... yes
checking whether C compiler accepts -fno-strict-aliasing... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wredundant-decls... yes
checking whether C compiler accepts -Wno-unused-parameter... yes
checking whether C compiler accepts -Wno-missing-field-initializers... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wcast-align... yes
checking whether C compiler accepts -Wformat-nonliteral... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wstrict-aliasing... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Winline... yes
checking whether C compiler accepts -Wpacked... yes
checking whether C compiler accepts -Wmissing-format-attribute... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wredundant-decls... (cached) yes
checking whether C compiler accepts -Wmissing-include-dirs... yes
checking whether C compiler accepts -Wunused-but-set-variable... yes
checking whether C compiler accepts -Warray-bounds... yes
checking whether C compiler accepts -Wreturn-type... yes
checking whether C compiler accepts -Wswitch-enum... yes
checking whether C compiler accepts -Wswitch-default... yes
checking whether C compiler accepts -Wduplicated-cond... yes
checking whether C compiler accepts -Wduplicated-branches... yes
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wrestrict... yes
checking whether C compiler accepts -Wnull-dereference... yes
checking whether C compiler accepts -Wdouble-promotion... yes
checking whether C compiler accepts -Wnested-externs... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wstrict-prototypes... yes
checking whether C compiler accepts -Wdeclaration-after-statement... yes
checking whether C compiler accepts -Wimplicit-function-declaration... yes
checking whether C compiler accepts -Wold-style-definition... yes
checking whether C compiler accepts -Wjump-misses-init... yes
checking whether C compiler accepts -Wno-suggest-attribute=format... yes
checking whether C compiler accepts -Wno-error=unused-parameter... yes
checking whether C compiler accepts -Wno-error=missing-field-initializers... yes
checking whether C compiler accepts -Werror=unknown-warning-option... (cached) no
checking whether the linker accepts -Wl,--as-needed... yes
checking whether the linker accepts -Wl,--as-needed... yes
checking whether the linker accepts -Wl,-z,relro... yes
checking whether the linker accepts -Wl,-z,relro... yes
checking whether the linker accepts -Wl,-z,now... yes
checking whether the linker accepts -Wl,-z,now... yes
checking whether the linker accepts -Wl,-z,noexecstack... yes
checking whether the linker accepts -Wl,-z,noexecstack... yes
checking whether the linker accepts -Wl,--no-as-needed... yes
checking whether the linker accepts -Wl,--fatal-warnings... yes
checking whether the linker accepts -Wl,-fatal_warnings... no
checking whether the linker accepts -Wl,--no-as-needed... yes
checking whether the linker accepts -Wl,--fatal-warnings... yes
checking whether C compiler accepts -Werror=unknown-warning-option... (cached) no
checking whether C compiler accepts -Wno-suggest-attribute=format... (cached) yes
checking whether C compiler accepts -fno-strict-aliasing... (cached) yes
checking whether C compiler accepts -Wall... (cached) yes
checking whether C compiler accepts -Wextra... (cached) yes
checking whether C compiler accepts -Wundef... (cached) yes
checking whether C compiler accepts -Wwrite-strings... (cached) yes
checking whether C compiler accepts -Wpointer-arith... (cached) yes
checking whether C compiler accepts -Wmissing-declarations... (cached) yes
checking whether C compiler accepts -Wredundant-decls... (cached) yes
checking whether C compiler accepts -Wno-unused-parameter... (cached) yes
checking whether C compiler accepts -Wno-missing-field-initializers... (cached) yes
checking whether C compiler accepts -Wformat=2... (cached) yes
checking whether C compiler accepts -Wcast-align... (cached) yes
checking whether C compiler accepts -Wformat-nonliteral... (cached) yes
checking whether C compiler accepts -Wformat-security... (cached) yes
checking whether C compiler accepts -Wsign-compare... (cached) yes
checking whether C compiler accepts -Wstrict-aliasing... (cached) yes
checking whether C compiler accepts -Wshadow... (cached) yes
checking whether C compiler accepts -Winline... (cached) yes
checking whether C compiler accepts -Wpacked... (cached) yes
checking whether C compiler accepts -Wmissing-format-attribute... (cached) yes
checking whether C compiler accepts -Wmissing-noreturn... (cached) yes
checking whether C compiler accepts -Winit-self... (cached) yes
checking whether C compiler accepts -Wredundant-decls... (cached) yes
checking whether C compiler accepts -Wmissing-include-dirs... (cached) yes
checking whether C compiler accepts -Wunused-but-set-variable... (cached) yes
checking whether C compiler accepts -Warray-bounds... (cached) yes
checking whether C compiler accepts -Wreturn-type... (cached) yes
checking whether C compiler accepts -Wswitch-enum... (cached) yes
checking whether C compiler accepts -Wswitch-default... (cached) yes
checking whether C compiler accepts -Wduplicated-cond... (cached) yes
checking whether C compiler accepts -Wduplicated-branches... (cached) yes
checking whether C compiler accepts -Wlogical-op... (cached) yes
checking whether C compiler accepts -Wrestrict... (cached) yes
checking whether C compiler accepts -Wnull-dereference... (cached) yes
checking whether C compiler accepts -Wdouble-promotion... (cached) yes
checking whether C compiler accepts -Wno-cast-function-type... yes
checking whether C compiler accepts -Wno-packed... yes
checking whether C compiler accepts -Wnested-externs... (cached) yes
checking whether C compiler accepts -Wmissing-prototypes... (cached) yes
checking whether C compiler accepts -Wstrict-prototypes... (cached) yes
checking whether C compiler accepts -Wdeclaration-after-statement... (cached) yes
checking whether C compiler accepts -Wimplicit-function-declaration... (cached) yes
checking whether C compiler accepts -Wold-style-definition... (cached) yes
checking whether C compiler accepts -Wjump-misses-init... (cached) yes
checking whether C compiler accepts -Wno-suggest-attribute=format... (cached) yes
checking whether C compiler accepts -Wno-error=unused-parameter... (cached) yes
checking whether C compiler accepts -Wno-error=missing-field-initializers... (cached) yes
checking whether C compiler accepts -Wno-error=cast-function-type... yes
checking whether C compiler accepts -Wno-error=packed... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MBIM_COMMON... yes
checking for LIBMBIM_GLIB... yes
checking for MBIMCLI... yes
checking for MBIMPROXY... yes
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for gtk-doc... yes
checking for gtkdoc-check... gtkdoc-check.test
checking for gtkdoc-check... /usr/bin/gtkdoc-check
checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... no
checking for GTKDOC_DEPS... yes
checking for GUDEV... yes
checking for help2man... false
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating build-aux/Makefile
config.status: creating build-aux/templates/Makefile
config.status: creating build-aux/mbim-codegen/Makefile
config.status: creating data/Makefile
config.status: creating data/pkg-config/Makefile
config.status: creating data/pkg-config/mbim-glib.pc
config.status: creating src/Makefile
config.status: creating src/common/Makefile
config.status: creating src/common/test/Makefile
config.status: creating src/libmbim-glib/Makefile
config.status: creating src/libmbim-glib/mbim-version.h
config.status: creating src/libmbim-glib/generated/Makefile
config.status: creating src/libmbim-glib/test/Makefile
config.status: creating src/mbimcli/Makefile
config.status: creating src/mbim-proxy/Makefile
config.status: creating utils/Makefile
config.status: creating docs/Makefile
config.status: creating docs/reference/Makefile
config.status: creating docs/reference/libmbim-glib/Makefile
config.status: creating docs/reference/libmbim-glib/version.xml
config.status: creating docs/man/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

    libmbim 1.21.0
    ==============================================

    Build:
      compiler:             gcc
      cflags:               -g -O2 -std=gnu89
      ldflags:
      warn cflags:          -fno-strict-aliasing -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 -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init -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
      warn ldflags:         -Wl,--no-as-needed -Wl,--fatal-warnings
      Maintainer mode:      yes
      Documentation:        no

    System paths:
      prefix:               /tmp/usr
      udev base directory:  /lib/udev

    Features:
      udev support:         yes
      MBIM username:        no (root)

make  all-recursive
make[1]: Entering directory '/libmbim'
Making all in .
make[2]: Entering directory '/libmbim'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/libmbim'
Making all in build-aux
make[2]: Entering directory '/libmbim/build-aux'
Making all in templates
make[3]: Entering directory '/libmbim/build-aux/templates'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/libmbim/build-aux/templates'
Making all in mbim-codegen
make[3]: Entering directory '/libmbim/build-aux/mbim-codegen'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/libmbim/build-aux/mbim-codegen'
make[3]: Entering directory '/libmbim/build-aux'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/libmbim/build-aux'
make[2]: Leaving directory '/libmbim/build-aux'
Making all in data
make[2]: Entering directory '/libmbim/data'
Making all in .
make[3]: Entering directory '/libmbim/data'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/libmbim/data'
Making all in pkg-config
make[3]: Entering directory '/libmbim/data/pkg-config'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/libmbim/data/pkg-config'
make[2]: Leaving directory '/libmbim/data'
Making all in src
make[2]: Entering directory '/libmbim/src'
Making all in common
make[3]: Entering directory '/libmbim/src/common'
Making all in .
make[4]: Entering directory '/libmbim/src/common'
  CC       libmbim_common_la-mbim-common.lo
  CCLD     libmbim-common.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[4]: Leaving directory '/libmbim/src/common'
Making all in test
make[4]: Entering directory '/libmbim/src/common/test'
  CC       test_common-test-common.o
  CCLD     test-common
make[4]: Leaving directory '/libmbim/src/common/test'
make[3]: Leaving directory '/libmbim/src/common'
Making all in libmbim-glib
make[3]: Entering directory '/libmbim/src/libmbim-glib'
Making all in generated
make[4]: Entering directory '/libmbim/src/libmbim-glib/generated'
  GEN      mbim-error-types.h
  GEN      mbim-enum-types.h
  GEN      mbim-basic-connect.h
  GEN      mbim-sms.h
  GEN      mbim-ussd.h
  GEN      mbim-auth.h
  GEN      mbim-phonebook.h
  GEN      mbim-stk.h
  GEN      mbim-dss.h
  GEN      mbim-ms-firmware-id.h
  GEN      mbim-ms-host-shutdown.h
  GEN      mbim-proxy-control.h
  GEN      mbim-qmi.h
  GEN      mbim-atds.h
  GEN      mbim-intel-firmware-update.h
  GEN      mbim-ms-basic-connect-extensions.h
  GEN      mbim-error-types.c
  GEN      mbim-error-quarks.c
  GEN      mbim-enum-types.c
make  all-am
make[5]: Entering directory '/libmbim/src/libmbim-glib/generated'
  CC       libmbim_glib_generated_la-mbim-error-types.lo
  CC       libmbim_glib_generated_la-mbim-error-quarks.lo
  CC       libmbim_glib_generated_la-mbim-enum-types.lo
  CC       libmbim_glib_generated_la-mbim-basic-connect.lo
  CC       libmbim_glib_generated_la-mbim-sms.lo
  CC       libmbim_glib_generated_la-mbim-ussd.lo
  CC       libmbim_glib_generated_la-mbim-auth.lo
  CC       libmbim_glib_generated_la-mbim-phonebook.lo
  CC       libmbim_glib_generated_la-mbim-stk.lo
  CC       libmbim_glib_generated_la-mbim-dss.lo
  CC       libmbim_glib_generated_la-mbim-ms-firmware-id.lo
  CC       libmbim_glib_generated_la-mbim-ms-host-shutdown.lo
  CC       libmbim_glib_generated_la-mbim-proxy-control.lo
  CC       libmbim_glib_generated_la-mbim-qmi.lo
  CC       libmbim_glib_generated_la-mbim-atds.lo
  CC       libmbim_glib_generated_la-mbim-intel-firmware-update.lo
  CC       libmbim_glib_generated_la-mbim-ms-basic-connect-extensions.lo
  CCLD     libmbim-glib-generated.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[5]: Leaving directory '/libmbim/src/libmbim-glib/generated'
make[4]: Leaving directory '/libmbim/src/libmbim-glib/generated'
Making all in .
make[4]: Entering directory '/libmbim/src/libmbim-glib'
  CC       libmbim_glib_core_la-mbim-utils.lo
  CC       libmbim_glib_core_la-mbim-uuid.lo
  CC       libmbim_glib_core_la-mbim-cid.lo
  CC       libmbim_glib_core_la-mbim-message.lo
mbim-message.c: In function '_mbim_struct_builder_complete':
mbim-message.c:800:24: error: cast increases required alignment of target type [-Werror=cast-align]
  800 |         offset_value = (guint32 *) &builder->fixed_buffer->data[offset_offset];
      |                        ^
cc1: all warnings being treated as errors
make[4]: *** [Makefile:652: libmbim_glib_core_la-mbim-message.lo] Error 1
make[4]: Leaving directory '/libmbim/src/libmbim-glib'
make[3]: *** [Makefile:720: all-recursive] Error 1
make[2]: *** [Makefile:392: all-recursive] Error 1
make[1]: *** [Makefile:447: all-recursive] Error 1
make: *** [Makefile:379: all] Error 2
make[3]: Leaving directory '/libmbim/src/libmbim-glib'
make[2]: Leaving directory '/libmbim/src'
make[1]: Leaving directory '/libmbim'
The command '/bin/sh -c git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git &&     cd libmbim &&     NOCONFIGURE=1 ./autogen.sh &&     ./configure --prefix=/tmp/usr &&     make &&     make install' returned a non-zero code: 2

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200107/208e45a8/attachment-0001.htm>


More information about the ModemManager-devel mailing list