openai / retro

Retro Games in Gym
MIT License
3.39k stars 526 forks source link

Cannot install retro from source #209

Closed MrHoseongLee closed 4 years ago

MrHoseongLee commented 4 years ago

Issue summary

pip install gym-retro works however I need the integration UI so I need to install gym-retro from source. However following this code

git clone https://github.com/openai/retro.git gym-retro
cd gym-retro
pip3 install -e .

I get an error (or errors)

ERROR: Command errored out with exit status 1:
 command: /home/hoseong/OpenAIgym/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/hoseong/OpenAIgym/gym-retro/setup.py'"'"'; __file__='"'"'/home/hoseong/OpenAIgym/gym-retro/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
     cwd: /home/hoseong/OpenAIgym/gym-retro/
Complete output (141 lines):
running develop
running egg_info
writing gym_retro.egg-info/PKG-INFO
writing dependency_links to gym_retro.egg-info/dependency_links.txt
writing requirements to gym_retro.egg-info/requires.txt
writing top-level names to gym_retro.egg-info/top_level.txt
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.dylib' found anywhere in distribution
warning: no previously-included files matching '*-version' found under directory 'retro/cores'
writing manifest file 'gym_retro.egg-info/SOURCES.txt'
running build_ext
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hoseong/OpenAIgym/gym-retro
[  2%] Generating retro/cores/genesis_plus_gx_libretro.so
[ 10%] Built target gba
[ 18%] Built target atari2600
[ 26%] Built target nes
[ 34%] Built target pce
[ 42%] Built target snes
[ 50%] Built target gb
/usr/bin/ld: ./core/genesis.o:(.bss+0xa13880): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/io_ctrl.o:(.bss+0x1020): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/io_ctrl.o:(.bss+0x20): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/loadrom.o:(.bss+0x10e0): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/loadrom.o:(.bss+0xe0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/mem68k.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/mem68k.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/membnk.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/membnk.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/memz80.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/memz80.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/state.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/state.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/system.o:(.bss+0x10a0): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/system.o:(.bss+0xa0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/vdp_ctrl.o:(.bss+0x12da0): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/vdp_ctrl.o:(.bss+0x11da0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/vdp_render.o:(.bss+0x1040): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/vdp_render.o:(.bss+0x40): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/z80/z80.o:(.bss+0x480): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/z80/z80.o:(.bss+0x1480): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/ntsc/md_ntsc.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/ntsc/md_ntsc.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/ntsc/sms_ntsc.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/ntsc/sms_ntsc.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/sound/psg.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/sound/psg.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/sound/sound.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/sound/sound.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/sound/ym2413.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/sound/ym2413.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/sound/ym2612.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/sound/ym2612.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/activator.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/activator.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/gamepad.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/gamepad.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/graphic_board.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/graphic_board.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/input.o:(.bss+0x1060): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/input.o:(.bss+0x60): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/lightgun.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/lightgun.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/mouse.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/mouse.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/paddle.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/paddle.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/sportspad.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/sportspad.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/teamplayer.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/teamplayer.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/terebi_oekaki.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/terebi_oekaki.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/input_hw/xe_1ap.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/input_hw/xe_1ap.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/cd_cart.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/cd_cart.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/cdc.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/cdc.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/cdd.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/cdd.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/gfx.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/gfx.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/pcm.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/pcm.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cd_hw/scd.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cd_hw/scd.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/areplay.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/areplay.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_93c.o:(.bss+0x20): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_93c.o:(.bss+0x1020): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_i2c.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_i2c.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_spi.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/eeprom_spi.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/ggenie.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/ggenie.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/md_cart.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/md_cart.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/sms_cart.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/sms_cart.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/sram.o:(.bss+0x20): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/sram.o:(.bss+0x1020): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/svp/ssp16.o:(.bss+0x0): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/svp/ssp16.o:(.bss+0x1000): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./core/cart_hw/svp/svp.o:(.bss+0x20): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
/usr/bin/ld: ./core/cart_hw/svp/svp.o:(.bss+0x1020): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./libretro/libretro.o:(.bss+0x2020): multiple definition of `config'; ./core/cd_hw/libchdr/src/chd.o:(.bss+0x0): first defined here
/usr/bin/ld: ./libretro/libretro.o:(.bss+0x1020): multiple definition of `zbank_memory_map'; ./core/genesis.o:(.bss+0xa12880): first defined here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile.libretro:482: genesis_plus_gx_libretro.so] Error 1
make[3]: *** [CMakeFiles/genesis.dir/build.make:91: retro/cores/genesis_plus_gx_libretro.so] Error 2
make[2]: *** [CMakeFiles/Makefile2:531: CMakeFiles/genesis.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:430: CMakeFiles/retro.dir/rule] Error 2
make: *** [Makefile:308: retro] Error 2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/hoseong/OpenAIgym/gym-retro/setup.py", line 74, in <module>
    setup(
  File "/home/hoseong/OpenAIgym/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/hoseong/OpenAIgym/venv/lib/python3.8/site-packages/setuptools/command/develop.py", line 38, in run
    self.install_for_development()
  File "/home/hoseong/OpenAIgym/venv/lib/python3.8/site-packages/setuptools/command/develop.py", line 140, in install_for_development
    self.run_command('build_ext')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/hoseong/OpenAIgym/gym-retro/setup.py", line 64, in run
    subprocess.check_call([make_exe, jobs, 'retro'])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/make', '-j12', 'retro']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/hoseong/OpenAIgym/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/hoseong/OpenAIgym/gym-retro/setup.py'"'"'; __file__='"'"'/home/hoseong/OpenAIgym/gym-retro/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

gcc version

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.0

System information

endrift commented 4 years ago

This may be related to the fact that gcc 10 made -fno-common the default.

MrHoseongLee commented 4 years ago

Tried the same with gcc 9.3.0 error is still present.

endrift commented 4 years ago

Make sure to git clean -dfx to ensure everything got cleaned up first.

MrHoseongLee commented 4 years ago

Thanks! That solved the issue.