rll / cyres

Python bindings for ceres-solver (via Cython)
BSD 2-Clause "Simplified" License
44 stars 21 forks source link

error: no member named 'int16' in namespace 'ceres' #1

Open ubuntuslave opened 9 years ago

ubuntuslave commented 9 years ago

I'm trying to build cyres by going to the source folder and running:

python setup.py build

but I get errors relating to the ceres::int16 data type not existing. Is this a Cython issue with clang on Mac OS X?

arjun810 commented 9 years ago

What version of ceres-solver are you trying to build with? My hunch is it's related to not having updated cyres to work with the most recent version.

ubuntuslave commented 9 years ago

I home-brewed ceres-solver version 1.10.0. In addition, I'm using Numpy 1.9.2 and cython 0.22. Do you recall which version of ceres-solver worked for you?

arjun810 commented 9 years ago

I've got 1.8.0 right now. I think it changed in a recent version of ceres, and it looks like someone actually fixed this in a fork: https://github.com/PolarNick239/cyres/commit/1fb4674a1ef6026a536c2179cbd15e3e166522aa

I generally go through and make similar fixes every time I upgrade ceres, but I haven't upgraded recently.

ubuntuslave commented 9 years ago

I fixed this problem by changing the data type from int16 to int32 in a couple of files in the src folder.

In addition. I had to avoid linking to GPU-related libraries that my system doesn't support (for exemple, "cholmod", "camd", "amd", "colamd", "cxsparse") in the setup.py script.

I'm not sure if I should create pull request since this only solves my particular problem. I think a more dynamic setup.py is needed.

lpsinger commented 9 years ago

I wonder if @PolarNick239 could make a pull request for 1fb4674a1ef6026a536c2179cbd15e3e166522aa? That commit fixed this issue for me.

PolarNick239 commented 9 years ago

I am sorry, I forgot/not realized to do so. Will do soon (in a couple of days).