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

Lost bytes when running on ARM7 #5

Closed
Eliatrope38 opened this issue Nov 28, 2019 · 6 comments
Closed

Lost bytes when running on ARM7 #5

Eliatrope38 opened this issue Nov 28, 2019 · 6 comments

Comments

@Eliatrope38
Copy link

Eliatrope38 commented Nov 28, 2019

Hello,
I try to use your lib on a raspberry pi (raspbian based ), I've just used your Msgrcv test as example, it works well on a x86 computer, but on an ARM7 Everytime I lost the 4th first bytes.

Generate key 705037316
Create ipc queue id 0
Message [24 45 68 0 251 33 9 64] send to ipc id 0
Message [24 45 68 0 0 0 0 0] receive to ipc id 0
2019/11/28 16:50:34 Input = [24 45 68 0 0 0 0 0], want [24 45 68 0 251 33 9 64]

It's probably an issue with cgo but to you have an idea for fixing that ?

Thank you

@Eliatrope38
Copy link
Author

if it can help I've try to compile it directly on the RPI using

env CGO_ENABLED=1 go build -o test_ipc

but no change

@siadat
Copy link
Owner

siadat commented Nov 28, 2019

Thanks @Eliatrope38, I will have a look today.

@siadat
Copy link
Owner

siadat commented Nov 29, 2019

The problem is with the uint64s in the code while your system is 32 bit. Replacing uint64 with uint solves the problem. I will push a commit that fixes this issue shortly.

(To fix this, I reproduced the issue on Raspbian running virtually on Qemu, thanks to qemu-rpi-kernel.)

@siadat
Copy link
Owner

siadat commented Nov 29, 2019

I added arm7 to Travis as well. It looks like the tests are passed.

@Eliatrope38, could you please verify if the issue is solved on your side as well?

@Eliatrope38
Copy link
Author

@siadat , perfect it works well.
Thank you for your great support

@siadat
Copy link
Owner

siadat commented Nov 29, 2019

@Eliatrope38 Thank you for reporting this issue!

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

2 participants