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

load_dynamic is unable to find the wrapper procedure #6

Open
anubi opened this issue Nov 1, 2019 · 5 comments
Open

load_dynamic is unable to find the wrapper procedure #6

anubi opened this issue Nov 1, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@anubi
Copy link

anubi commented Nov 1, 2019

When init calls load_dynamic (triggered by a "from live2d.displayable import Live2DDisplayable") it blows up on my machine. I'm on Windows 10, with the latest renpy & cubism installed. I double checked it's able to actually "find" the wrapper.pyd, it's blowing up inside that module. Possibly because I have Python 3.6 installed on this machine, too? Not sure, going to recompile the plugin and report here if that fixes it.

@anubi
Copy link
Author

anubi commented Nov 1, 2019

...building this project isn't as easy as your guide makes it out to be :O

c:\users\XXX\downloads\renpy-live2d-master\cubismsdk\framework\src\rendering\d3d11\CubismNativeInclude_D3D11.hpp(11) : fatal error C1083: Cannot open include file: 'DirectXMath.h': No such file or directory
error: command 'C:\Users\XXX\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

I have to DL their dependencies to build? Sounds scary.

@anubi
Copy link
Author

anubi commented Nov 1, 2019

Is it possible you could upload a sample project somewhere so I could compare why mine isn't working vs yours?

This is the error I am actually faced with, when using your release:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 1, in script
    init python:
  File "game/script.rpy", line 5, in <module>
    from live2d.displayable import Live2DDisplayable
ImportError: DLL load failed: The specified procedure could not be found.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 1, in script
    init python:
  File "C:\Users\???\Downloads\renpy-7.1.1-sdk.7z\renpy-7.1.1-sdk\renpy\ast.py", line 914, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\???\Downloads\renpy-7.1.1-sdk.7z\renpy-7.1.1-sdk\renpy\python.py", line 2028, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script.rpy", line 5, in <module>
    from live2d.displayable import Live2DDisplayable
  File "C:\Users\???\Downloads\renpy-7.1.1-sdk.7z\renpy-7.1.1-sdk\renpy\loader.py", line 754, in load_module
    exec code in mod.__dict__
  File "live2d/__init__.py", line 29, in <module>
  File "live2d/__init__.py", line 25, in load_module
ImportError: DLL load failed: The specified procedure could not be found.

Windows-8-6.2.9200
Ren'Py 7.3.5.606

@anubi
Copy link
Author

anubi commented Nov 5, 2019

Building the lib from source in windows is not reasonably possible, there's some missing requirement I can't discern. CubismSDK complains about a missing DirectXMath.h, despite having DirectX installed (https://www.microsoft.com/en-us/download/confirmation.aspx?id=23549). So, I found DirectXMath.h on github (https://github.com/microsoft/DirectXMath) but this causes C99 errors in the build process (it can't find stdint.h). So, I actually found a stdint.h for windows (because it can't find cstdint on my machine, either) and tossed it into /Windows Kits/10/Include/10.0.17763.0/um/ and now I am getting:

error C2065: 'default' : undeclared identifier
error C2253: 'XMMATRIX' : pure specifier or abstract override specifier only allowed on virtual function
error C3646: 'noexcept' : unknown override specifier

And numerous other build errors, originating from DirectXMath.h

I could keep going down this hackey rabbit hole, but I'm not convinced it will produce a viable artifact. It's too bad because I'm curious to see this working in python. If anyone can build this from source, please provide your setup. I'm using a fresh PC, following the windows guide in this repo, using the Developer Command Prompt for VS 2019 to execute "python setup.py build_ext --inplace --complier=msvc".

@asfdfdfd asfdfdfd added the bug Something isn't working label Dec 13, 2019
@asfdfdfd
Copy link
Owner

asfdfdfd commented Dec 13, 2019

I could not dive to the code right now but i have a quick idea.

This release targeted for the 3 SDK version. Probably you are trying to use it with version 4 that is currently in beta. And probably version 4 dropped some methods that i've used in this release.

This theory is supported by requirement of DirectXMath. Because previously it was not required to compile app.

So. Probably 3 SDK version will allow you to launch demo app.

@zhiqiangyan
Copy link

it's also a problem for me.

wrapper.cpp(1566) : fatal error C1003: error count exceeds 100; stopping compilation
error: command 'C:\Users\yanzq\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2

So many warnings!

I counld'n find the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants