openai / doom-py

ViZDoom Python wrapper
MIT License
75 stars 43 forks source link

Can't build doom-py (harfbuzz undefined something) #16

Closed RozenAstrayChen closed 5 years ago

RozenAstrayChen commented 5 years ago

Hello when I build doom-py encounter this error

python setup.py build
running build
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   thread
--   system
--   date_time
--   chrono
--   regex
--   iostreams
--   atomic
-- Could NOT find GME (missing:  GME_INCLUDE_DIR)
-- Using system zlib
-- Using system jpeg library
-- Using system bzip2 library
-- Using internal gme library
-- /home/islab/anaconda3/envs/curiosity/include
-- /home/islab/anaconda3/include
-- /home/islab/rozen_proj/doom-py/doom_py/src/vizdoom/lzma/C
-- Could not find FMOD include files
-- Could NOT find SndFile (missing:  SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-- Could NOT find MPG123 (missing:  MPG123_LIBRARIES MPG123_INCLUDE_DIR)
-- Selected assembler: /usr/bin/as
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   system
--   date_time
--   chrono
--   atomic
-- Fluid synth libs: /usr/lib/x86_64-linux-gnu/libfluidsynth.so
-- Using python library: /home/islab/anaconda3/envs/curiosity/lib/libpython3.5m.so
-- Using python include: /home/islab/anaconda3/envs/curiosity/include/python3.5m
-- Could NOT find Boost
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python-py35
-- Boost library python-py35: /usr/lib/x86_64-linux-gnu/libboost_python-py35.so
-- Found components for NumPy
-- NUMPY_ROOT_DIR    = /usr/local
-- NUMPY_INCLUDES    = /home/islab/anaconda3/envs/curiosity/lib/python3.5/site-packages/numpy/core/include
-- NUMPY_LIBRARIES   = /home/islab/anaconda3/envs/curiosity/lib/python3.5/site-packages/numpy/core/lib/libnpymath.a
-- NUMPY_API_VERSION = 1.13.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/islab/rozen_proj/doom-py/doom_py
[  0%] Built target updaterevision
[  0%] Built target arithchk
[  0%] Built target lemon
[  0%] Built target freedoom2
[  1%] Built target libvizdoom_static
[  3%] Built target re2c
[  6%] Built target lzma
[  7%] Built target libvizdoom_shared
[ 23%] Built target dumb
Scanning dependencies of target libvizdoom_python
[ 32%] Built target gme
[ 33%] Built target qnan
[ 34%] Built target zipdir
[ 35%] Building CXX object CMakeFiles/libvizdoom_python.dir/src/lib_python/ViZDoomGamePython.cpp.o
[ 35%] Building CXX object CMakeFiles/libvizdoom_python.dir/src/lib_python/ViZDoomPythonModule.cpp.o
[ 36%] Built target gdtoa
[ 36%] Linking CXX executable ../../../bin/vizdoom
CMakeFiles/vizdoom.dir/tempfiles.cpp.o: In function `FTempFileName::FTempFileName(char const*)':
tempfiles.cpp:(.text+0x7): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/home/islab/anaconda3/lib/libharfbuzz.so.0: undefined reference to `FT_Done_MM_Var'
/home/islab/anaconda3/lib/libharfbuzz.so.0: undefined reference to `FT_Get_Var_Blend_Coordinates'
collect2: error: ld returned 1 exit status
src/vizdoom/src/CMakeFiles/vizdoom.dir/build.make:8868: recipe for target 'bin/vizdoom' failed
make[2]: *** [bin/vizdoom] Error 1
CMakeFiles/Makefile2:897: recipe for target 'src/vizdoom/src/CMakeFiles/vizdoom.dir/all' failed
make[1]: *** [src/vizdoom/src/CMakeFiles/vizdoom.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/islab/rozen_proj/doom-py/doom_py/src/lib_python/ViZDoomGamePython.cpp: In function ‘int vizdoom::init_numpy()’:
/home/islab/rozen_proj/doom-py/doom_py/src/lib_python/ViZDoomGamePython.cpp:41:9: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
         import_array();
         ^
/home/islab/rozen_proj/doom-py/doom_py/src/lib_python/ViZDoomPythonModule.cpp: In function ‘int init_numpy()’:
/home/islab/rozen_proj/doom-py/doom_py/src/lib_python/ViZDoomPythonModule.cpp:91:5: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
     import_array();
     ^
[ 36%] Linking CXX shared module bin/python/vizdoom.so
Adding symlinks to vizdoom.so and bots.cfg in examples/python.
[ 36%] Built target libvizdoom_python
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Could not build doom-py: Command '['make', '-j', '11']' returned non-zero exit status 2. (HINT: are you sure cmake is installed? You might also be missing a library. Try running 'apt-get install -y python-numpy cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc libsdl2-dev wget unzip'

Traceback (most recent call last):
  File "setup.py", line 88, in <module>
    include_package_data=True,
  File "/home/islab/.local/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/home/islab/anaconda3/envs/curiosity/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/islab/anaconda3/envs/curiosity/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/islab/anaconda3/envs/curiosity/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 63, in run
    build_func()
  File "setup.py", line 41, in build_linux
    build_common('so')
  File "setup.py", line 29, in build_common
    subprocess.check_call(['make', '-j', str(cores_to_use)], cwd='doom_py')
  File "/home/islab/anaconda3/envs/curiosity/lib/python3.5/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j', '11']' returned non-zero exit status 2

I already install

sudo apt-get install -y python-numpy cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc libsdl2-dev wget unzip

other env

and I found this error , I already uninstall harfbuzz but still error

/home/islab/anaconda3/lib/libharfbuzz.so.0: undefined reference to `FT_Done_MM_Var'
/home/islab/anaconda3/lib/libharfbuzz.so.0: undefined reference to `FT_Get_Var_Blend_Coordinates'
BhaskarTrivedi commented 5 years ago

try removing harrfbuzz library source deactivate venv conda remove harfbuzz Troubleshoot Permission denied: '/home/bhaskarctrivedi/anaconda3/.condatmp' Change ownership from root to user sudo chown -R username:username anaconda3 Source activate venv

RozenAstrayChen commented 5 years ago

Great! thx for your help I find harrfbuzz library problem on other envirnoment MUJGO.

My conda support harfbuzz lib is too old led to problem

phizaz commented 5 years ago

Does it somehow conflict with opencv? I need to remove opencv before harfbuzz could be removed. By the way the latest harfbuzz in anaconda channel is 1.8.8. (the latest is something like 2.3.0)

wookayin commented 5 years ago

~You can try conda install -c conda-forge harfbuzz. (version is 2.3.0)~

This vizdoom requires an outdated version of harfbuzz, say 1.0.1 (from apt-get).

flavienbwk commented 5 years ago

I've installed libsndfile-dev and it solved the problem (Ubuntu).