makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.18k stars 244 forks source link

Unable to launch Makehuman on Haiku #185

Closed roired closed 2 years ago

roired commented 2 years ago

Good day,

I downloaded the source code from Github, set a virtual environment and installed the dependencies as stated on the Makehuman readme. The virtual environment is set with Python 3.8 with the following packages inside the environment: Package Version


Cython 0.29.24 git-lfs 1.6 numpy 1.21.4 pip 21.3.1 PyOpenGL 3.1.5 PyOpenGL-accelerate 3.1.5 PyQt5 5.15.6 PyQt5-sip 12.9.0 setuptools 59.2.0 wheel 0.37.0

I tried to get the assets with the 'download_assets_git.py' by means of git-lfs python package and get FileNotFoundErrors too. Not sure if this has something to do here.

'compile_modules.py', 'compile_proxies.py' and 'compile_targets.py' all came out Ok.

I try to run Makehuman inside the venv with 'python makehuman.py', being python 3.8.12, and this is the outcome:

(mhenv) ~/Downloads/MakehumanMaster/makehuman-master/makehuman> python makehuman.py 
MakeHuman Copyright (C) 2001-2020 http://www.makehumancommunity.org
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. For details use the option --license

Initialized logging
VERSION: UNKNOWN:UNKNOWN
SHORT VERSION: alpha
LONG VERSION: 1.2.1 alpha (UNKNOWN:UNKNOWN)
BASEMESH VERSION: hm08
IS BUILT (FROZEN): No
IS RELEASE VERSION: No
DEFAULT ENCODING: utf-8
FILESYSTEM ENCODING: utf-8
STDOUT ENCODING: utf-8
LOCALE PREFERRED ENCODING: UTF-8
WORKING DIRECTORY: /boot/home/Downloads/MakehumanMaster/makehuman-master/makehuman
HOME LOCATION: /boot/home
PYTHON PATH: ./:./lib:./apps:./shared:./apps/gui:./core:/boot/home/Downloads/MakehumanMaster/makehuman-master/makehuman:/packages/python38-3.8.12-1/.self/lib/python38.zip:/packages/python38-3.8.12-1/.self/lib/python3.8:/packages/python38-3.8.12-1/.self/lib/python3.8/lib-dynload:/boot/home/Downloads/MakehumanMaster/mhenv/non-packaged/lib/python3.8/site-packages:/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages:/packages/python38-3.8.12-1/.self/lib/python3.8/vendor-packages
DLL PATH: /boot/home/Downloads/MakehumanMaster/mhenv/bin:.:/boot/home/config/non-packaged/bin:/boot/home/config/bin:/boot/system/non-packaged/bin:/bin:/boot/system/apps:/boot/system/preferences
SYS.VERSION: 3.8.12 (default, Nov 20 2021, 23:55:23)  [GCC 11.2.0]
SYS.PLATFORM: haiku1
SYS.EXECUTABLE: /boot/home/Downloads/MakehumanMaster/mhenv/bin/python
PLATFORM.MACHINE: x86_64
PLATFORM.PROCESSOR: x86_64
PLATFORM.UNAME.RELEASE: 1
NUMPY.VERSION: 1.21.4
OpenGL_accelerate module loaded
Using accelerated ArrayDatatype
Traceback (most recent call last):
  File "makehuman.py", line 621, in <module>
    main()
  File "makehuman.py", line 611, in main
    from mhmain import MHApplication
  File "/boot/home/Downloads/MakehumanMaster/makehuman-master/makehuman/./core/mhmain.py", line 44, in <module>
    import mh
  File "/boot/home/Downloads/MakehumanMaster/makehuman-master/makehuman/./lib/mh.py", line 43, in <module>
    from glmodule import grabScreen, hasRenderSkin, renderSkin, getPickedColor, hasRenderToRenderbuffer, renderToBuffer, renderAlphaMask
  File "/boot/home/Downloads/MakehumanMaster/makehuman-master/makehuman/./lib/glmodule.py", line 47, in <module>
    import OpenGL.GLU
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/GLU/__init__.py", line 8, in <module>
    from OpenGL.GLU.projection import *
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/GLU/projection.py", line 3, in <module>
    from OpenGL import GL
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/GL/__init__.py", line 4, in <module>
    from OpenGL.GL.VERSION.GL_1_1 import *
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in <module>
    from OpenGL.raw.GL.VERSION.GL_1_1 import *
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in <module>
    from OpenGL.raw.GL import _errors
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/raw/GL/_errors.py", line 4, in <module>
    _error_checker = _ErrorChecker( _p, _p.GL.glGetError )
  File "src/errorchecker.pyx", line 20, in OpenGL_accelerate.errorchecker._ErrorChecker.__init__
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
    value = self.fget( obj )
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 356, in CurrentContextIsValid
    return self.GetCurrentContext
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__
    value = self.fget( obj )
  File "/packages/python38-3.8.12-1/.self/non-packaged/lib/python3.8/site-packages/OpenGL/platform/glx.py", line 95, in GetCurrentContext
    return self.GL.glXGetCurrentContext
  File "/packages/python38-3.8.12-1/.self/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/packages/python38-3.8.12-1/.self/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: No such file or directory

I would appreciate any insight on how to solve this issue. If I'm able to run it, next would be making a package for Haiku.

Thanks a lot in advance for any help you can provide. Regards, RR

Aranuvir commented 2 years ago

It seems like Python has problems to initialize OpenGL at all. I'm not sure if can help here...

joepal1976 commented 2 years ago

Looks to me as if there's a file missing in your python installation or in a library the python installation tries to call. The call "_FuncPtr" is for executing a code block at an offset in a library file (DLL on windows, .so on linux etc). But here it fails because the indicated library file doesn't seem to exist. Exactly which file it's looking for can't be seen in the stack trace.

But as Aranuvir says, it looks as if it is related to OpenGL.

PyOpenGL seems to be installed. Otherwise it would have crashed earlier.

roired commented 2 years ago

Good day @Aranuvir and @joepal1976 ,

Thanks both for your replies. I rechecked the availability of OpenGL on Haiku, and python bindings for OpenGL too. Seems OpenGL is supported (only software), so I might be missing some files. I just followed the indications on how to run Makehuman from source regarding requirements, but on Haiku I have to use an specific version of python in order to install certain requirements. Also might be a lack of knowledge on how to manage venvs.

I'll review this again and ask at Haiku regarding OpenGL, and report back. (edited... seems that OpenGL is not available for Qt apps on Haiku at the moment. Have to wait until it's available and test again, once available, I'll test and if works, will try to make a package.)

Thanks again! Regards, RR