Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rakudo (Moar 2019.07.1): Gumbo install via zef aborts due to test failure #12

Closed
jubilatious1 opened this issue Sep 14, 2019 · 2 comments

Comments

@jubilatious1
Copy link

Hello, your module was recommended on reddit on the thread below (bottom). However when I try to install it via zef on a recent Rakudo install (MacOS machine), the Gumbo install aborts due to test failure:

(base) mbook:~ homedir$ zef install Gumbo
===> Searching for: Gumbo
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Searching for missing dependencies: XML
===> Testing: XML:ver<0.3.0>:auth<Timothy Totten>
===> Testing [OK] for XML:ver<0.3.0>:auth<Timothy Totten>
===> Testing: Gumbo:ver<1.0>:auth<Sylvain Colinet>
Cannot locate native library 'libgumbo.1.dylib': dlopen(libgumbo.1.dylib, 1): image not found
  in method setup at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 287
  in method CALL-ME at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 576
  in method parse at /Users/homedir/.zef/store/perl6-gumbo.git/3009506902d23eed4ef1b37b08ee6a4bffea6d8a/lib/Gumbo/Parser.pm6 (Gumbo::Parser) line 22
  in sub parse-html at /Users/homedir/.zef/store/perl6-gumbo.git/3009506902d23eed4ef1b37b08ee6a4bffea6d8a/lib/Gumbo.pm6 (Gumbo) line 136
  in block <unit> at t/01_basic.t line 21

Cannot locate native library 'libgumbo.1.dylib': dlopen(libgumbo.1.dylib, 1): image not found
  in method setup at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 287
  in method CALL-ME at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 576
  in method parse at /Users/homedir/.zef/store/perl6-gumbo.git/3009506902d23eed4ef1b37b08ee6a4bffea6d8a/lib/Gumbo/Parser.pm6 (Gumbo::Parser) line 22
  in sub parse-html at /Users/homedir/.zef/store/perl6-gumbo.git/3009506902d23eed4ef1b37b08ee6a4bffea6d8a/lib/Gumbo.pm6 (Gumbo) line 136
  in block <unit> at t/02_filters.t line 10

Cannot locate native library 'libgumbo.1.dylib': dlopen(libgumbo.1.dylib, 1): image not found
  in method setup at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 287
  in method CALL-ME at /Users/homedir/rakudo/rakudo-2019.07.1/install/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 576
  in method parse at /Users/homedir/.zef/store/perl6-gumbo.git/3009506902d23eed4ef1b37b08ee6a4bffea6d8a/lib/Gumbo/Parser.pm6 (Gumbo::Parser) line 22
  in block <unit> at t/03_stats.t line 21

===> Testing [FAIL]: Gumbo:ver<1.0>:auth<Sylvain Colinet>
Aborting due to test failure: Gumbo:ver<1.0>:auth<Sylvain Colinet> (use --force-test to override)
(base) mbook:~ homedir$ 

Maybe this whole issue will clear up when the next version of Rakudo is released next week, but I thought you should know. Best Regards.

Ref: https://www.reddit.com/r/perl6/comments/7ezrz7/ive_written_a_small_bbc_news_scraper_in_perl_6/

@Skarsnik
Copy link
Owner

Hello, you need to install the Gumbo library first. If it still fail to find it you can tell the module how to find it with PERL6_GUMBOLIB="/path/to/.dylib"

@jubilatious1
Copy link
Author

Ahhh. Thank you. Somehow I got confused between your module and @ruz 's Perl5 HTML-Gumbo module, which he describes as a P5 module that "help[s] install gumbo parser for perl modules to use."

A few installation notes:

-- 1. I tried installing Google's gumbo-parser using both HomeBrew and MacPorts, but it was only after HomeBrew installation that your P6 Gumbo module worked.

https://formulae.brew.sh/formula/gumbo-parser

mbook:~ homedir$ brew install gumbo-parser
mbook:~ homedir$ PERL6_GUMBOLIB='/opt/local/lib/libgumbo.1.dylib' zef install Gumbo

-- 2. There's a minor error in one line of your Gumbo::Parser test code. The "->" in your code has been replaced by a "." to give the working code below:

my $xmldoc = $parser.parse($xml);

-- 3. Would it be best within your README.md to include a link to Google's gumbo-parser Github repo?

https://github.com/google/gumbo-parser

-- 4. Finally, don't you want to tell the whole world about your perl6-gumbo module? Please send a pull request asking Google to update their README.md section entitled "External Bindings and other wrappers" to include your perl6-gumbo module.

https://github.com/google/gumbo-parser/blob/master/README.md

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants