Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

[setup] fix c++ compil error #84

Closed
wants to merge 1 commit into from

Conversation

PierrickKoch
Copy link

fix #80

when calling python setup.py install --user
on Ubuntu 14.04 [gcc 4.8.4 / cython 0.20.1post0]:

pcl/_pcl.cpp: In function ‘int __pyx_pf_3pcl_4_pcl_10PointCloud___cinit__(__pyx_obj_3pcl_4_pcl_PointCloud*, PyObject*)’:
pcl/_pcl.cpp:3831:49: error: ‘>>’ should be ‘> >’ within a nested template argument list
   sp_assign<pcl::PointCloud<struct pcl::PointXYZ>>(__pyx_v_self->thisptr_shared, __pyx_t_1);
                                                 ^

fix strawlab#80

when calling `python setup.py install --user`
on Ubuntu 14.04 [gcc 4.8.4 / cython 0.20.1post0]:

pcl/_pcl.cpp: In function ‘int __pyx_pf_3pcl_4_pcl_10PointCloud___cinit__(__pyx_obj_3pcl_4_pcl_PointCloud*, PyObject*)’:
pcl/_pcl.cpp:3831:49: error: ‘>>’ should be ‘> >’ within a nested template argument list
   sp_assign<pcl::PointCloud<struct pcl::PointXYZ>>(__pyx_v_self->thisptr_shared, __pyx_t_1);
                                                 ^
@nzjrs
Copy link
Contributor

nzjrs commented Feb 4, 2016

Is this a Cython or gcc bug? What here is C++0x?

@PierrickKoch
Copy link
Author

According to [1], since C++0x (aka. C++11) the '>>' (without space) is valid template list ending.
Before that it was somehow ambiguous with the Bitwise right shift operator[2].

[1] http://stackoverflow.com/questions/6695261/template-within-template-why-should-be-within-a-nested-template-arg
[2] http://en.cppreference.com/w/cpp/language/operator_arithmetic

@PierrickKoch
Copy link
Author

as @larsmans mentioned in #59 it's probably a Cython bug that was fixed in 0.21
cython/cython@43d1490e , and I'm still using 0.20.1

@larsmans
Copy link
Contributor

larsmans commented Feb 4, 2016

Isn't it easier to just upgrade Cython? Switching to C++11 mode is a sledgehammer that can break all kinds of stuff, and option syntax is different between compilers.

@nzjrs
Copy link
Contributor

nzjrs commented Feb 4, 2016

I agree with lars

@nzjrs nzjrs closed this Feb 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling issue
3 participants