Missing dlls and unresolved dependencies - tidal 1.9.0 on Windows

Greetings, I updated to tidal 1.9.0, but now I have some problems running it. I would appreciate any help resolving the issue!

What I did: I updated to ghc 9.4.2 (via ghcup) and installed tidal via "cabal v1-install tidal".

When running tidal via the Atom plugin, I get the following errors:

t> ghci>
t> ghc-9.4.2.exe: Could not load `libc++.dll'. Reason: addDLL: libc++.dll or dependencies not loaded. (Win32 error 126)

t> ghc-9.4.2.exe:  | C:\cabal\x86_64-windows-ghc-9.4.2\tidal-link-1.0-B5KLZru0WAsF2t3BvHbJLi\libHStidal-link-1.0-B5KLZru0WAsF2t3BvHbJLi.a: unknown symbol `_Znwy'
ghc-9.4.2.exe:  | C:\cabal\x86_64-windows-ghc-9.4.2\tidal-1.9.0-GyA70EKZWnxKiU691wGWYr\libHStidal-1.9.0-GyA70EKZWnxKiU691wGWYr.a: unknown symbol `abl_link_time_at_beat'
ghc-9.4.2.exe:  | C:\cabal\x86_64-windows-ghc-9.4.2\tidal-1.9.0-GyA70EKZWnxKiU691wGWYr\libHStidal-1.9.0-GyA70EKZWnxKiU691wGWYr.a: unknown symbol `tidalzm1zi9zi0zmGyA70EKZZWnxKiU691wGWYr_SoundziTidalziTempo_SingleTick_con_info'
ghc-9.4.2.exe: ^^ Could not load 'tidalzm1zi9zi0zmGyA70EKZZWnxKiU691wGWYr_SoundziTidalziStream_Target_con_info', dependency unresolved. See top entry above.

ghc-9.4.2.exe: ^^ Could not load 'tidalzm1zi9zi0zmGyA70EKZZWnxKiU691wGWYr_SoundziTidalziStream_Target_static_info', dependency unresolved. See top entry above.


GHC.ByteCode.Linker.lookupIE
During interactive linking, GHCi couldn't find the following symbol:
  tidalzm1zi9zi0zmGyA70EKZZWnxKiU691wGWYr_SoundziTidalziStream_Target_con_info or tidalzm1zi9zi0zmGyA70EKZZWnxKiU691wGWYr_SoundziTidalziStream_Target_static_info
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
  https://www.haskell.org/ghc/reportabug


Access violation in generated code when reading 0x20

 Attempting to reconstruct a stack trace...

t> ghci| ghci| ghci|
t>    Frame	Code address
 * 0x247178d900	0x7ff69c6af836 C:\ghcup\ghc\9.4.2\bin\ghc-9.4.2.exe+0x43cf836
 * 0x247178d980	0x7ff69bbdafff C:\ghcup\ghc\9.4.2\bin\ghc-9.4.2.exe+0x38fafff
 * 0x247178d9b0	0x7ff69bbdba98 C:\ghcup\ghc\9.4.2\bin\ghc-9.4.2.exe+0x38fba98
 * 0x247178d9b8	0x7ff69c40ff5f C:\ghcup\ghc\9.4.2\bin\ghc-9.4.2.exe+0x412ff5f
 * 0x247178d9c0	0x7ef4e448d600
 * 0x247178d9c8	0x15000000003
 * 0x247178d9d0	0x3
 * 0x247178d9d8	0x247178d9c0


Thanks for the report @ravelite! I will try to take a look at this on Saturday.

I have had success with the VS Code editor and its Tidal plugin. If you have time, please try it out and report back.

Edit: I've managed to reproduce and changing editor does not help. I just changed my computer so it might be related to that since this used to work smoothly for me as well.

Thank you! For the moment, I tried with the VS Code extension and I get the same errors... it seems to be something with either my ghc or tidal environment, or both.

Update: I seem to be able to run tidal 1.8.1 by installing it in the same way, so my environment seems to have an issue with tidal 1.9.0 in particular.

