Giter VIP home page Giter VIP logo

rsvg's People

Contributors

tallakt avatar teamon avatar

Stargazers

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

Watchers

 avatar

Forkers

tallakt adrienmo

rsvg's Issues

Does not compile on Linux

Currently this lib does not compile on Linux:

  • Compile on Alpine
  • Compile on Ubuntu

Alpine

$ mix test --only os:alpine
...
#12 0.937 mkdir -p "/app/_build/test/lib/rsvg/priv"
#12 0.939 Package librsvg-2.0 was not found in the pkg-config search path.
#12 0.939 Perhaps you should add the directory containing `librsvg-2.0.pc'
#12 0.939 to the PKG_CONFIG_PATH environment variable
#12 0.939 Package 'librsvg-2.0', required by 'virtual:world', not found
#12 0.939 cc -g -O3 -Wall -Wno-format-truncation -fPIC -I/usr/local/lib/erlang/erts-13.1.2/include -shared  c_src/rsvg.c -o /app/_build/test/lib/rsvg/priv/rsvg.so
#12 0.959 c_src/rsvg.c:2:10: fatal error: librsvg/rsvg.h: No such file or directory
#12 0.959     2 | #include <librsvg/rsvg.h>
#12 0.959       |          ^~~~~~~~~~~~~~~~
#12 0.959 compilation terminated.
#12 0.961 make: *** [Makefile:20: /app/_build/test/lib/rsvg/priv/rsvg.so] Error 1
#12 0.963 ** (Mix) Could not compile with "make" (exit status: 2).
...

Ubuntu

$ mix test --only os:ubuntu
#13 0.748 mkdir -p "/app/_build/test/lib/rsvg/priv"
#13 0.752 cc -g -O3 -Wall -Wno-format-truncation -fPIC -I/usr/local/lib/erlang/erts-13.1.2/include -shared -pthread -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/aarch64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo c_src/rsvg.c -o /app/_build/test/lib/rsvg/priv/rsvg.so
#13 0.873 Compiling 1 file (.ex)
#13 0.887 
#13 0.887 10:36:37.419 [warning] The on_load function for module Elixir.RSVG returned:
#13 0.887 {:error,
#13 0.887  {:load_failed,
#13 0.887   'Failed to load NIF library: \'/app/_build/test/lib/rsvg/priv/rsvg.so: undefined symbol: g_object_unref\''}}
#13 0.887 
#13 0.888 Generated rsvg app
#13 1.007 Excluding tags: [:os]
#13 1.007 
#13 1.016 =WARNING REPORT==== 14-Dec-2022::10:36:37.553777 ===
#13 1.016 The on_load function for module Elixir.RSVG returned:
#13 1.016 {error,{load_failed,"Failed to load NIF library: '/app/_build/test/lib/rsvg/priv/rsvg.so: undefined symbol: g_object_unref'"}}
#13 1.016 

Does not build on OSX

I am running on a M1 macbook. librsvg is installed using brew.

I entered iex and tried to install the library from git. The installation failed.

Erlang/OTP 25 [erts-13.1.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace]

Interactive Elixir (1.14.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Mix.install([{:rsvg, "~> 0.1.0", git: "https://github.com/teamon/rsvg.git"}])
* Getting rsvg (https://github.com/teamon/rsvg.git)
remote: Enumerating objects: 36, done.        
remote: Counting objects: 100% (36/36), done.        
remote: Compressing objects: 100% (21/21), done.        
remote: Total 36 (delta 8), reused 35 (delta 7), pack-reused 0        
origin/HEAD set to main
mkdir -p ./priv
cc -g -O3 -ansi -Werror -I/opt/homebrew/Cellar/erlang/25.1.1/lib/erlang/erts-13.1.1/include -fPIC -shared -dynamiclib -undefined dynamic_lookup -I/opt/homebrew/Cellar/librsvg/2.55.1/include/librsvg-2.0 -I/opt/homebrew/Cellar/gdk-pixbuf/2.42.10/include/gdk-pixbuf-2.0 -I/opt/homebrew/Cellar/jpeg-turbo/2.1.4/include -I/opt/homebrew/Cellar/libtiff/4.4.0_1/include -I/opt/homebrew/Cellar/glib/2.74.3/include -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/glib/2.74.3/include -I/opt/homebrew/Cellar/glib/2.74.3/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.74.3/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.40/include -I/opt/homebrew/Cellar/pixman/0.40.0/include/pixman-1 -I/opt/homebrew/Cellar/fontconfig/2.14.1/include -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/libpng/1.6.39/include/libpng16 -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxrender/0.9.10/include -I/opt/homebrew/Cellar/libxext/1.3.5/include -I/opt/homebrew/Cellar/libx11/1.8.2/include -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxau/1.0.10/include -I/opt/homebrew/Cellar/libxdmcp/1.1.3/include -I/opt/homebrew/Cellar/xorgproto/2022.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/ffi -L/opt/homebrew/Cellar/librsvg/2.55.1/lib -L/opt/homebrew/Cellar/glib/2.74.3/lib -L/opt/homebrew/Cellar/gdk-pixbuf/2.42.10/lib -L/opt/homebrew/Cellar/glib/2.74.3/lib -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/Cellar/cairo/1.16.0_5/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -o priv/rsvg.so c_src/rsvg.c
ld: warning: -undefined dynamic_lookup may not work with chained fixups
==> rsvg
Compiling 1 file (.ex)

10:50:24.792 [warning] The on_load function for module Elixir.RSVG returned:
{:error,
 {:load_failed,
  'Failed to load NIF library: \'dlopen(/Users/tallakt/Library/Caches/mix/installs/elixir-1.14.2-erts-13.1.1/4d9812d4f8daadd40fa0549837020dc5/_build/dev/lib/rsvg/priv/rsvg.so, 0x0002): tried: \'/Users/tallakt/Library/Caches/mix/installs/elixir-1.14.2-erts-13.1.1/4d9812d4f8daadd40fa0549837020dc5/_build/dev/lib/rsvg/priv/rsvg.so\' (no such file)\''}}

Generated rsvg app
:ok

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.