duckduckgo / p5-app-duckpan

DuckDuckHack OpenSource Development Application
http://metacpan.org/module/App::DuckPAN
Other
53 stars 47 forks source link

"installdeps" problem with zeroclickinfo-goodies #122

Closed tommytommytommy closed 7 years ago

tommytommytommy commented 10 years ago

(My first few hours familiarizing myself with this project; may have missed something obvious...)

Just forked/cloned zeroclickinfo-goodies and followed the directions at https://duck.co/duckduckhack/goodie_testing_triggers to set up testing on a VMWare image of DuckDuckGo's development virtual machine (the virtual machine came from "ddh-vmw.rar" and has MD5 checksum 95ad9acfacadb4b0cb0cf23ffaa3516e).

Step 3 of the instructions, run the command "duckpan installdeps" inside the repository root, fails because of a missing file named "mpfr.h". I've included the build log below. I also tried rerunning the command without success both before and after updating duckpan. However, forking/cloning zeroclickinfo-spice and running "duckpan installdeps" inside that repository succeeds without problems.

Here's the build log: cpanm (App::cpanminus) 1.6937 on perl 5.016003 built for x86_64-linux Work directory is /home/dax/.cpanm/work/1411270596.18832 You have make /usr/bin/make You have LWP 6.05 You have /bin/tar: tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason. Searching DateTime::Calendar::Chinese on cpanmetadb ... --> Working on DateTime::Calendar::Chinese Fetching http://www.cpan.org/authors/id/D/DM/DMAKI/DateTime-Calendar-Chinese-1.00.tar.gz -> OK Unpacking DateTime-Calendar-Chinese-1.00.tar.gz Entering DateTime-Calendar-Chinese-1.00 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.72) Configuring DateTime-Calendar-Chinese-1.00 Running Makefile.PL Warning: prerequisite DateTime::Event::Chinese 1.00 not found. Checking if your kit is complete... Looks good Writing Makefile for DateTime::Calendar::Chinese Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.72) Checking if you have DateTime::Event::Chinese 1.00 ... No ==> Found dependencies: DateTime::Event::Chinese Searching DateTime::Event::Chinese on cpanmetadb ... --> Working on DateTime::Event::Chinese Fetching http://www.cpan.org/authors/id/D/DM/DMAKI/DateTime-Event-Chinese-1.00.tar.gz -> OK Unpacking DateTime-Event-Chinese-1.00.tar.gz Entering DateTime-Event-Chinese-1.00 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.72) Configuring DateTime-Event-Chinese-1.00 Running Makefile.PL Cannot determine perl version info from lib/DateTime/Event/Chinese.pm Warning: prerequisite DateTime::Astro 0 not found. Checking if your kit is complete... Looks good Writing Makefile for DateTime::Event::Chinese Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have DateTime::Astro 0 ... No Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.72) Checking if you have Math::Round 0 ... Yes (0.06) ==> Found dependencies: DateTime::Astro Searching DateTime::Astro on cpanmetadb ... --> Working on DateTime::Astro Fetching http://www.cpan.org/authors/id/D/DM/DMAKI/DateTime-Astro-1.00.tar.gz -> OK Unpacking DateTime-Astro-1.00.tar.gz Entering DateTime-Astro-1.00 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.72) Checking if you have ExtUtils::ParseXS 2.21 ... Yes (3.24) Checking if you have Devel::PPPort 3.19 ... Yes (3.20) Configuring DateTime-Astro-1.00 Running Makefile.PL Cannot determine perl version info from lib/DateTime/Astro.pm Writing ppport.h Checking if your kit is complete... Looks good Writing Makefile for DateTime::Astro Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have DateTime 0 ... Yes (1.03) Checking if you have DateTime::Set 0 ... Yes (0.3400) Checking if you have XSLoader 0.02 ... Yes (0.16) Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.72) Checking if you have ExtUtils::ParseXS 2.21 ... Yes (3.24) Checking if you have Devel::PPPort 3.19 ... Yes (3.20) Checking if you have Exporter 5.57 ... Yes (5.66) Building and testing DateTime-Astro-1.00 cp lib/DateTime/AstroXS.pm blib/lib/DateTime/AstroXS.pm cp lib/DateTime/Event/SolarTerm.pm blib/lib/DateTime/Event/SolarTerm.pm cp lib/DateTime/AstroPP.pm blib/lib/DateTime/AstroPP.pm cp lib/DateTime/Astro.pm blib/lib/DateTime/Astro.pm /home/dax/perl5/perlbrew/perls/perl-5.16.3/bin/perl "-Iinc" /home/dax/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/ExtUtils/xsubpp -typemap /home/dax/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/ExtUtils/typemap xs/dt_astro.xs > xs/dt_astro.xsc && mv xs/dt_astro.xsc xs/dt_astro.c cc -c "-I." "-I." -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -Wno-comment -O2 -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -o xs/dt_astro.o -fPIC "-I/home/dax/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux/CORE" -DUSE_PPPORT xs/dt_astro.c In file included from xs/dt_astro.xs:1:0: xs/dt_astro.h:9:18: fatal error: mpfr.h: No such file or directory compilation terminated. make: *\ [xs/dt_astro.o] Error 1 -> FAIL Installing DateTime::Astro failed. See /home/dax/.cpanm/work/1411270596.18832/build.log for details. Retry with --force to force install it. -> FAIL Installing the dependencies failed: Module 'DateTime::Astro' is not installed -> FAIL Bailing out the installation for DateTime-Event-Chinese-1.00. -> FAIL Installing the dependencies failed: Module 'DateTime::Event::Chinese' is not installed -> FAIL Bailing out the installation for DateTime-Calendar-Chinese-1.00. Already tried DateTime::Event::Chinese. Skipping.

mintsoft commented 10 years ago

@tommytommytommy I believe the mpfr package needs to be installed: sudo apt-get install libmpfr4

Unfortunately as it's a binary dependency installdeps won't install it

Also might need libmpfr-dev

mintsoft commented 10 years ago

@tommytommytommy just re-created and tested this;

If you do sudo apt-get install libmpfr-dev and then duckpan installdeps it'll work without error:

It's not obvious from the output, however the rest of duckpan will continue to work even with this installdeps failure, only the goodies that depend on this module failing to load. We can probably do something to at least improve the output/documentation considerably here @moollaza @mwmiller @jagtalon

tommytommytommy commented 10 years ago

Thanks! Installing libmpfr-dev worked for me.

mintsoft commented 10 years ago

Excellent, I'll leave this issue open for now until we can come up with a nicer way of handling it

moollaza commented 10 years ago

Looking here: http://search.cpan.org/dist/Dist-Zilla/lib/Dist/Zilla/Plugin/Prereqs.pm it seems like we're able to specify somewhat "optional" dependencies. I'm not sure how that works when the installer is running (hopefully it prompts the user?)

My thinking is that we can make the Perl packages that depend on system packages "optional". This would hopefully prevent Dist::Zilla from trying to install them when it's highly likely most users won't need them.

@mintsoft @mwmiller @jagtalon any thoughts or alternative suggestions? IMHO I think we should just avoid Perl packages that require system packages, or those IA's should be in their own repo(s), where we can tell dev's what sys packages are required to prevent these kinds of problems.

Either way right now we don't have a nice way of handling IA's with system deps which is not good.

mintsoft commented 10 years ago

I think the ideal for me would be for it to succeed but basically say "non fatal: I couldn't install the following dependencies but you can still plough-on running duckpan" or similar. I think system dependencies shouldn't be installed directly as this would require running duckpan as root.