Closed ralsina closed 4 months ago
Looks like some missing dependency. Are you able to run vips properly? Try running vips --vips-config
from console and see if that works.
This shard only dependency is libvips
Here is output compiling and then running vips in the same machine.
.
ameba: checking...
Dependencies are satisfied
Building: nicolino
crystal build -o /home/ralsina/code/nicolino/bin/nicolino src/main.cr --verbose -d
cc _main.o0.o S-lice40U-I-nt841.o0.o P-ointer40U-I-nt841.o0.o A-rgumentE-rror.o0.o E-xception5858C-allS-tack.o0.o A-rra
Error target nicolino failed to compile:
/usr/bin/ld: V-ips.o0.o: undefined reference to symbol 'g_type_from_name'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /home/ralsina/code/nicolino/bin/nicolino -rdynamic
make: *** [Makefile:6: bin] Error 1
nicolino on main [$!?] is 📦 v0.1.0 via 🔮 v1.12.2 took 46s
> vips --vips-config
enable debug: no
enable deprecated library components: yes
enable modules: no
use fftw3 for FFT: yes
accelerate loops with orc: yes
ICC profile support with lcms: yes (lcms2)
zlib: yes
text rendering with pangocairo: yes
font file support with fontconfig: yes
RAD load/save: yes
Analyze7 load/save: yes
PPM load/save: yes
GIF load: yes
EXIF metadata support with libexif: yes
JPEG load/save with libjpeg: yes (pkg-config)
JXL load/save with libjxl: no (dynamic module: no)
JPEG2000 load/save with libopenjp2: yes
PNG load with libspng: no
PNG load/save with libpng: yes (pkg-config libpng >= 1.2.9)
quantisation to 8 bit: yes
TIFF load/save with libtiff: yes (pkg-config libtiff-4)
image pyramid save: yes
HEIC/AVIF load/save with libheif: yes (dynamic module: no)
WebP load/save with libwebp: yes
PDF load with PDFium: no
PDF load with poppler-glib: yes (dynamic module: no)
SVG load with librsvg-2.0: yes
EXR load with OpenEXR: yes
OpenSlide load: yes (dynamic module: no)
Matlab load with matio: yes
NIfTI load/save with niftiio: no
FITS load/save with cfitsio: yes
GIF save with cgif: yes
Magick package: MagickCore (dynamic module: no)
Magick API version: magick6
load with libMagickCore: yes
save with libMagickCore: yes
An undefined symbol error at runtime usually suggests there are multiple or conflicting versions present on the same machine, so please ensure you're using the latest dependencies and that there is one version only.
Try to run pkg-config vips --libs
and verify that linked libraries are present.
That's not at runtime, it's when doing "shards build".
Anyway, this is getting interesting :-)
> pkg-config vips --libs
Package vips was not found in the pkg-config search path.
Perhaps you should add the directory containing `vips.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vips' found
Inspecting the .deb it does have .pc files, and this works:
> PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ pkg-config vips --libs
-L/usr/lib/x86_64-linux-gnu -lvips -lgobject-2.0 -lglib-2.0
I am just going to say the ubuntu libvips package is broken, feel free to close the issue, and thanks for your time!
This is Ubuntu 22.04 with version 8.12.1-1build1 of libvips
Tried it with revision 0f4d3914985865a020168b0f48ece07416eeb459 of crystal-vips