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 781254 - Fix build with GMime 3.0
Fix build with GMime 3.0
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
Depends on:
Blocks:
 
 
Reported: 2017-04-13 09:57 UTC by Emmanuele Bassi (:ebassi)
Modified: 2017-04-13 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow detecting the GMime API we are building against (1.80 KB, patch)
2017-04-13 09:57 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
Fix build with GMime 3.0 (1.33 KB, patch)
2017-04-13 09:58 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
Prefer GMime 3.0 instead of GMime 2.6 (1.15 KB, patch)
2017-04-13 10:00 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
build: Allow detecting the GMime API we are building against (1.81 KB, patch)
2017-04-13 10:28 UTC, Bastien Nocera
committed Details | Review
build: Fix build with GMime 3.0 (1.30 KB, patch)
2017-04-13 10:28 UTC, Bastien Nocera
committed Details | Review
build: Prefer GMime 3.0 instead of GMime 2.6 (1.16 KB, patch)
2017-04-13 10:28 UTC, Bastien Nocera
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2017-04-13 09:57:55 UTC
This is breaking the build in GNOME Continuous.

GMime 3.0 has a different API in master, as expected for a major version bump.

Grilo-plugins depends on totem-pl-parser and gmime; as of commit https://git.gnome.org/browse/grilo-plugins/commit/?id=4329dda2c53f9a7bd2a3f6dd9334d4eb5207e9fd, grilo-plugins
*only* support gmime-3.0.

Totem-pl-parser, on the other hand, builds with GMime 2.6 by default, if found on the system, and then falls back to GMime 3.0. This means that totem-pl-parser will build
correctly, but break the build of totem-pl-parser, since you cannot depend on both gmime 2.6 and gmime 3.0 without symbol/type collisions.
Comment 1 Emmanuele Bassi (:ebassi) 2017-04-13 09:57:58 UTC
Created attachment 349774 [details] [review]
Allow detecting the GMime API we are building against

Since we support GMime 2.6 and 3.0, and there are going to be API
differences between the two, we will need a way to check which version
of GMime we are building against from inside the code.
Comment 2 Emmanuele Bassi (:ebassi) 2017-04-13 09:58:03 UTC
Created attachment 349775 [details] [review]
Fix build with GMime 3.0

The g_mime_utils_header_decode_date() function changed in GMime 3.0: it
now takes a single argument, and generates a GDateTime instead of a Unix
timestamp.
Comment 3 Emmanuele Bassi (:ebassi) 2017-04-13 10:00:07 UTC
Created attachment 349776 [details] [review]
Prefer GMime 3.0 instead of GMime 2.6
Comment 4 Bastien Nocera 2017-04-13 10:28:09 UTC
Created attachment 349781 [details] [review]
build: Allow detecting the GMime API we are building against

Since we support GMime 2.6 and 3.0, and there are going to be API
differences between the two, we will need a way to check which version
of GMime we are building against from inside the code.
Comment 5 Bastien Nocera 2017-04-13 10:28:14 UTC
Created attachment 349782 [details] [review]
build: Fix build with GMime 3.0

The g_mime_utils_header_decode_date() function changed in GMime 3.0: it
now takes a single argument, and generates a GDateTime instead of a Unix
timestamp.
Comment 6 Bastien Nocera 2017-04-13 10:28:20 UTC
Created attachment 349783 [details] [review]
build: Prefer GMime 3.0 instead of GMime 2.6
Comment 7 Bastien Nocera 2017-04-13 10:31:29 UTC
All pushed. I fixed the typo in the first commit, and added a return check to the GMime 3.0 API use.

Attachment 349781 [details] pushed as 972138e - build: Allow detecting the GMime API we are building against
Attachment 349782 [details] pushed as 08f6a2f - build: Fix build with GMime 3.0
Attachment 349783 [details] pushed as cb34f1e - build: Prefer GMime 3.0 instead of GMime 2.6