xomachine / SteamForwarder

steam_api.dll implementation for wine. Your windows games now can interact with your linux steam! (This repo mirrors https://gitlab.com/xomachine/SteamForwarder)
MIT License
196 stars 8 forks source link

Error "Reader not found" #21

Closed tarik02 closed 6 years ago

tarik02 commented 6 years ago
python3 sf_install --steamnative --no-download <appid is here>

outputs

Connecting to steam instance...
Traceback (most recent call last):
  File "sf_install", line 189, in <module>
    steaminterface = SteamNativeInterface(config)
  File "/home/tarik02/tmp/SteamForwarder/installer/steam.py", line 38, in __init__
    self.rpid = findReader(self.pid)
  File "/home/tarik02/tmp/SteamForwarder/installer/steam.py", line 15, in findReader
    raise Exception("Reader not found")
Exception: Reader not found
xomachine commented 6 years ago

This message basically means that it is impossible to use native steam client. You may try to use steamcmd instead.

The steam launch script usually redirects the steam output to the tee command that creates a log file (at least on Arch-based distros). The sf_install script tries to find the tee process connected with steam via pipe using procfs. If such a process can not be found this error message will be shown.

It should work if you will run the steam client with pipe to another process ($ /path/to/steam/executable | cat for example)

tarik02 commented 6 years ago

Okay, i tried without --steamnative flag:

python3 sf_install --no-download <appid is here>

But there is another error:

Can not find steamcmd's steamclient.so location. Please specify it using --steamcmdclient option to unlock --depot option.
Obtaining app info...
Autoselected russian language based on locale settings
Generating manifest...
Generating the steam_api.dll wrapper just for this game...
rm -f -r /home/tarik02/tmp/SteamForwarder/nimcache
rm -f //home/tarik02/tmp/SteamForwarder/steam_api.dll.so /home/tarik02/tmp/SteamForwarder/steam_api.spec \
           steam_api_orig.spec steam_api_main.c
nim c -d:specname=/home/tarik02/.steam/steam/steamapps/common/Cossacks\ 3/steam_api.spec -d:cdfile=/home/tarik02/tmp/SteamForwarder/signatures.txt \
            --passC:"-m32" --passL:"-m32" --cpu:i386 \
            --nimcache:/tmp/tmp6jie2nb9/nimcache -o:/home/tarik02/.steam/steam/steam/steamapps/common/Cossacks\ 3/steam_api.dll.so steam_api.nim
Hint: used config file '/etc/nim.cfg' [Conf]
Hint: system [Processing]
lib/nim/system/gc_common.nim(355, 1) Error: redefinition of 'prepareDealloc'
Makefile:75: ошибка выполнения рецепта для цели «/home/tarik02/.steam/steam/steamapps/common/Cossacks 3/steam_api.dll.so»
make: *** [/home/tarik02/.steam/steam/steamapps/common/Cossacks 3/steam_api.dll.so] Ошибка 1
Generating runscripts...
...for Cossacks 3/cossacks.exe
...for Cossacks 3/config.exe
...for Cossacks 3/editor.exe
...for Cossacks 3/modman.exe
Placing steam_appid.txt to the game location...
Done! You may launch the game via scripts located at /home/tarik02/.steam/steam/steamapps/common/Cossacks 3/
xomachine commented 6 years ago

It looks like you are using outdated Nim compiler. SteamForwarder needs Nim compiler of version 0.18.0 or higher. Check it by the nim -v command.

tarik02 commented 6 years ago

Yes, my one is 0.17.2. I will try to update it later.

tarik02 commented 6 years ago

I updated nim, but a new problem has appeared:

Error: execution of an external compiler program '/usr/bin/winegcc -c -w "-mno-cygwin" "-D__WINESRC__" -m32  -I/home/tarik02/.choosenim/toolchains/nim-0.18.0/lib -o /tmp/tmp4hkgyk39/nimcache/stdlib_system.o /tmp/tmp4hkgyk39/nimcache/stdlib_system.c' failed with exit code: 2

/tmp/tmp4hkgyk39/nimcache/stdlib_system.c:13:10: fatal error: windows.h: Нет такого файла или каталога
 #include <windows.h>
          ^~~~~~~~~~~
xomachine commented 6 years ago

Have you installed the package with wine headers? It is usually named wine-devel.

tarik02 commented 6 years ago

Yes, it is already installed:

Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлен пакет wine-devel самой новой версии (3.3.0~artful).
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено.
tarik02 commented 6 years ago

I installed wine-devel-dev, but:

CC: stdlib_system
CC: steam_api
CC: wine
CC: cdecls
Error: execution of an external compiler program '/usr/bin/winegcc -c -w "-mno-cygwin" "-D__WINESRC__" -m32  -I/home/tarik02/.choosenim/toolchains/nim-0.18.0/lib -o /tmp/tmptf08yi0c/nimcache/steam_api.o /tmp/tmptf08yi0c/nimcache/steam_api.c' failed with exit code: 2

/tmp/tmptf08yi0c/nimcache/steam_api.c:12:10: fatal error: wine/debug.h: Нет такого файла или каталога
 #include "wine/debug.h"
          ^~~~~~~~~~~~~~
compilation terminated.
winegcc: gcc failed

I will try to google it...

tarik02 commented 6 years ago

I tried to comment that include, but it seems, that I have more problems because i am on x64:


ld: Relocatable linking with relocations from format elf64-x86-64 (/opt/wine-devel/lib64/wine/libwinecrt0.a(dll_entry.o)) to format elf32-i386 (steam_api.cPvzTr.o) is not supported
winebuild: ld failed with status 1
winegcc: winebuild failed
Error: execution of an external program failed: '/usr/bin/winegcc   -shared -o '/home/tarik02/.steam/steam/steamapps/common/Cossacks 3/steam_api.dll.so'  /tmp/tmpms0i89gu/nimcache/stdlib_system.o /tmp/tmpms0i89gu/nimcache/steam_api.o /tmp/tmpms0i89gu/nimcache/wine.o /tmp/tmpms0i89gu/nimcache/cdecls.o /tmp/tmpms0i89gu/nimcache/utils.o /tmp/tmpms0i89gu/nimcache/stdlib_macros.o /tmp/tmpms0i89gu/nimcache/stdlib_strutils.o /tmp/tmpms0i89gu/nimcache/stdlib_parseutils.o /tmp/tmpms0i89gu/nimcache/stdlib_math.o /tmp/tmpms0i89gu/nimcache/stdlib_algorithm.o /tmp/tmpms0i89gu/nimcache/maps.o /tmp/tmpms0i89gu/nimcache/stdlib_posix.o /tmp/tmpms0i89gu/nimcache/stdlib_strscans.o /tmp/tmpms0i89gu/nimcache/wrapper.o /tmp/tmpms0i89gu/nimcache/stdlib_tables.o /tmp/tmpms0i89gu/nimcache/stdlib_hashes.o /tmp/tmpms0i89gu/nimcache/classparser.o /tmp/tmpms0i89gu/nimcache/vtables.o /tmp/tmpms0i89gu/nimcache/generators.o /tmp/tmpms0i89gu/nimcache/stdlib_sequtils.o /tmp/tmpms0i89gu/nimcache/callback.o  '/home/tarik02/.steam/steam/steamapps/common/Cossacks 3/steam_api.spec' '/home/tarik02/tmp/SteamForwarder/versions/1.37/libsteam_api.so'  "-mno-cygwin" -m32  -ldl'
xomachine commented 6 years ago

I wonder where wine headers placed in your system? Is it in /usr/include?

The 64-bit system is not a problem by itself if it contains 32-bit libraries in /usr/lib32. /usr/lib32 should be in the LD_LIBRARY_PATH environment variable.

tarik02 commented 6 years ago
$ LD_LIBRARY_PATH=/usr/lib32 python3 sf_install --no-download 333420

Does not help... yes, my headers are in system.

xomachine commented 6 years ago

Anyway I need extensive information about your setup to reproduce and fix the issue. The information should include:

tarik02 commented 6 years ago

Linux Ubuntu 17.10 $ uname -r 4.13.0-16-generic Wine packages:

wine-devel/artful,now 3.3.0~artful amd64
wine-devel-amd64/artful,now 3.3.0~artful amd64
wine-devel-dev/artful,now 3.3.0~artful amd64
wine-devel-i386/artful,now 3.3.0~artful i386
winehq-devel/artful,now 3.3.0~artful amd64

Last release (https://github.com/xomachine/SteamForwarder/releases/tag/0.3.0) Commit https://github.com/xomachine/SteamForwarder/commit/d21a272fdfe73057e9ded7aadd853cdb4aedd6b7

$ nim -v
Nim Compiler Version 0.18.0 [Linux: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 855956bf617f68ac0be3717329e9e1181e5dc0c6
active boot switches: -d:release
xomachine commented 6 years ago

Well after some investigation I found that wine packages you are using does not place headers to the /usr/include path. Their overall structure is pretty uncommon. One of possible solutions would be running the export C_INCLUDE_PATH="/opt/wine-devel/include" command before starting (or even adding it to ~/.bashrc)

The linking problem can be solved by making symbolic link in the following way

ln -s /opt/wine-devel/lib{,32}

It might be necessary to install the libc6-dev-i386 package to avoid another linking problem I've encountered during the problem reproduction.

Summarizing, I would say it is ubuntu/package specific problem, not a bug in SteamForwarder.

tarik02 commented 6 years ago

I have libc6-dev-i386 installed, but the linking problem does not disappear...

tarik02 commented 6 years ago

The symbolic links helped