Skip to content
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

Cross compile for rpi3 64 bits #248

Open
Minipada opened this issue Dec 30, 2017 · 3 comments
Open

Cross compile for rpi3 64 bits #248

Minipada opened this issue Dec 30, 2017 · 3 comments

Comments

@Minipada
Copy link

I am currently trying to cross compile the software for a rpi3 in 64 bits (aarch64) with GCC/GXX 5.4

I am have managed to set the configuration flags but I'm coming across this issue:

error: cannot convert 'ptrdiff_t* {aka long int*}' to 'int*' in assignment

This seems to be due to architecture. Do you know if there is a flag to enable to handle it?

Thanks

@jumonatr
Copy link
Contributor

jumonatr commented Jan 2, 2018

It's probably just a case where the code is assigning to the wrong type, but it happens to be the right one when building for x86. What line is this occurring on?

@vyi
Copy link

vyi commented Dec 7, 2020

Hi Guys,

I came across this same issue while building g2o for arm64-v8a (on Android) using CMake based ndk-toolchain. For me this issue was coming while compiling the csparse solver.

I tried to manually cast ptrdiff_t to int * but there are too many places where this is needed (in files linear_csparse_solver, csparse_extension, core/marginal_covariance_cholesky ..) and I'm afraid this might break other things !!!

I found that rk had used the following define in the included csparse lib (file EXTERNAL/csparse/cs.h):

// rk: We define csi to be int to be backward compatible with older CSparse releases.
//     At some point we might adapt the internal structures of g2o to use the same type
//     as the one given is this header file.
#define csi int


This was helping with the build. However it was throwing compile time error when using the library for a arm64-v8a platform.

Now what is the correct way to fix this issue?

Using the following branch : 20200410_git

@RainerKuemmerle I have also tried to build with separately built csparse library from here v4.0.2 This same version was used by 20200410_git branch and after using that the build was not going throught and I asked the following question on SO.

@jiapei100
Copy link

Same here... On X86_64.
Any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants