Giter VIP home page Giter VIP logo

gocairo's People

Contributors

evmar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gocairo's Issues

Issues Building on Raspberry Pi 4 (Raspbian)

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

Support for WriteToSVG

Cairo can draw the current surface as an SVG. However, this function is not exposed by the gocairo bindings.

Trouble building on OS X

After some time spent downloading and building various prereqs (like cairo itself, and then fetching XQuartz and rebuilding cairo once I realized that gocairo uses the XLib bindings :), I run into this:

$ CGO_CFLAGS="-I/opt/X11/include" go get -x github.com/martine/gocairo/cairo
WORK=/var/folders/00/0t8g8000h01000cxqpysvccm00391x/T/go-build834049204
mkdir -p $WORK/github.com/martine/gocairo/cairo/_obj/
mkdir -p $WORK/github.com/martine/gocairo/
cd /Users/feinberg/go/src/github.com/martine/gocairo/cairo
pkg-config --cflags cairo
pkg-config --libs cairo
CGO_LDFLAGS="-g" "-O2" "-L/usr/local/lib" "-lcairo" /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir $WORK/github.com/martine/gocairo/cairo/_obj/ -- -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I $WORK/github.com/martine/gocairo/cairo/_obj/ -I/opt/X11/include cairo.go util.go
# github.com/martine/gocairo/cairo
could not determine kind of name for C.CAIRO_STATUS_JBIG2_GLOBAL_MISSING
could not determine kind of name for C.cairo_surface_get_device_scale
could not determine kind of name for C.cairo_surface_set_device_scale

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.