RE: glib 1.2.10 compile problem?
- From: Xu Qiang <Qiang Xu fujixerox com>
- To: Jean Bréfort <jean brefort normalesup org>, Xu Qiang <Qiang Xu fujixerox com>
- Cc: gtk-list gnome org
- Subject: RE: glib 1.2.10 compile problem?
- Date: Thu, 5 May 2005 15:31:12 +0800
Jean Bréfort wrote:
> Apply this patch (found in Gentoo) to glib-1.2.10.
Thank you, Jean. It works!
Btw, Google helped me found another solution:
http://bugzilla.gnome.org/show_bug.cgi?id=141281
http://cvs.openpkg.org/chngview?cn=16208
For your convenience, I briefly list the code here:
----------------------------------------------------------------------------
+ GCC 3.4 and higher treats __FUNCTION__ and similar special compiler
+ symbols as variables instead of macros. This means they no longer can
+ be concatenated directly with string literals. Unfortunately, GLIB uses
+ them in this way, so we have to disable this use with GCC 3.4 or higher.
+
+ Index: glib.h
+ --- glib.h.orig 2001-02-27 04:44:38.000000000 +0100
+ +++ glib.h 2004-04-28 10:24:56.000000000 +0200
+ @@ -272,7 +272,7 @@
+ /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
+ * macros, so we can refer to them as strings unconditionally.
+ */
+ -#ifdef __GNUC__
+ +#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+ #define G_GNUC_FUNCTION __FUNCTION__
+ #define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
+ #else /* !__GNUC__ */
----------------------------------------------------------------------------
Both methods work perfectly, Thanks.
Now I met another problem: although there is no error now, a warning is harassing me:
*** Warning: the command libtool uses to detect shared libraries,
*** /usr/bin/file, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool gnu org
I don't know what these words exactly mean, and can I ignore it? I don't know what
my libtool version is (inborn with the OS - FreeBSD 5.3). How to check the version of
libtool? I am not sure whether I should upgrade this library to the newest one. :(
Regards,
Xu Qiang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]