Interesting finding: If I clone Tidal git clone git@github.com:tidalcycles/Tidal.git and install the lib from source, the errors disappear:

cd Tidal
cabal v2-install --lib

I can launch Tidal from ghci, VS Code, and Atom.

@yaxu, do you think there could be some error with the published package or would you like me to report this as a GHC bug?

They should be practically the same. You could grab the released tarball: https://hackage.haskell.org/package/tidal-1.9.0/tidal-1.9.0.tar.gz
and unpack that, trying the install from that folder..

hi !
same problem here, i get :

Warning: GHCi | ghc-9.4.2.exe: Could not load `libc++.dll'. Reason: addDLL: libc++.dll or dependencies not loaded. (Win32 error 126)

complete noob so i didn't manage to do the clone thing

Hi, I also have the same problem:

> cabal update
Config file path source is default config file.
Config file not found: C:\Users\dtr\AppData\Roaming\cabal\config
Writing default configuration to C:\Users\dtr\AppData\Roaming\cabal\config
Downloading the latest package list from hackage.haskell.org
Package list of hackage.haskell.org has been updated.
The index-state is set to 2022-09-16T07:02:59Z.


~ took 28s
> cabal v1-install tidal
Resolving dependencies...
Downloading  blaze-builder-0.4.2.2
Downloading  clock-0.8.3
Downloaded   clock-0.8.3
Downloading  colour-2.3.6
Downloaded   blaze-builder-0.4.2.2
Downloading  data-binary-ieee754-0.4.4
Starting     clock-0.8.3
Starting     blaze-builder-0.4.2.2
Downloaded   colour-2.3.6
Downloading  network-3.1.2.7
Downloaded   data-binary-ieee754-0.4.4
Downloading  primitive-0.7.4.0
Starting     colour-2.3.6
Starting     data-binary-ieee754-0.4.4
Downloaded   primitive-0.7.4.0
Downloading  splitmix-0.1.0.4
Starting     primitive-0.7.4.0
Downloaded   network-3.1.2.7
Downloading  tidal-link-1.0
Starting     network-3.1.2.7
Downloaded   splitmix-0.1.0.4
Starting     splitmix-0.1.0.4
Downloaded   tidal-link-1.0
Starting     tidal-link-1.0
Building     colour-2.3.6
Building     data-binary-ieee754-0.4.4
Building     clock-0.8.3
Building     blaze-builder-0.4.2.2
Building     primitive-0.7.4.0
Building     splitmix-0.1.0.4
Building     tidal-link-1.0
Completed    data-binary-ieee754-0.4.4
Completed    blaze-builder-0.4.2.2
Completed    colour-2.3.6
Completed    splitmix-0.1.0.4
Downloading  random-1.2.1.1
Downloaded   random-1.2.1.1
Starting     random-1.2.1.1
Building     random-1.2.1.1
Completed    clock-0.8.3
Completed    primitive-0.7.4.0
Completed    random-1.2.1.1
Completed    tidal-link-1.0
Building     network-3.1.2.7
Completed    network-3.1.2.7
Downloading  hosc-0.19.1
Downloaded   hosc-0.19.1
Starting     hosc-0.19.1
Building     hosc-0.19.1
Completed    hosc-0.19.1
Downloading  tidal-1.9.0
Downloaded   tidal-1.9.0
Starting     tidal-1.9.0
Building     tidal-1.9.0
Completed    tidal-1.9.0

~ took 3m9s

> ghci
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help
Prelude> :set -XOverloadedStrings
Prelude> import Sound.Tidal.Context
Prelude Sound.Tidal.Context> import System.IO (hSetEncoding, stdout, utf8)
Prelude Sound.Tidal.Context System.IO> hSetEncoding stdout utf8
Prelude Sound.Tidal.Context System.IO> tidal <- startTidal (superdirtTarget {oLatency = 0.05, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cVerbose = True, cFrameTimespan = 1/20})
ghc.exe:  | C:\Users\dtr\AppData\Roaming\cabal\x86_64-windows-ghc-8.10.7\tidal-link-1.0-AXhAqIqy7rUESVR5s9DKVU\libHStidal-link-1.0-AXhAqIqy7rUESVR5s9DKVU.a: unknown symbol `_ZNSt23mersenne_twister_engineIjLy32ELy624ELy397ELy31ELj2567483615ELy11ELj4294967295ELy7ELj2636928640ELy15ELj4022730752ELy18ELj1812433253EEclEv'
ghc.exe:  | C:\Users\dtr\AppData\Roaming\cabal\x86_64-windows-ghc-8.10.7\tidal-1.9.0-32vgDboIofjLATBdWmQaSa\libHStidal-1.9.0-32vgDboIofjLATBdWmQaSa.a: unknown symbol `abl_link_time_at_beat'
ghc.exe:  | C:\Users\dtr\AppData\Roaming\cabal\x86_64-windows-ghc-8.10.7\tidal-1.9.0-32vgDboIofjLATBdWmQaSa\libHStidal-1.9.0-32vgDboIofjLATBdWmQaSa.a: unknown symbol `tidalzm1zi9zi0zm32vgDboIofjLATBdWmQaSa_SoundziTidalziTempo_SingleTick_con_info'
ghc.exe: ^^ Could not load 'tidalzm1zi9zi0zm32vgDboIofjLATBdWmQaSa_SoundziTidalziStream_Target_con_info', dependency unresolved. See top entry above.

