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

can't run mplay on Windows, DLL doesn't load #13

Open
MarkNahabedian opened this issue May 15, 2023 · 6 comments
Open

can't run mplay on Windows, DLL doesn't load #13

MarkNahabedian opened this issue May 15, 2023 · 6 comments

Comments

@MarkNahabedian
Copy link

On MSWindows, when I try to mplay a MIDI file I get an error that a DLL can't be loaded:

using Mplay
  Activating project at `c:\Users\Mark Nahabedian\.julia\dev\RegistryCI.jl`
mplay("foo.mid")
ERROR: could not load library "C:\Users\Mark Nahabedian\.julia\packages\Mplay\zc7Lu\src\lib/libglfw.dll"
Access is denied. 
Stacktrace:
 [1] Init
   @ C:\Users\Mark Nahabedian\.julia\packages\Mplay\zc7Lu\src\GLFW.jl:27 [inlined]
 [2] mplay(path::String, device::String)
   @ Mplay C:\Users\Mark Nahabedian\.julia\packages\Mplay\zc7Lu\src\Mplay.jl:268
 [3] mplay(path::String)
   @ Mplay C:\Users\Mark Nahabedian\.julia\packages\Mplay\zc7Lu\src\Mplay.jl:266
 [4] top-level scope
   @ none:1

I tried using regsvr32 to register the DLL, but it complains that

"the module ... was loaded but the entry-point DllRegisterServer was not found.

Make sure that ... is a valiud DLL or OCX file and then try again.
@jheinen
Copy link
Collaborator

jheinen commented May 16, 2023

I suspect a problem with BinaryBuild's GLFW build. Could you try the following:

git clone https://github.com/JuliaMusic/Mplay.jl
cd Mplay.jl\src
set PATH=%PATH%;.\lib
julia Mplay.jl <your-midi-file>

@MarkNahabedian
Copy link
Author

Thanks. That worked.

@jheinen
Copy link
Collaborator

jheinen commented May 16, 2023

Will see how to make this more convenient for the end user.

@MarkNahabedian
Copy link
Author

julia
Pkg.add(url="c:/Users/Mark Nahabedian/.julia/dev/Mplay.jl")
    Updating git-repo `C:\Users\Mark Nahabedian\.julia\dev\Mplay.jl`
    Updating registry at `C:\Users\Mark Nahabedian\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
    Updating registry at `C:\Users\Mark Nahabedian\.julia\registries\NahaJuliaRegistry`
    Updating git-repo `https://github.com/MarkNahabedian/NahaJuliaRegistry.git`
   Resolving package versions...
  No Changes to `C:\Users\Mark Nahabedian\.julia\environments\v1.8\Project.toml`
  No Changes to `C:\Users\Mark Nahabedian\.julia\environments\v1.8\Manifest.toml`
1
1
using Mplay
mplay("audio/jeopardy.mid")
ERROR: could not load library "C:\Users\Mark Nahabedian\.julia\packages\Mplay\ZdKqT\src\lib/libglfw.dll"
Access is denied. 
Stacktrace:
 [1] Init
   @ C:\Users\Mark Nahabedian\.julia\packages\Mplay\ZdKqT\src\GLFW.jl:27 [inlined]
 [2] mplay(path::String, device::String)
   @ Mplay C:\Users\Mark Nahabedian\.julia\packages\Mplay\ZdKqT\src\Mplay.jl:268
 [3] mplay(path::String)
   @ Mplay C:\Users\Mark Nahabedian\.julia\packages\Mplay\ZdKqT\src\Mplay.jl:266
 [4] top-level scope
   @ none:1

@jheinen
Copy link
Collaborator

jheinen commented May 30, 2023

Could you try to change the ACLs of the required DLLs, e.g.

icacls .julia\packages\Mplay\rgPTE\src\lib\*.dll /grant Users:rx

This is only a workaround. Please replace rgPTE with your path.

I will have to automate it within the installation/build step.

@MarkNahabedian
Copy link
Author

MarkNahabedian commented May 30, 2023 via email

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

No branches or pull requests

2 participants