Bug 28448 - make fails in glib/demo/main.c:164 error: ‘GFile’ undeclared (first use in this function)
Summary: make fails in glib/demo/main.c:164 error: ‘GFile’ undeclared (first use in th...
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium minor
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 09:11 UTC by Ryan P. Kelly
Modified: 2010-06-09 00:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch fixes compile error (225 bytes, application/octet-stream)
2010-06-08 09:11 UTC, Ryan P. Kelly
Details

Description Ryan P. Kelly 2010-06-08 09:11:22 UTC
Created attachment 36153 [details]
patch fixes compile error

How to reproduce:
1) wget "http://poppler.freedesktop.org/poppler-0.12.4.tar.gz"
2) tar -xzf poppler-0.12.4.tar.gz
3) cd poppler-0.12.4
4) ./configure
5) make

make should fail trying to compile the fail main.c in glib/demo/main.c at line 164:

#if GLIB_CHECK_VERSION (2,15,0)
    GFile *file;

    file = g_file_new_for_commandline_arg (argv[1]);
    uri = g_file_get_uri (file);
    g_object_unref (file);
#else

apt-cache showpkg libglib2.0-0 shows 2.16.6-0ubuntu1.2 to be the version number of GLib, which is why it is inside the #if block. Compilation fails with:

main.c: In function ‘main’:
main.c:164: error: ‘GFile’ undeclared (first use in this function)
main.c:164: error: (Each undeclared identifier is reported only once
main.c:164: error: for each function it appears in.)
main.c:164: error: ‘file’ undeclared (first use in this function)
main.c:166: warning: implicit declaration of function ‘g_file_new_for_commandline_arg’
main.c:167: warning: implicit declaration of function ‘g_file_get_uri’
main.c:167: warning: assignment makes pointer from integer without a cast

If I remove the #if block with the attached patch, it compiles fine.
Comment 1 Carlos Garcia Campos 2010-06-09 00:48:07 UTC
Thanks for the patch, but this has been already fixed in our git repository.


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.