Bug 3528 - glib check needs to be improved
Summary: glib check needs to be improved
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.12.0
Hardware: Macintosh All
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2015-09-30 12:50 UTC by Hanspeter Niederstrasser
Modified: 2015-10-01 17:29 UTC (History)
0 users

See Also:


Attachments

Description Hanspeter Niederstrasser 2015-09-30 12:50:54 UTC
./configure checks for glib >= 2.20. However, the code uses GStatBuf, which is from glib2 >= 2.24 or .26 (not sure).  I have 2.22.4, and claws-mail FTBFS like this:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../intl -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -DLOCALEDIR=\"/sw/share/locale\" -DPLUGINDIR=\"/sw/lib/claws-mail/plugins/\" -DDATAROOTDIR=\"/sw/share\" -DDESKTOPFILEPATH=\"/sw/share/applications/claws-mail.desktop\" -DGTK_DISABLE_DEPRECATED -I/sw/include -I/sw/include -g -O2 -Wno-unused-function -Wno-pointer-sign -Wall -no-cpp-precomp -fno-common -I/sw/include/enchant -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -MT socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c  -fno-common -DPIC -o .libs/socket.o
socket.c:221:2: error: use of undeclared identifier 'GStatBuf'
        GStatBuf s;
        ^
socket.c:228:34: error: use of undeclared identifier 's'
        if (g_stat("/etc/resolv.conf", &s) == 0) {
                                        ^
socket.c:229:7: error: use of undeclared identifier 's'
                if (s.st_mtime > resolv_conf_changed) {
                    ^
socket.c:230:26: error: use of undeclared identifier 's'
                        resolv_conf_changed = s.st_mtime;
                                              ^
4 errors generated.

Either the necessary version of glib2 must be bumped, or the code in socket.c needs to be put inside a #ifdef.

GStatBuf is also used in another 28 files.

claws-mail-3.11.1 built fine on this system.
Comment 1 Andrej Kacian 2015-09-30 13:35:07 UTC
I think this has already been fixed after the release, see http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=aab231b16fd07a9196fe882205658d33c78752d2
Comment 2 Ricardo Mones 2015-09-30 14:11:35 UTC
(In reply to comment #1)
> I think this has already been fixed after the release, see
> http://git.claws-mail.org/?p=claws.git;a=commitdiff;
> h=aab231b16fd07a9196fe882205658d33c78752d2

Umm, according glib's history GStatBuf didn't exist until 2.25.7:
https://github.com/GNOME/glib/commit/1229281d95802c4c190284c7d331f67194a2553e

(I wonder if it's not easier just to require glib 2.26 on configure.ac and get rid of that patch...)
Comment 3 Hanspeter Niederstrasser 2015-10-01 11:44:31 UTC
(In reply to comment #1)
> I think this has already been fixed after the release, see
> http://git.claws-mail.org/?p=claws.git;a=commitdiff;
> h=aab231b16fd07a9196fe882205658d33c78752d2

That did indeed take care of the problem.  Sorry about the noise.

Note You need to log in before you can comment on or make changes to this bug.