Re: gtk+-2.8.6 link error I_ libgtk-x11-2.0.so (and now weeK_start in gtkcalendar.c)



Hi,
For all those following along (!) I've been able to make gtk+2.8.6.
The problem is within gtk/gtkcalendar.c.  On my initial efforts to make
the gtk+ package the compile croaked with an error on variable week_start
as undefined.  I looked around and saw mention of gtkcalendar.c cvs fix for
the problem. The version in the cvs tree is mentioned below. Ok, it fixed
the week_start error but introduced another undefined variable I_.
When no one on the list indicated that they knew about it I did a
find . -exec grep " I_" {} \; -ls in the gtk+ source tree and could only find
one file it was used in, gtkcalendar.c.  No definition and not defined in
any header files.
So, I went back to the original gtkcalendar.c file, the one with the week_start
error, and looked at it.  What I found was week_start is defined as a
structure member but in two places it was being used as a simple varstatic_string().iable.
I changed the code so that week_start was referenced thru the structure
pointer priv->week_start and altho there are still warnings in the file,
it compiled and all of gtk+2.8.6 compiled and linked and installed.
Did anyone make 2.8.6?  Is this a issue between linux and solaris?
I have no idea whether my made version of gtk+ works correctly as there
are a number of warnings, primarily of pointer refs, throughout the compile,
but hey!, who's quibbling...?
Any questions, comments let me know.
Tom


gtk/gtkcalander.c change start at line 667.
original lines are commented with orig: prefacing original line.


#else
  /* Translate to calendar:week_start:0 if you want Sunday to be the
   * first day of the week to calendar:week_start:1 if you want Monday
   * to be the first day of the week, and so on.
   */
  priv->week_start = _("calendar:week_start:0");

  /* orig: if (strncmp (week_start, "calendar:week_start:", 20) == 0) */
    /* priv->week_start = *(week_start + 20) - '0'; */
  if (strncmp (priv->week_start, "calendar:week_start:", 20) == 0)
    priv->week_start = (priv->week_start + 20) - '0';
  else
    priv->week_start = -1;

  if (priv->week_start < 0 || priv->week_start > 6)
    {
g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n");
      priv->week_start = 0;
    }
#endif




On Thu, 13 Oct 2005 15:13:15 -0700, Tom Crockett <tmc insular com> wrote:

Ok, something is borked, for sure. Thanks for the feedback. I don't know what. No one else has
indicated that they have run into this problem, so I'm working under the
assumption that it is in my environment.

First, however, there was a problem with gtkcalendar.c. The fix was a patched file (194) that I only found via a reference to gtk cvs in some googled list reference. That
fixed the initial problem I had with compiling gtk+.

So now, trying to take a hint that something was borked, I looked around and found a number of iterations of various gtk+ related libraries scattered around my system, i.e. static and shared libs in /usr/lib; /usr/local/lib and /opt/sfw/lib with dates going back to 2000. I removed the older instances and tried a make distclean,
configure., make and got, unfortunately,  the same result.

The msgs about multiple inclusions which are a warning, and then the
show stopper of the undefined symbol I_ in ./.libs/libgtk-x11-2.0.so which I
suspect at this point is a macro definition problem in some include file.
I saw a reference to some variable being defined to I_ to save space or for
claritiy. ..

---cvs info---
Log of /gtk+/gtk/gtkalignment.c

1.44 	View
Download
Annotate
	[select for diffs]
Diff to previous 1.43
	MAIN
   	6 weeks ago
Thu Sep 1 05:11:38 2005 UTC
Changes since 1.43: +1 -1 lines 	matthiasc 	
Log:

2005-09-01  Matthias Clasen  <mclasen redhat com>

         * gdk/*.c: Intern some more strings.
         * gtk/gtkintl.h:
         * gtk/*.c: Define an I_() macro and use it instead of the
         bulky g_intern_static_string().

---end cvs---

One or two character symbols are very difficult to grep for.

Who knows if this (or somewhere else like it) is what is causing the problem.
GTK+ is a very complex project made even more so with all of the external
project dependencies that are also in development.

Hopefully, this will help someone help me find where the borking has occurred.
Thanks, Tom


On Wed, 12 Oct 2005 21:48:49 -0700, <Valdis Kletniekso vt edu> wrote:

On Wed, 12 Oct 2005 21:16:09 PDT, Tom Crockett said:

/bin/bash ../libtool --mode=link gcc  -g -O2 -Wall    -o
gtk-query-immodules-2.0  queryimmodules.o libgtk-x11-2.0.la
../gdk-pixbuf/libgdk_pixbuf-2.0.la       ../gdk/libgdk-x11-2.0.la

Looks like a borked .la libtool file?  That might result in this:

gcc -g -O2 -Wall -o .libs/gtk-query-immodules-2.0 queryimmodules.o
./.libs/libgtk-x11-2.0.so -L/usr/local/lib /usr4/src/gtk+-2.8.6/gdk/.libs/libgdk-x11-2.0.so -L/usr/openwin/lib
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/lib/libatk-1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so
../gdk/.libs/libgdk-x11-2.0.so -lXext /usr/local/lib/libpangocairo-1.0.so
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Not sure why both of these got specified, because apparently they're two
different references to the same file:

ld: warning: file ../gdk/.libs/libgdk-x11-2.0.so: linked to
/usr4/src/gtk+-2.8.6/gdk/.libs/libgdk-x11-2.0.so: attempted multiple inclusion of file

(And the same issue applies to:)

ld: warning: file /usr4/src/gtk+-2.8.6/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so: linked to ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so: attempted multiple inclusion of file

Undefined                       first referenced
  symbol                             in file
I_                                  ./.libs/libgtk-x11-2.0.so
ld: fatal: Symbol referencing errors. No output written to

This looks like pre-processor borkage of some sort. Looks like something
was supposed to be substituted and it failed to happen...



_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list



--
------------------------------------------------------------------------------------
Tom Crockett             tmc insular com                    '92 VFR750F
Ramona, CA              url:http://www.insular.com/tmc
Insular Realities        Unix, C, Ingres, internet programming
Cole's Axiom:  The sum of the intelligence on the planet is a
constant; the population is growing.
------------------------------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]