-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
TypeError: No registered converter was able to produce a C++ rvalue ... #49
Comments
A possible hint: libavg/libavg#728 |
Turns it's probably some boost version's bug. |
Shouldn't we then increase the boost version requirement to 1.59? On 5 May 2016 at 10:20, Michał Kempka notifications@github.com wrote:
|
I thought about this but I was not fully convinced. The link you provided earlier refers to boost 1.60... |
OK. Indeed, on my boost 1.58, it works without problems. On 5 May 2016 at 10:46, Michał Kempka notifications@github.com wrote:
|
Hmmm the person which shared this issue also had 1.58 version so maybe it's not about the version but some installation error. |
Right. That is what I meant. On 5 May 2016 at 10:58, Michał Kempka notifications@github.com wrote:
|
This problem is still there and it is related to g++ version. I have boost 1.58 (Ubuntu 15.10) and I get this (runtime) error when using g++ 4.8.4. But it works flawlessly on g++ 5.2.1. (And this is serious because we do need g++ 4.8.4 since CUDA does not work on gcc>=4.9) |
Are you sure? I have g++ 4.8.5 and it works ok. |
Double-checked. The following configuration does not work for me. Changing
g++ to 5.2.1 solves the problem.
```
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- thread
-- system
-- date_time
-- chrono
-- regex
-- iostreams
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR)
-- Using system zlib
-- Using internal jpeg library
-- Using internal bzip2 library
-- Using internal gme library
-- Performing Test HAVE_NO_ARRAY_BOUNDS
-- Performing Test HAVE_NO_ARRAY_BOUNDS - Success
-- Performing Test __LIBGME_TEST_VISIBILITY
-- Performing Test __LIBGME_TEST_VISIBILITY - Success
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- /usr/include
-- /home/wojciech/projects/ViZDoom/src/vizdoom/bzip2
-- /home/wojciech/projects/ViZDoom/src/vizdoom/lzma/C
-- Looking for itoa
-- Looking for itoa - not found
-- Performing Test DUMB_CAN_USE_SSE
-- Performing Test DUMB_CAN_USE_SSE - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- checking for module 'gtk+-2.0'
-- package 'gtk+-2.0' not found
-- Found SDL2:
/usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-- Could not find FMOD include files
-- Could NOT find FluidSynth (missing: FLUIDSYNTH_LIBRARIES
FLUIDSYNTH_INCLUDE_DIR)
-- Selected assembler: /usr/bin/as
-- Looking for filelength
-- Looking for filelength - not found
-- Looking for strupr
-- Looking for strupr - not found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for strnicmp
-- Looking for strnicmp - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Performing Test HAS_VA_COPY
-- Performing Test HAS_VA_COPY - Success
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- thread
-- system
-- date_time
-- chrono
-- Fluid synth libs: FLUIDSYNTH_LIBRARIES-NOTFOUND
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.10",
minimum required is "2.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found
suitable version "2.7.10", minimum required is "2.7")
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.10")
-- Found NUMPY:
/home/wojciech/.local/lib/python2.7/site-packages/numpy/core/include
-- Found components for NumPy
-- NUMPY_ROOT_DIR = /usr/local
-- NUMPY_INCLUDES =
/home/wojciech/.local/lib/python2.7/site-packages/numpy/core/include
-- NUMPY_LIBRARIES =
-- NUMPY_API_VERSION = 1.11.0
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wojciech/projects/ViZDoom
```
|
After a bit of testing I can confirm that there are problem with rvalue and lvalue conversion between Python str type and std::string when compiling with gcc version lower then 5. So I've added workaround -> conversion from Python str to cstring and then from cstring to std::string. (Tested on gcc 4.7, 4.8, 4.9, 5, 6) |
There is a bug for a particular combination of gcc and boost that does not correctly register a converter from a python str to std::string [1]. Unfortunately, this combination is used by a default conda installation. The easiest for now is to get rid of the string conversion. [1] Farama-Foundation/ViZDoom#49
This is a workaround for a bug triggered by the combination of boost/gcc used in conda (Farama-Foundation/ViZDoom#49).
from Csaba Zsolnai on google groups
"
i have some trouble making the basic example run after building vizdoom.
I get the following error:
python basic.py
Traceback (most recent call last):
File "basic.py", line 13, in
from vizdoom import DoomGame
TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type str
I am running Ubuntu 15.10 64 bit
"
The text was updated successfully, but these errors were encountered: