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

Issues Building on Raspberry Pi 4 (Raspbian) #5

Open
azurefreecovid opened this issue Jul 15, 2020 · 2 comments
Open

Issues Building on Raspberry Pi 4 (Raspbian) #5

azurefreecovid opened this issue Jul 15, 2020 · 2 comments

Comments

@azurefreecovid
Copy link

Hi there,

I'd like to get this Go library building on my Raspberry Pi, but I keep getting this error

pi@raspberrypi:~/gocairo $ make                                                                                                                                                                             [60/1945]go install github.com/martine/gocairo/cairo
# github.com/martine/gocairo/cairo                                   
../go/src/github.com/martine/gocairo/cairo/path.go:43:13: type [1073741824]PathPoint larger than address space
../go/src/github.com/martine/gocairo/cairo/path.go:43:13: type [1073741824]PathPoint too large
../go/src/github.com/martine/gocairo/cairo/cairo.go:110:17: type [1073741824]_Ctype_cairo_path_data_t larger than address space                                                                                     
../go/src/github.com/martine/gocairo/cairo/cairo.go:110:17: type [1073741824]_Ctype_cairo_path_data_t too large
../go/src/github.com/martine/gocairo/cairo/cairo.go:3654:13: type [1073741824]_Ctype_cairo_svg_version_t larger than address space
../go/src/github.com/martine/gocairo/cairo/cairo.go:3654:13: type [1073741824]_Ctype_cairo_svg_version_t too large

Which I'm not exactly sure how to solve and would appreciate any pointers that people might have? I suspect it is due to the 32-bit architecture of the Raspbian distro, but am not totally sure.

Running uname on the Raspberry Pi reports the following:

Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
@evmar
Copy link
Owner

evmar commented Jul 15, 2020

I haven't touched this code in 5 years (!) but I think the issue is code like

https://github.com/evmar/gocairo/blob/master/cairo/path.go#L43

	parts := (*[1 << 30]PathPoint)(pathData)

This is setting up the destination pointer for a copy operation, so it just wanted a "very big" array.
I think you can reduce this to 1 << 20 and everything will work. (Do this in all the places the above error messages are complaining.)

@azurefreecovid
Copy link
Author

Thanks for the very prompt reply and the guidance, I'll take a look

barnybug added a commit to barnybug/carbonapi that referenced this issue Oct 5, 2022
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