ghc.exe: ^^ Could not load 'tidalzm1zi9zi0zm32vgDboIofjLATBdWmQaSa_SoundziTidalziStream_Target_static_info', dependency unresolved. See top entry above.


ByteCodeLink.lookupIE
During interactive linking, GHCi couldn't find the following symbol:
  tidalzm1zi9zi0zm32vgDboIofjLATBdWmQaSa_SoundziTidalziStream_Target_con_info or tidalzm1zi9zi0zm32vgDboIofjLATBdWmQaSa_SoundziTidalziStream_Target_static_info
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
  https://www.haskell.org/ghc/reportabug

Prelude Sound.Tidal.Context System.IO>

Hi @Zalastax,

Your fix worked for me. To be clear, I downloaded Tidal-main.zip via the github web interface, and installed it with cabal v2-install --lib.

The interface already names this as "tidal-1.9.1":

In order, the following will be built (use -v for more details):
 - tidal-link-1.0 (lib) (requires build)
 - tidal-1.9.1 (lib) (requires build)
Starting     tidal-link-1.0 (lib)
Building     tidal-link-1.0 (lib)
Installing   tidal-link-1.0 (lib)
Completed    tidal-link-1.0 (lib)
Starting     tidal-1.9.1 (lib)
Building     tidal-1.9.1 (lib)
Installing   tidal-1.9.1 (lib)
Completed    tidal-1.9.1 (lib)

Hi @yaxu:
I tried installing from the tidal-1.9.0 tarball that you linked. It seemed like this still generated the same error behavior from before.

Is it possible there is some difference from the current github state from the tidal-1.9.0 tarball at hackage.haskell.org?

best regards, thanks!

Yes I've released version 1.9.1, the only real different is that tidal now explicitly requires version 1.0 of tidal-link. Comparing v1.9.0...v1.9.1 · tidalcycles/Tidal · GitHub

This is something stack wanted. If that somehow is enough to fix this, then great, but it'd be good to know why!

Hi, if you re-run these commands, it should try with the new 1.9.1 release, which might help.

Hi @yaxu, I think I have found the issue!

https://hackage.haskell.org/package/tidal-link-1.0/tidal-link-1.0.tar.gz does not contain the change Use system-cxx-std-lib · tidalcycles/Tidal@22cb3d3 · GitHub since tidal-link: Ableton Link integration for Tidal was uploaded before that patch arrived: 2022-08-02T19:07:58Z

1 Like

Great! Ok so now this should fix things for windows folks:

cabal update
cabal v1-install tidal-1.9.2

or cabal install tidal-1.9.2 if you use that.

If anyone tries this, please share what happens!

2 Likes

Yes, this works! :slight_smile:

1 Like

that worked for me too ! many thanks !!

1 Like