issue installing diagrams-builder

25 views
Skip to first unread message

Igor Moreno Santos

unread,
May 18, 2023, 3:30:45 AM5/18/23
to diagrams-discuss
Hi,

Should I file an issue about this or is it a problem with my environment?

```
❯ cabal install -fps diagrams-builder
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: diagrams-builder-0.8.0.5 (user goal)
[__1] next goal: base (dependency of diagrams-builder)
[__1] rejecting: base-4.17.0.0/installed-4.17.0.0 (conflict: diagrams-builder
=> base>=4.10 && <4.17)
[__1] skipping: base-4.18.0.0, base-4.17.1.0, base-4.17.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=4.10 && <4.17' from 'diagrams-builder')
[__1] rejecting: base-4.16.4.0, base-4.16.3.0, base-4.16.2.0, base-4.16.1.0,
base-4.16.0.0, base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0,
base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__1] fail (backjumping, conflict set: base, diagrams-builder)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, diagrams-builder
```

Regards,
Igor

Francesco Ariis

unread,
May 18, 2023, 4:46:55 AM5/18/23
to diagrams...@googlegroups.com
Hello Igor,

Il 17 maggio 2023 alle 22:09 Igor Moreno Santos ha scritto:
> [__1] rejecting: base-4.17.0.0/installed-4.17.0.0 (conflict:
> diagrams-builder
> => base>=4.10 && <4.17)

This is the gist of it, your `base` (that comes with GHC) is too new
for diagrams-builder.

Wait until the maintainer updates the package and meanwhile pass
`--allow-newer=base` to cabal.

—F

Brent Yorgey

unread,
May 18, 2023, 6:36:31 AM5/18/23
to diagrams...@googlegroups.com
--allow-newer won't help; diagrams-builder does not yet work with base-4.17 / GHC 9.4 because it depends on the `hint` package, which has not yet been updated due to some changes / possible bugs in GHC's API: https://github.com/haskell-hint/hint/pull/152 .  If you want to use diagrams-builder you'll have to use an older GHC (fortunately `ghcup` makes it pretty easy to switch GHC versions these days).

-Brent

--
You received this message because you are subscribed to the Google Groups "diagrams-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diagrams-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diagrams-discuss/ZGXl%2Bxv1XrCeTSqp%40mkiii.casa.

Igor Moreno Santos

unread,
May 18, 2023, 8:09:47 AM5/18/23
to diagrams-discuss
I used ghcup to change the version of ghc. I tried 9.2, 9.0.2, and 8.10 and it didn't work with any of them.
I also tried the cairo backend in all of these ghc versions and it didn't work for another reason:

```
Failed to build cairo-0.13.10.0. The failure occurred during the configure
step.
Build log ( /Users/igormoreno/.cabal/logs/ghc-8.10.7/cr-0.13.10.0-0ab61bac.log
):
[1 of 1] Compiling Main             ( /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56846/cairo-0.13.10.0/dist/setup/setup.hs, /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56846/cairo-0.13.10.0/dist/setup/Main.o )
Linking /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56846/cairo-0.13.10.0/dist/setup/setup ...
Configuring cairo-0.13.10.0...
setup: '/usr/local/bin/pkg-config' exited with an error:
Package 'gobject-2.0' requires 'libffi >= 3.0.0' but version of libffi is 2.1


Failed to build glib-0.13.10.0. The failure occurred during the configure
step.
Build log (
/Users/igormoreno/.cabal/logs/ghc-8.10.7/glb-0.13.10.0-457f80ec.log ):
[1 of 1] Compiling Main             ( /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56845/glib-0.13.10.0/dist/setup/setup.hs, /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56845/glib-0.13.10.0/dist/setup/Main.o )
Linking /var/folders/kv/7ghd9z9j3g51k2rmvr1ztv0w0000gn/T/cabal-install.-56844/dist-newstyle/tmp/src-56845/glib-0.13.10.0/dist/setup/setup ...
Configuring glib-0.13.10.0...
setup: '/usr/local/bin/pkg-config' exited with an error:
Package 'gobject-2.0' requires 'libffi >= 3.0.0' but version of libffi is 2.1

cabal: Failed to build cairo-0.13.10.0 (which is required by
exe:diagrams-builder-cairo from diagrams-builder-0.8.0.5). See the build log
above for details.
Failed to build glib-0.13.10.0 (which is required by
exe:diagrams-builder-cairo from diagrams-builder-0.8.0.5). See the build log
above for details.
```

Should I create an issue for this? Also because it's the installation instructions in https://diagrams.github.io/doc/latex.html

The pgf backend seems to work.

Igor Moreno Santos

unread,
May 18, 2023, 12:03:15 PM5/18/23
to diagrams-discuss
Yes. I can confirm that diagrams-latex is working with the pgf backend in ghc 9.0.2 but not 9.2, when it gives this error:

```
Opening diagrams-latex stream diagrams/main-diagrams-latex-fig1.hs diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/txt-2.0.2-e4810f67/lib/libHStxt-2.0.2-e4810f67.a: unknown symbol `___dso_handle'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/txt-2.0.2-e4810f67/lib/libHStxt-2.0.2-e4810f67.a: unknown symbol `__ZN7simdutf13validate_utf8EPKcm'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/txt-2.0.2-e4810f67/lib/libHStxt-2.0.2-e4810f67.a: unknown symbol `__hs_text_is_valid_utf8'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/txt-2.0.2-e4810f67/lib/libHStxt-2.0.2-e4810f67.a: unknown symbol `_txtzm2zi0zi2zme4810f67_DataziTextziInternalziEncoding_zdwdecodeUtf8With1_info'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/hshbl-1.4.2.0-d7a98211/lib/libHShshbl-1.4.2.0-d7a98211.a: unknown symbol `_txtzm2zi0zi2zme4810f67_DataziText_zdfEqText_closure'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/nrdrd-cntnrs-0.2.19.1-51f037db/lib/libHSnrdrd-cntnrs-0.2.19.1-51f037db.a: unknown symbol `_hshblzm1zi4zi2zi0zmd7a98211_DataziHashableziClass_CZCHashable_con_info'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/lnr-1.22-cfcb5d8c/lib/libHSlnr-1.22-cfcb5d8c.a: unknown symbol `_nrdrdzmcntnrszm0zi2zi19zi1zm51f037db_DataziHashMapziInternal_zdfFunctorHashMap_closure'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/dgrms-lb-1.4.6-1c058a50/lib/libHSdgrms-lb-1.4.6-1c058a50.a: unknown symbol `_lnrzm1zi22zmcfcb5d8c_LinearziVector_zdp1Additive_info'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/dgrms-lb-1.4.6-1c058a50/lib/libHSdgrms-lb-1.4.6-1c058a50.a: unknown symbol `_dgrmszmlbzm1zi4zi6zm1c058a50_DiagramsziSegment_zdfMeasuredZLz2cUZRSegment_info'
diagrams-builder-pgf:
lookupSymbol failed in relocateSection (relocate external)
/Users/igormoreno/.cabal/store/ghc-9.2.7/dgrms-lb-1.4.6-1c058a50/lib/libHSdgrms-lb-1.4.6-1c058a50.a: unknown symbol `_dgrmszmlbzm1zi4zi6zm1c058a50_DiagramsziTrail_fixTrail_info'
diagrams-builder-pgf: ^^ Could not load '_dgrmszmlbzm1zi4zi6zm1c058a50_DiagramsziTrailLike_zdp2TrailLike_closure', dependency unresolved. See top entry above.

Error while compiling diagrams/main-diagrams-latex-fig1.hs
Couldn't match type ‘V (IO (QDiagram PGF V2 Double Any))’ with ‘V2’
  arising from a use of ‘dia’
In the expression: dia
In an equation for ‘e_1’: e_1 = dia
In the expression:
    (let e_1 = dia in e_1) :: IO (QDiagram PGF V2 Double Any)



Package diagrams-latex Warning: Conversion of diagrams/main-diagrams-latex-fig1
.hs failed.


Package diagrams-latex Warning: Please convert diagrams/main-diagrams-latex-fig
1.hs manually.
```

Igor Moreno




You received this message because you are subscribed to a topic in the Google Groups "diagrams-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diagrams-discuss/jaflCTeR86E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diagrams-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diagrams-discuss/49739e8d-4b4d-439f-875e-9ac2673432f3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages