Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glib: build failure with glib2.0 2.61.2-2 #276

Closed
LocutusOfBorg opened this issue Aug 28, 2019 · 3 comments · Fixed by #282
Closed

glib: build failure with glib2.0 2.61.2-2 #276

LocutusOfBorg opened this issue Aug 28, 2019 · 3 comments · Fixed by #282

Comments

@LocutusOfBorg
Copy link

hello, looks like haskell-glib-0.13.7 needs updates for the new glib2.0

dpkg -l |grep glib
ii  libglib2.0-0:amd64               2.61.2-2                    amd64        GLib library of C routines
ii  libglib2.0-bin                   2.61.2-2                    amd64        Programs for the GLib library
ii  libglib2.0-data                  2.61.2-2                    all          Common files for GLib library
ii  libglib2.0-dev:amd64             2.61.2-2                    amd64        Development files for the GLib library
ii  libglib2.0-dev-bin               2.61.2-2                    amd64        Development utilities for the GLib library

build log:

dh_clean 
. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
clean_recipe
Running debian/hlibrary.setup clean
cleaning...
Running rm -rf dist dist-ghc dist-ghcjs dist-hugs debian/hlibrary.setup Setup.hi Setup.ho Setup.o .\*config\*
Running rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
Running rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
Running rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
Running rm -f debian/hlibrary.Makefile
Running rm -rf debian/dh_haskell_shlibdeps
Running rm -rf debian/tmp-db
mkdir -p "."
CDBS WARNING:    DEB_DH_STRIP_ARGS is deprecated since 0.4.85
CDBS WARNING:    DEB_COMPRESS_EXCLUDE is deprecated since 0.4.85
. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
make_setup_recipe
Running ghc --make Setup.hs -o debian/hlibrary.setup
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking debian/hlibrary.setup ...
. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
configure_recipe
Running debian/hlibrary.setup configure --ghc -v2 --package-db=/var/lib/ghc/package.conf.d --prefix=/usr --libdir=/usr/lib/haskell-packages/ghc/lib --libexecdir=/usr/lib --builddir=dist-ghc --ghc-option=-optl-Wl\,-Bsymbolic-functions --ghc-option=-optl-Wl\,-z\,relro --haddockdir=/usr/lib/ghc-doc/haddock/glib-0.13.7.0/ --datasubdir=glib --htmldir=/usr/share/doc/libghc-glib-doc/html/ --enable-library-profiling
Using Parsec parser
Configuring glib-0.13.7.0...
Flags chosen: closure_signals=True
Dependency base ==4.*: using base-4.12.0.0
Dependency bytestring >=0.9.1.10 && <0.11: using bytestring-0.10.8.2
Dependency containers -any: using containers-0.6.0.1
Dependency text >=1.0.0.0 && <1.3: using text-1.2.3.1
Dependency utf8-string >=0.2 && <1.1: using utf8-string-1.0.1.1
Dependency glib-2.0 -any: using version 2.61.2
Dependency gobject-2.0 -any: using version 2.61.2
Source component graph: component lib
Configured component graph:
    component glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR
        include base-4.12.0.0
        include bytestring-0.10.8.2
        include containers-0.6.0.1
        include text-1.2.3.1
        include utf8-string-1.0.1.1-Geq8jdOv4Q3LkcQoEOWDVv
Linked component graph:
    unit glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR
        include base-4.12.0.0
        include bytestring-0.10.8.2
        include containers-0.6.0.1
        include text-1.2.3.1
        include utf8-string-1.0.1.1-Geq8jdOv4Q3LkcQoEOWDVv
        System.Glib=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib,System.Glib.Attributes=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Attributes,System.Glib.FFI=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.FFI,System.Glib.Flags=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Flags,System.Glib.GDateTime=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GDateTime,System.Glib.GError=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GError,System.Glib.GList=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GList,System.Glib.GObject=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GObject,System.Glib.GParameter=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GParameter,System.Glib.GString=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GString,System.Glib.GType=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GType,System.Glib.GTypeConstants=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GTypeConstants,System.Glib.GValue=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GValue,System.Glib.GValueTypes=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.GValueTypes,System.Glib.MainLoop=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.MainLoop,System.Glib.Properties=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Properties,System.Glib.Signals=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Signals,System.Glib.StoreValue=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.StoreValue,System.Glib.Types=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Types,System.Glib.UTFString=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.UTFString,System.Glib.Utils=glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR:System.Glib.Utils
Ready component graph:
    definite glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR
        depends base-4.12.0.0
        depends bytestring-0.10.8.2
        depends containers-0.6.0.1
        depends text-1.2.3.1
        depends utf8-string-1.0.1.1-Geq8jdOv4Q3LkcQoEOWDVv
Using Cabal-2.4.0.1 compiled by ghc-8.6
Using compiler: ghc-8.6.5
Using install prefix: /usr
Executables installed in: /usr/bin
Libraries installed in:
/usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5/glib-0.13.7.0-CouBN9URvtcKaGTE3xPXLR
Dynamic Libraries installed in:
/usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5
Private executables installed in:
/usr/lib/x86_64-linux-ghc-8.6.5/glib-0.13.7.0
Data files installed in: /usr/share/glib
Documentation installed in:
/usr/share/doc/x86_64-linux-ghc-8.6.5/glib-0.13.7.0
Configuration files installed in: /usr/etc
No alex found
Using ar found on system at: /usr/bin/x86_64-linux-gnu-ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 9 found on system at: /usr/bin/x86_64-linux-gnu-gcc
Using ghc version 8.6.5 found on system at: /usr/bin/ghc
Using ghc-pkg version 8.6.5 found on system at: /usr/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using gtk2hsC2hs version 0.13.13 found on system at: /usr/bin/gtk2hsC2hs
Using gtk2hsHookGenerator found on system at: /usr/bin/gtk2hsHookGenerator
Using gtk2hsTypeGen found on system at: /usr/bin/gtk2hsTypeGen
Using haddock version 2.22.0 found on system at: /usr/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /usr/bin/hpc
Using hsc2hs version 0.68.5 found on system at: /usr/bin/hsc2hs
Using hscolour version 1.24 found on system at: /usr/bin/HsColour
No jhc found
Using ld found on system at: /usr/bin/x86_64-linux-gnu-ld.gold
Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
Using runghc version 8.6.5 found on system at: /usr/bin/runghc
Using strip version 2.32 found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
/usr/bin/pkg-config --modversion glib-2.0
/usr/bin/pkg-config --modversion gobject-2.0
touch configure-ghc-stamp
. /usr/share/haskell-devscripts/Dh_Haskell.sh && \
build_recipe
Running debian/hlibrary.setup build --builddir=dist-ghc
Preprocessing library for glib-0.13.7.0..
hlibrary.setup: Error in C header file.

/usr/include/glib-2.0/glib/gspawn.h:76: (column 22) [FATAL] 
  >>> Syntax error!
  The symbol `__attribute__' does not fit here.

make: *** [/usr/share/cdbs/1/class/hlibrary.mk:147: build-ghc-stamp] Error 1

content of that file (since line 73):

  G_SPAWN_ERROR_ACCES,  /* execv() returned EACCES */
  G_SPAWN_ERROR_PERM,   /* execv() returned EPERM */
  G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */
  G_SPAWN_ERROR_2BIG (G_SPAWN_ERROR_TOO_BIG) = G_SPAWN_ERROR_TOO_BIG,
  G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */
  G_SPAWN_ERROR_NAMETOOLONG, /* ""  "" ENAMETOOLONG */
  G_SPAWN_ERROR_NOENT,       /* ""  "" ENOENT */
@LocutusOfBorg
Copy link
Author

this works!

Author: Ilias Tsitsimpis <iliastsi@debian.org>
--- haskell-glib-0.13.7.0.orig/glib.cabal
+++ haskell-glib-0.13.7.0/glib.cabal
@@ -41,9 +41,9 @@ Library
                         bytestring >= 0.9.1.10 && < 0.11,
                         text >= 1.0.0.0 && < 1.3,
                         containers
-        cpp-options:    -U__BLOCKS__
+        cpp-options:    -U__BLOCKS__ -D__attribute__(A)=
         if os(darwin) || os(freebsd)
-          cpp-options: -D__attribute__(A)= -D_Nullable= -D_Nonnull= -D_Noreturn=
+          cpp-options: -D_Nullable= -D_Nonnull= -D_Noreturn=
         if flag(closure_signals)
           cpp-options:  -DUSE_GCLOSURE_SIGNALS_IMPL
           c-sources: System/Glib/hsgclosure.c

@peti
Copy link
Contributor

peti commented Oct 6, 2019

We have the same problem in NixOS: https://hydra.nixos.org/build/102573548. A fix for this issue would be very much appreciated.

@juhp
Copy link
Contributor

juhp commented Oct 8, 2019

Thanks, I am applying the patches to Fedora 31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants