Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 144028
Alias:
Product:
Component:
Status: CLOSED
Resolution: TEST-REQUEST
Assigned To: Gentoo's Haskell Language team <haskell@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Santiago Gala <sgala@apache.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 144028 depends on: Show dependency tree
Bug 144028 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.




View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-15 11:22 0000
./tools/c2hs/c2hsLocal +RTS -RTS -C-I/usr/include/glib-2.0
-C-I/usr/lib/glib-2.0/include -C-I/usr/include/pango-1.0
-C-I/usr/include/gtk-2.0 -C-I/usr/lib/gtk-2.0/include -C-I/usr/include/cairo
-C-I/usr/include/atk-1.0 --cppopts='-include "gtk2hs-config.h"'
--precomp=gtk/gtk.precomp gtk/gtk.h
c2hsLocal: Error in C header file.

/usr/include/bits/libio-ldbl.h:24: (column 30) [FATAL]
  >>> Syntax error!
  The symbol `_IO_vfscanf' does not fit here.

make[2]: *** [gtk/gtk.precomp] Error 1

First it gives this error, due to some breakage due to changes in glibc-2.4
headers, and later it fails about 

ghc-6.4.2: can't find file `gtk/Graphics/UI/Gtk/Pango/Types.hs'
...
gtk/Graphics/UI/Gtk.hs:216:0:
    Failed to load interface for `Graphics.UI.Gtk.General.General':
        Could not find module `Graphics.UI.Gtk.General.General':
          use -v to see a list of the files searched for


according to talk in irc://irc.freenode.net/#haskell , this must be fixed in
the c2hs code.

------- Comment #1 From Santiago Gala 2006-08-15 11:24:46 0000 -------
The offending lines in gtk.i are:

# 1 "/usr/include/bits/libio-ldbl.h" 1 3 4
# 24 "/usr/include/bits/libio-ldbl.h" 3 4
extern __typeof (_IO_vfscanf) _IO_vfscanf __asm ("" "__nldbl_" "_IO_vfscanf");
extern __typeof (_IO_vfprintf) _IO_vfprintf __asm ("" "__nldbl_"
"_IO_vfprintf");
# 539 "/usr/include/libio.h" 2 3 4
# 73 "/usr/include/stdio.h" 2 3 4
# 86 "/usr/include/stdio.h" 3 4

------- Comment #2 From Duncan Coutts (RETIRED) 2006-10-04 16:04:43 0000 -------
Thanks. It's a problem in the bundled c2hs. I'll investigate a fix.

------- Comment #3 From Duncan Coutts (RETIRED) 2007-01-08 22:30:49 0000 -------
Santiago, if you're in the mood for testing, would you mind trying this
pre-release tarball? I think I've fixed it.

http://haskell.org/gtk2hs/gtk2hs-0.9.10.4.tar.gz

------- Comment #4 From Santiago Gala 2007-04-21 10:06:06 0000 -------
I couldn't try till now, so I had to try 0.9.11

I got a different error:

make[3]: Entering directory
`/var/tmp/portage/dev-haskell/gtk2hs-0.9.11/work/gtk2hs-0.9.11'
./tools/c2hs/c2hsLocal +RTS -RTS -C-I/usr/include/glib-2.0
-C-I/usr/lib64/glib-2.0/include --cppopts='-include "gtk2hs-config.h"'
--precomp=glib/glib.precomp glib-object.h
In file included from /usr/include/glib-2.0/glib/gstring.h:32,
                 from /usr/include/glib-2.0/glib/giochannel.h:32,
                 from /usr/include/glib-2.0/glib.h:47,
                 from /usr/include/glib-2.0/gobject/gtype.h:26,
                 from /usr/include/glib-2.0/gobject/gboxed.h:26,
                 from /usr/include/glib-2.0/glib-object.h:25:
/usr/include/glib-2.0/glib/gutils.h:381:1: warning: "GLIB_CHECK_VERSION"
redefined
In file included from <command line>:1:
./gtk2hs-config.h:140:1: warning: this is the location of the previous
definition
c2hsLocal: Error in C header file.

/usr/include/glib-2.0/glib/gutils.h:278: (column 26) [FATAL] 
  >>> Syntax error!
  The symbol `__extension__' does not fit here.

make[3]: *** [glib/glib.precomp] Error 1
make[3]: Leaving directory
`/var/tmp/portage/dev-haskell/gtk2hs-0.9.11/work/gtk2hs-0.9.11'
make[2]: *** [glib/System/Glib/Types.hs] Error 2


The line contains a reference to G_UNLIKELY that looks like gets expended into
something containing __extension__

------- Comment #5 From Duncan Coutts (RETIRED) 2007-04-21 11:42:58 0000 -------
Cheers. In the mean time I've fixed up c2hs so it can parse absolutely
everything (the whole kernel and system packages). Unfortunately Gtk2Hs is
using a fork of c2hs so some more work is required to get Gtk2Hs fixed.

------- Comment #6 From Duncan Coutts (RETIRED) 2007-07-11 14:05:57 0000 -------
It's fixed upstream hopefully now. Just waiting for a final 0.9.12 release.
If you want to try the pre-release tarball, it's here:
http://haskell.org/gtk2hs/gtk2hs-0.9.11.3.tar.gz

------- Comment #7 From Duncan Coutts (RETIRED) 2007-07-27 21:09:46 0000 -------
gtk2hs-0.9.12 is in portage. Hopefully this fixes the problem.
Can someone please test and confirm?

It works for me, but then I never experienced the original problem.

------- Comment #8 From Santiago Gala 2007-07-29 21:51:44 0000 -------
Builds for me now, the bug was about it not building.

Last build was glibc-2.5-* and gcc-4.2, so it seems this version is prepared
for the close future :)

------- Comment #9 From Duncan Coutts (RETIRED) 2007-07-29 22:01:14 0000 -------
Excellent, thanks Santiago :-)
I'll close the bug then.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug