After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732791 - Multiple and conflicting definitions of mm_manager_new
Multiple and conflicting definitions of mm_manager_new
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-06 04:09 UTC by Michael Biebl
Modified: 2014-07-09 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Biebl 2014-07-06 04:09:13 UTC
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749387

During a rebuild of all packages in a clean sid chroot (and cowbuilder+pbuilder)
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

[...]
  CCLD     ModemManager

error: conflicting function declarations "mm_manager_new"
old definition in module main file mm-manager.h line 48
MMManager * (struct _GDBusConnection *connection, struct _GError **error)
new definition in module mm-manager file mm-manager.c line 164
void (struct _GDBusConnection *connection, int flags, struct _GCancellable *cancellable, void (*callback)(struct _GObject *source_object, struct _GAsyncResult *res, void *user_data), void *user_data)
Makefile:812: recipe for target 'ModemManager' failed
make[4]: *** [ModemManager] Error 64
make[4]: Leaving directory '/srv/jenkins-slave/workspace/sid-goto-cc-modemmanager/modemmanager-1.0.0/src'
Makefile:1637: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1

It seems the declaration (being seen by main) refers to a different definition.
Compare these two definition of mm_manager_new, both of which will be seen by
the linker it seems:

http://sources.debian.net/src/modemmanager/1.0.0-4/src/mm-manager.c?hl=679#L679
http://sources.debian.net/src/modemmanager/1.0.0-4/libmm-glib/mm-manager.c?hl=146#L146

As the linker does bother about types, it is going to choose whichever it sees
first. Good luck!
Comment 1 Aleksander Morgado 2014-07-06 11:13:41 UTC
Yeah, same mixup as in this upstream-tracker report:
http://upstream-tracker.org/compat_reports/modemmanager/1.2.0_to_current/abi_compat_report.html#High_Risk_Problems

Renaming the internal object would do the trick, without breaking API in the libmm-glib side.
Comment 2 Aleksander Morgado 2014-07-06 15:04:24 UTC
Michael, could you try that same compilation with the new 'aleksander/base-object-renames' branch from upstream ModemManager git?
http://cgit.freedesktop.org/ModemManager/ModemManager/
Comment 3 Michael Biebl 2014-07-06 20:19:20 UTC
Hi Aleksander!

(In reply to comment #2)
> Michael, could you try that same compilation with the new
> 'aleksander/base-object-renames' branch from upstream ModemManager git?
> http://cgit.freedesktop.org/ModemManager/ModemManager/

I didn't test-build that branch but the changes certainly look like they will fix this issue. Thanks!
Comment 4 Aleksander Morgado 2014-07-09 09:52:53 UTC
Pushed to git master; please reopen if I missed anything.