Discussion:
[C++-sig] Boost.Python "contains" compile fix
Huebl, Axel
2015-03-30 15:16:46 UTC
Permalink
Hi,


adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html

Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14

Does anyone know how to test my patch to see if this function is still
working as expected?


Thank you for your help,
Axel
Stefan Seefeld
2015-03-30 15:42:53 UTC
Permalink
Post by Huebl, Axel
Hi,
adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html
Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14
Does anyone know how to test my patch to see if this function is still
working as expected?
I have looked at your patch, but am not convinced that this is the right
fix. It would be best to really map "contains" to "__contains__" to
preserve the precise semantic of that call.
Do you see the "incomplete type" error only with nvcc or also with other
compilers (clang, notably) ?

Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
Huebl, Axel
2015-03-30 20:37:59 UTC
Permalink
Post by Stefan Seefeld
Post by Huebl, Axel
Hi,
adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html
Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14
Does anyone know how to test my patch to see if this function is still
working as expected?
I have looked at your patch, but am not convinced that this is the right
fix. It would be best to really map "contains" to "__contains__" to
preserve the precise semantic of that call.
Do you see the "incomplete type" error only with nvcc or also with other
compilers (clang, notably) ?
Thanks,
Stefan
Hi Stefan,


I did only triggered the compile error it with nvcc since that is the
target I want to move Boost.Python to.

The main problem is actually in accessing the this->attr() method since
it's return type "const_object_attribute" is not yet fully typed.

Maybe it is therefore enough to just move the implementation of
api::object_operators<U>::contains

down to a source file, but I did not find an according
object_core.cpp

Do you have any hints on that?


Thanks,
Axel
Huebl, Axel
2015-03-30 20:39:37 UTC
Permalink
Post by Huebl, Axel
Post by Stefan Seefeld
Post by Huebl, Axel
Hi,
adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html
Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14
Does anyone know how to test my patch to see if this function is still
working as expected?
I have looked at your patch, but am not convinced that this is the right
fix. It would be best to really map "contains" to "__contains__" to
preserve the precise semantic of that call.
Do you see the "incomplete type" error only with nvcc or also with other
compilers (clang, notably) ?
Thanks,
Stefan
Hi Stefan,
I did only triggered the compile error it with nvcc since that is the
target I want to move Boost.Python to.
oh that wasn't precise enough: to answer your question,
I did not try it with clang (yet).
Post by Huebl, Axel
The main problem is actually in accessing the this->attr() method since
it's return type "const_object_attribute" is not yet fully typed.
Maybe it is therefore enough to just move the implementation of
api::object_operators<U>::contains
down to a source file, but I did not find an according
object_core.cpp
Do you have any hints on that?
Thanks,
Axel
Stefan Seefeld
2015-03-30 20:42:32 UTC
Permalink
Post by Huebl, Axel
Post by Stefan Seefeld
Post by Huebl, Axel
Hi,
adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html
Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14
Does anyone know how to test my patch to see if this function is still
working as expected?
I have looked at your patch, but am not convinced that this is the right
fix. It would be best to really map "contains" to "__contains__" to
preserve the precise semantic of that call.
Do you see the "incomplete type" error only with nvcc or also with other
compilers (clang, notably) ?
Thanks,
Stefan
Hi Stefan,
I did only triggered the compile error it with nvcc since that is the
target I want to move Boost.Python to.
The main problem is actually in accessing the this->attr() method since
it's return type "const_object_attribute" is not yet fully typed.
Maybe it is therefore enough to just move the implementation of
api::object_operators<U>::contains
down to a source file, but I did not find an according
object_core.cpp
Do you have any hints on that?
Not yet. I was asking about clang because I believe nvcc is based on
clang, and woud thus allow me to attempt to reproduce the problem
without having to install nvcc first.

(I have run into issues such as the above with my own code using clang,
but refactoring the code to make sure all the right pieces are seen in
the right order can open up a huge rat-hole, if there are circular
dependencies...)
Post by Huebl, Axel
oh that wasn't precise enough: to answer your question,
I did not try it with clang (yet).
Trying that would be useful, I think.

Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
Axel Hübl
2015-03-30 20:37:42 UTC
Permalink
Post by Stefan Seefeld
Post by Huebl, Axel
Hi,
adding more Python 3 features, the "contains" method was added (in 1.55.0?)
http://www.boost.org/doc/libs/1_55_0/libs/python/doc/news.html
Unfortunately, I found a nasty compile bug when compiling with nvcc that
I tried to fix in
https://github.com/boostorg/python/pull/14
Does anyone know how to test my patch to see if this function is still
working as expected?
I have looked at your patch, but am not convinced that this is the right
fix. It would be best to really map "contains" to "__contains__" to
preserve the precise semantic of that call.
Do you see the "incomplete type" error only with nvcc or also with other
compilers (clang, notably) ?
Thanks,
Stefan
Hi Stefan,


I did only triggered the compile error it with nvcc since that is the
target I want to move Boost.Python to.

The main problem is actually in accessing the this->attr() method since
it's return type "const_object_attribute" is not yet fully typed.

Maybe it is therefore enough to just move the implementation of
api::object_operators<U>::contains

down to a source file, but I did not find an according
object_core.cpp

Do you have any hints on that?


Thanks,
Axel

Loading...