Bug 46481 - colord 0.1.17 fails to compile undefined reference to g_mapped_file_new_from_fd
Summary: colord 0.1.17 fails to compile undefined reference to g_mapped_file_new_from_fd
Status: RESOLVED FIXED
Alias: None
Product: colord
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 13:49 UTC by Ionut Biru
Modified: 2012-02-23 02:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ionut Biru 2012-02-22 13:49:58 UTC
http://gitorious.org/colord/master/commit/1094fb00ea300122fbb2182be543e6b6790d28d4

introduced g_mapped_file_new_from_fd. This is available in glib 2.31.x and configure.ac wasn't bumped.
Comment 1 Ionut Biru 2012-02-22 13:51:22 UTC
cd-profile.c: In function 'cd_profile_set_fd':
cd-profile.c:1069:2: warning: implicit declaration of function 'g_mapped_file_new_from_fd' [-Wimplicit-function-declaration]
cd-profile.c:1069:20: warning: assignment makes pointer from integer without a cast [enabled by default]
  CC     colord-cd-main.o
  CC     colord-cd-sensor-client.o
  CC     colord-cd-udev-client.o
  CCLD   colord
colord-cd-profile.o: In function `cd_profile_set_fd':
cd-profile.c:(.text+0x16d5): undefined reference to `g_mapped_file_new_from_fd'
collect2: ld returned 1 exit status
Comment 2 Richard Hughes 2012-02-23 02:36:57 UTC
(In reply to comment #0)
> http://gitorious.org/colord/master/commit/1094fb00ea300122fbb2182be543e6b6790d28d4
> 
> introduced g_mapped_file_new_from_fd. This is available in glib 2.31.x and
> configure.ac wasn't bumped.

Ohh, uncool. In the gtk-doc markup it said that it was available in 2.30, fixed:

commit eece6cb9c33dbbc30e6a71e09f699fe1ab6fdff3
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Feb 23 10:34:46 2012 +0000

    Fix up 'Since:' for g_mapped_file_new_from_fd()
    
    It was introduced in 2.31.0, not 2.30.x

I'll now add the #ifdefs to avoid adding the configure.ac bump.
Comment 3 Richard Hughes 2012-02-23 02:45:30 UTC
commit 638a98fef16fa15946522d4112660b4b20c0d630
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Feb 23 10:43:37 2012 +0000

    trivial: Fix compile with older versions of GLib
    
    g_mapped_file_new_from_fd() was introduced in 2.31.0 not 2.30.0 as the
    docs suggested.
    
    Resoves https://bugs.freedesktop.org/show_bug.cgi?id=46481


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.