pdf-raku/Font-FreeType-raku

Tests fail on Linux Mint 19.2

Closed this issue · 3 comments

vrurg commented

Tests fail with the following message:

Must specify something as a path: did you mean '.' for the current directory?
  in sub guess_library_name at /home/vrurg/raku/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 225
  in method setup at /home/vrurg/raku/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 285
  in block  at /home/vrurg/raku/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 594
  in method outline at /home/vrurg/src/Raku/Font-FreeType-p6/lib/Font/FreeType/Native.pm (Font::FreeType::Native) line 246
  in method outline at /home/vrurg/src/Raku/Font-FreeType-p6/lib/Font/FreeType/GlyphImage.pm (Font::FreeType::GlyphImage) line 49
  in block <unit> at t/00-basic.t line 41

libfreetype6 and libfreetype6-dev packages are installed:

Package: libfreetype6
Version: 2.8.1-2ubuntu2
Package: libfreetype6-dev
Version: 2.8.1-2ubuntu2
> ll /usr/lib/x86_64-linux-gnu/libfreetype.*                                                       
-rw-r--r-- 1 root root 1037428 Apr 12  2018 /usr/lib/x86_64-linux-gnu/libfreetype.a
-rw-r--r-- 1 root root     906 Apr 12  2018 /usr/lib/x86_64-linux-gnu/libfreetype.la
lrwxrwxrwx 1 root root      21 Apr 12  2018 /usr/lib/x86_64-linux-gnu/libfreetype.so -> libfreetype.so.6.15.0
lrwxrwxrwx 1 root root      21 Apr 12  2018 /usr/lib/x86_64-linux-gnu/libfreetype.so.6 -> libfreetype.so.6.15.0
-rw-r--r-- 1 root root  735704 Apr 12  2018 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.15.0

Tried on a 32-bit Mint 19.3 with libfreetype6 and libfreetype-dev version 2.81 against Rakudo blead.

Haven't been able to replicate the error yet.

Appears to happen at Font::FreeType::Native line 246 when trying to resolve symbol "ft6_glyph_outline"from the wrapper library "libft6,so: that should have been built by Build.pm.

$ perl6 -I . -MFont::FreeType::Native -e'say Font::FreeType::Native::FT-WRAPPER-LIB'
/home/david/git/Font-FreeType-p6/resources/libraries/libft6.so
$ ls -l resources/libraries/
total 20
-rwxr-xr-x 1 david david 16552 Jan 13 07:54 libft6.so

I can manually access the symbol without an error:

$ perl6 -MFont::FreeType::Native -MNativeCall -e'cglobal(Font::FreeType::Native::FT-WRAPPER-LIB, "ft6_glyph_outline", Pointer)'

What are you getting?

Update: I've just committed Font::FreeType v0.2.1 which follows the lead of LibXML and Cairo, moving the library definitions, e.g. from Font::FreeType::Native::FT-LIB to $Font::FreeType::Native::Defs::FT-LIB

So this should now work: perl6 -I. -MFont::FreeType::Native::Defs -MNativeCall -e'cglobal($FT-WRAPPER-LIB, "ft6_glyph_outline", Pointer)'

Just thought I'd standardize. Please try again with v0.2.1

vrurg commented

I just realized that it was my bad in first place: I forgot about zef build. Perhaps, it worth adding a note about it to README.md. Still, as long as the previous failure was coming from zef install I guess there was a problem of some kind.

Pulling master and building makes tests passing ok. Closing.

Thank you!

Have added some notes to the README and sanity tests to t/00basic.t that freetype is installed and bindings have been built. Uploaded to CPAN