Using glib(c) and gtk+ in Cygwin

Jonas Jensen bones0_list@hotmail.com
Tue Jun 27 15:32:00 GMT 2000


> Check in config.log and the other config.* log files and
> see if you see any obvious errors around the tests for
> GLIB.
Well, here's a dump from config.log...

You seem to reply to my messages before I even write them :-), would you mind
contacting me over ICQ?

61422551

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
configure:4263: checking for glib-config
configure:4298: checking for GLIB - version >= 1.2.8
configure:4397: gcc -o
conftest -g -O2 -Wall -I/usr/local/lib/glib/include -I/usr/local/include
conftest.c -L/usr/local/lib -lgmodule -lgthread -lglib   1>&5
In file included from configure:4323:
/usr/local/include/glib.h:543: Invalid token in expression
configure: failed program was:
#line 4321 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>
#include <stdlib.h>

int
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.glibtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("1.2.8");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "1.2.8");
     exit(1);
   }

  if ((glib_major_version != 1) ||
      (glib_minor_version != 2) ||
      (glib_micro_version != 8))
    {
      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB
(%d.%d.%d)\n",
             1, 2, 8,
             glib_major_version, glib_minor_version, glib_micro_version);
      printf ("*** was found! If glib-config was correct, then it is best\n");
      printf ("*** to remove the old version of GLIB. You may also be able to fix
the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by
editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If glib-config was wrong, set the environment variable
GLIB_CONFIG\n");
      printf("*** to point to the correct copy of glib-config, and remove the file
config.cache\n");
      printf("*** before re-running configure\n");
    }
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
    (glib_minor_version != GLIB_MINOR_VERSION) ||
           (glib_micro_version != GLIB_MICRO_VERSION))
    {
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
      GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
      printf("*** library (version %d.%d.%d)\n",
      glib_major_version, glib_minor_version, glib_micro_version);
    }
  else
    {
      if ((glib_major_version > major) ||
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
        ((glib_major_version == major) && (glib_minor_version == minor) &&
(glib_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
               glib_major_version, glib_minor_version, glib_micro_version);
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest
version of\n",
        major, minor, micro);
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n ");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this
error\n");
        printf("*** probably means that the wrong copy of the glib-config shell
script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old
version\n");
        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to
point to the\n");
        printf("*** correct copy of glib-config. (In this case, you will have
to\n");
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit
/etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

configure:4441: gcc -o
conftest -g -O2 -Wall -I/usr/local/lib/glib/include -I/usr/local/include
conftest.c   -L/usr/local/lib -lgmodule -lgthread -lglib 1>&5
In file included from configure:4433:
/usr/local/include/glib.h:543: Invalid token in expression
configure: failed program was:
#line 4431 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>

int main() {
 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
; return 0; }
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

----- Original Message -----
From: "Todd Goodman" <tsg@bonedaddy.net>
To: "Jonas Jensen" <bones0_list@hotmail.com>
Cc: "Todd Goodman" <tsg@bonedaddy.net>; "Cygwin list"
<cygwin@sourceware.cygnus.com>
Sent: Tuesday, June 27, 2000 11:46 PM
Subject: Re: Using glib(c) and gtk+ in Cygwin


> * Jonas Jensen <bones0_list@hotmail.com> [000627 17:43]:
> > the glib-config appears to work properly:
> >
> > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > bash-2.04$ glib-config --version
> > 1.2.8
> > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >
> > HEEELP!
> >
> > has anyone compiled gtk+ 1.2.8 successfully?
>
> You need to find out why the configure of GTK is failing
> where the glib-config --version is successful from the
> command line.
>
> Check in config.log and the other config.* log files and
> see if you see any obvious errors around the tests for
> GLIB.
>
> Regards,
>
> Todd
>
> >
> >
> >
> > ----- Original Message -----
> > From: "Todd Goodman" <tsg@bonedaddy.net>
> > To: "Jonas Jensen" <bones0_list@hotmail.com>
> > Cc: "Todd Goodman" <tsg@bonedaddy.net>; "Cygwin list"
> > <cygwin@sourceware.cygnus.com>
> > Sent: Tuesday, June 27, 2000 10:37 PM
> > Subject: Re: Using glib(c) and gtk+ in Cygwin
> >
> >
> > > * Jonas Jensen <bones0_list@hotmail.com> [000627 16:30]:
> > > > Thanks for helping, but it still doesn't work properly...
> > > >
> > > > > You need to tell it not to use threading (or get the pthread lib from
> > > > > http://sourceware.cygnus.com ).  I think the configure command to disable
> > > > > threading is --enable-thread=no (try ./configure --help).
> > > > I tried disabling it, and now glib compiles... but it doesn't seem to work
> > right,
> > > > because I can't compile gtk+. When I run ./configure on gtk+, it says:
> > >
> > > Did you install glib?  It's looking for a script (glib-config) that is
> > > in your PATH and when run with --version prints the latest version.
> > >
> > > If you type 'glib-config --version' do you get a version number?  Is it
> > > >= 1.2.8?
> > >
> > > You have a pretty new version of GTK+.  I have only built glib and
> > > GTK 1.2.7.
> > >
> > > >
> > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> > > > checking for GLIB - version >= 1.2.8... no
> > > > *** Could not run GLIB test program, checking why...
> > > > *** The test program failed to compile or link. See the file config.log
for
> > the
> > > > *** exact error that occured. This usually means GLIB was incorrectly
> > installed
> > > > *** or that you have moved GLIB since it was installed. In the latter
case,
> > you
> > > > *** may want to edit the glib-config script: /usr/local/bin/glib-config
> > > > configure: error:
> > > > *** GLIB 1.2.8 or better is required. The latest version of GLIB
> > > > *** is always available from ftp://ftp.gtk.org/ .
> > > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> > > >
> > > > I went looking for the "pthread" lib, but I only found a Win32 version. Is
> > that
> > > > the one I'm supposed to use? It comes with a .lib file and a few .h
files...
> > what
> > > > do I do with those? Or do I need another version of that lib?
> > >
> > > I'd recommend *not* using pthreads at all (or at least until the above
> > > problems are cleared up).
> > >
> > > Regards,
> > >
> > > Todd
> > >
> > > --
> > > Want to unsubscribe from this list?
> > > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> > >
> > >
> >
> > --
> > Want to unsubscribe from this list?
> > Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
>
>

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list