I am running on a M1 macbook. librsvg
is installed using brew
.
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