Adding a ModemManager package
I'm trying to add a ModemManager package. While building, I'm getting this error during the installation step: "/usr/lib/libgcc_s.so: file not
recognized: File format not recognized". This looks like it's looking at my host's libgcc_s.so instead of the target's version. If that's the case I'm not sure why or how to fix it. I did have to use autogen.sh to create the configure script and lots of other stuff; I did this on my host system, so I'm not sure if that is affecting it.
Below is a larger part of the output for context.
CCLD libmm-glib.la
make[4]: Entering directory `/home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libmm-glib'
/usr/bin/mkdir -p
'/home/shawn/projects/fx/buildroot-modemmanager/output/target/usr/lib'
/usr/bin/mkdir -p
'/home/shawn/projects/fx/buildroot-modemmanager/output/target/usr/include/libmm-glib'
/bin/sh ../libtool --mode=install /usr/bin/install -c libmm-glib.la
'/home/shawn/projects/fx/buildroot-modemmanager/output/target/usr/lib'
/usr/bin/install -c -m 644 libmm-glib.h mm-manager.h mm-object.hmm-modem.h mm-modem-3gpp.h mm-modem-3gpp-ussd.h mm-modem-cdma.hmm-modem-messaging.h mm-modem-location.h mm-modem-time.hmm-modem-firmware.h mm-modem-simple.h mm-sim.h mm-sms.h mm-bearer.hmm-simple-status.h mm-simple-connect-properties.h mm-bearer-properties.h mm-sms-properties.h mm-bearer-ip-config.h mm-location-common.hmm-location-3gpp.h mm-location-gps-nmea.h mm-location-gps-raw.hmm-location-cdma-bs.h mm-unlock-retries.h mm-network-timezone.hmm-firmware-properties.h '/home/shawn/projects/fx/buildroot-modemmanager/output/target/usr/include/libmm-glib'
libtool: install: warning: relinking `libmm-glib.la'
libtool: install: (cd /home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libmm-glib; /bin/sh /home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libtool --silent --tag CC --mode=relink /home/shawn/projects/fx/buildroot-modemmanager/output/host/usr/bin/arm-unknown-linux-gnueabi-gcc -Wall -Werror -std=gnu89 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -ggdb -Os -Wmissing-declarations
-Wmissing-prototypes -Wdeclaration-after-statement -Wno-unused-parameter
-Wno-sign-compare -fno-strict-aliasing -Wno-deprecated-declarations -Wno-unused-but-set-variable -o libmm-glib.la -rpath /usr/lib
libmm_glib_la-mm-manager.lo libmm_glib_la-mm-object.lo
libmm_glib_la-mm-modem.lo libmm_glib_la-mm-modem-3gpp.lo libmm_glib_la-mm-modem-3gpp-ussd.lo libmm_glib_la-mm-modem-cdma.lo libmm_glib_la-mm-modem-simple.lo libmm_glib_la-mm-modem-location.lo libmm_glib_la-mm-modem-time.lo libmm_glib_la-mm-modem-firmware.lo
libmm_glib_la-mm-sim.lo libmm_glib_la-mm-sms.lo
libmm_glib_la-mm-modem-messaging.lo libmm_glib_la-mm-bearer.lo libmm_glib_la-mm-common-helpers.lo libmm_glib_la-mm-simple-status.lo libmm_glib_la-mm-simple-connect-properties.lo
libmm_glib_la-mm-bearer-properties.lo libmm_glib_la-mm-sms-properties.lo libmm_glib_la-mm-bearer-ip-config.lo libmm_glib_la-mm-location-3gpp.lo libmm_glib_la-mm-location-gps-raw.lo
libmm_glib_la-mm-location-gps-nmea.lo
libmm_glib_la-mm-location-cdma-bs.lo libmm_glib_la-mm-unlock-retries.lo libmm_glib_la-mm-network-timezone.lo
libmm_glib_la-mm-firmware-properties.lo
../libmm-glib/generated/libmm-generated.la -lgio-2.0 -lgobject-2.0 -L/home/shawn/projects/fx/buildroot-modemmanager/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib -lglib-2.0 -inst-prefix-dir/home/shawn/projects/fx/buildroot-modemmanager/output/target)/usr/lib/libgcc_s.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
libtool: install: error: relink `libmm-glib.la' with the above command
before installing it
make[4]: *** [install-libLTLIBRARIES] Error 1
make[4]: Leaving directory `/home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libmm-glib' make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libmm-glib' make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/libmm-glib' make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/shawn/projects/all-projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990'
make: *** [/home/shawn/projects/fx/buildroot-modemmanager/output/build/modem-manager-0.7.990/.stamp_target_installed] Error 2
Dear Shawn J. Goff,
Quoted 7 lines · Shawn J. Goff
I'm trying to add a ModemManager package. While building, I'm getting this error during the installation step: "
/usr/lib/libgcc_s.so: file not
recognized: File format not recognized". This looks like it's looking at my host's libgcc_s.so instead of the target's version. If that's the case I'm not sure why or how to fix it. I did have to useautogen.shto create the configure script and lots of other stuff; I did this on my host system, so I'm not sure if that is affecting it.
Could you post the in-progress patch you have to add the modem-manager package? This would allow us to check for potential suspicious things in the .mk file, and if nothing suspicious shows up, to try and reproduce the issue.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 10 lines · Thomas Petazzoni
Dear Shawn J. Goff,
Quoted 7 lines · Shawn J. Goff
I'm trying to add a ModemManager package. While building, I'm getting this error during the installation step: "
/usr/lib/libgcc_s.so: file not
recognized: File format not recognized". This looks like it's looking at my host's libgcc_s.so instead of the target's version. If that's the case I'm not sure why or how to fix it. I did have to useautogen.shto create the configure script and lots of other stuff; I did this on my host system, so I'm not sure if that is affecting it.
Quoted 8 lines
Could you post the in-progress patch you have to add the modem-manager package? This would allow us to check for potential suspicious things in the .mk file, and if nothing suspicious shows up, to try and reproduce the issue.
Thanks!
Thomas
Sure, here's a patch. udev was disabling gudev; for now, I had to remove
that part because the default configuration of ModemManager seems to
require it. I don't have a patch for the autogen-created files yet. I
run make, then go to the build directory and run "NOCONFIGURE=yes
./autogen.sh", then go back and continue running make.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ModemManager-initial-package-addition.patch
Type: text/x-patch
Size: 3149 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130217/066dc0c9/attachment.bin>
Dear Shawn J. Goff,
Quoted 1 line · Shawn J. Goff
Sure, here's a patch. udev was disabling gudev; for now, I had to remove
If you read the udev.mk, you see that gudev is disabled unless BR2_PACKAGE_UDEV_ALL_EXTRAS is enabled. And your package selects it, so it should "just" work.
Quoted 4 lines
that part because the default configuration of ModemManager seems to require it. I don't have a patch for the autogen-created files yet. I run make, then go to the build directory and run "NOCONFIGURE=yes ./autogen.sh", then go back and continue running make.
Use MODEM_MANAGER_AUTORECONF = YES instead.
I don't have the time to try and reproduce the problem right now, but hopefully someone else will have a look.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 7 lines · Shawn J. Goff
I'm trying to add a ModemManager package. While building, I'm getting this error during the installation step: "
/usr/lib/libgcc_s.so: file not
recognized: File format not recognized". This looks like it's looking at my host's libgcc_s.so instead of the target's version. If that's the case I'm not sure why or how to fix it. I did have to useautogen.shto create the configure script and lots of other stuff; I did this on my host system, so I'm not sure if that is affecting it.
Hi Shawn,
I haven't been able to reproduce your issue because your patch didn't
include the libqmi package. However, it is very well possible that the issue is caused by running 'autogen.sh'. Is it possible that the libtool patch doesn't get applied? I see that libtool adds "-rpath /usr/lib" to the link command, and I believe the libtool patch removes exactly that.
To create configure properly, you need to set _AUTORECONF to YES, as
mentioned by Thomas. Unfortunately, that is not so easy...
- modem-manager uses gettext macros provided by the gettext package, so you need to add host-gettext to the dependencies. But host-gettext doesn't exist yet - I'll send a patch to add it.
- modem-manager requires gtkdocize to be run. We certainly don't want to add gtkdocize to buildroot. But since it just generates two files for a total of 350 lines, it's easy to add that with a package patch.
Hopefully this will help you to solve the problem.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 gettext: add host-gettext
From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
host-gettext is required for the autotools macros used by modem-manager.
---
I noticed that gettext uses ncurses if available, but there is no dependency or --disable in the .mk file...
--- package/gettext/gettext.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
package/gettext/gettext.mk +14 -0
@@ -55,4 +55,18 @@ endef GETTEXT_POST_PATCH_HOOKS += GETTEXT_DISABLE_TOOLS GETTEXT_POST_PATCH_HOOKS += GETTEXT_DISABLE_TESTS +HOST_GETTEXT_CONF_OPT += \ + --disable-libasprintf \ + --disable-acl \ + --disable-openmp \ + --disable-rpath \ + --disable-java \ + --disable-native-java \ + --disable-csharp \ + --disable-relocatable \ + --without-emacs \ + --disable-nls \ + --disable-curses + $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.7.10.4
Quoted 11 lines · Arnout Vandecappelle
Quoted 9 lines · Shawn J. Goff
I'm trying to add a ModemManager package. While building, I'm getting this error during the installation step: "
/usr/lib/libgcc_s.so: file not
recognized: File format not recognized". This looks like it's looking at my host's libgcc_s.so instead of the target's version. If that's the case
I'm not sure why or how to fix it. I did have to useautogen.shto create
the configure script and lots of other stuff; I did this on my host system, so I'm not sure if that is affecting it.
Quoted 4 lines
Hi Shawn,
I haven't been able to reproduce your issue because your patch didn't
include the libqmi package.
Oops... forgot about that. I've been sitting on that patch because libqmi v1.0 has some bugs that have been fixed, but they haven't set a version number since then, so it's just got a sha for the version number. I'll go ahead and submit that, though.
Quoted 8 lines
However, it is very well possible that the issue is caused by running '
autogen.sh'. Is it possible that the libtool patch doesn't get applied? I see that libtool adds "-rpath/usr/lib" to the link command, and I believe the libtool patch removes exactly that.To create configure properly, you need to set
_AUTORECONFto YES, as
mentioned by Thomas. Unfortunately, that is not so easy...
Yes - I noticed :-)
Quoted 4 lines
- modem-manager uses gettext macros provided by the gettext package, so you need to add host-gettext to the dependencies. But host-gettext doesn't exist yet - I'll send a patch to add it.
Awesome.
Quoted 3 lines
- modem-manager requires gtkdocize to be run. We certainly don't want to add gtkdocize to buildroot. But since it just generates two files for a total of 350 lines, it's easy to add that with a package patch.
Yes, actually, I do that with libqmi, so I'm familiar with that.
Quoted 5 lines
Hopefully this will help you to solve the problem.
Regards,
Arnout