Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572000 - dev-perl/GD-2.560.0 incomplete build/install
Summary: dev-perl/GD-2.560.0 incomplete build/install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-15 15:50 UTC by Tijs Van Buggenhout
Modified: 2016-01-18 22:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tijs Van Buggenhout 2016-01-15 15:50:05 UTC
After emerging dev-perl/GD-2.560.0 (part of update world) it seems that the installed files are incomplete, missing the loadable objects:

$ perl -we 'use GD;'
Can't locate loadable object for module GD in @INC (@INC contains: /etc/perl /usr/local/lib64/perl5/5.22.1/x86_64-linux /usr/local/lib64/perl5/5.22.1 /usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux /usr/lib64/perl5/vendor_perl/5.22.1 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.22.1/x86_64-linux /usr/lib64/perl5/5.22.1 .) at -e line 1.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

$ equery f dev-perl/GD                             
 * Searching for GD in dev-perl ...
 * Contents of dev-perl/GD-2.560.0:
/usr
/usr/bin
/usr/bin/bdf2gdfont.pl
/usr/lib64
/usr/lib64/perl5
/usr/lib64/perl5/vendor_perl
/usr/lib64/perl5/vendor_perl/5.22.1
/usr/lib64/perl5/vendor_perl/5.22.1/GD
/usr/lib64/perl5/vendor_perl/5.22.1/GD.pm
/usr/lib64/perl5/vendor_perl/5.22.1/GD/Group.pm
/usr/lib64/perl5/vendor_perl/5.22.1/GD/Image.pm
/usr/lib64/perl5/vendor_perl/5.22.1/GD/Polygon.pm
/usr/lib64/perl5/vendor_perl/5.22.1/GD/Polyline.pm
/usr/lib64/perl5/vendor_perl/5.22.1/GD/Simple.pm
/usr/lib64/perl5/vendor_perl/5.22.1/auto
/usr/lib64/perl5/vendor_perl/5.22.1/auto/GD
/usr/lib64/perl5/vendor_perl/5.22.1/auto/GD/autosplit.ix
/usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux
/usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux/auto
/usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux/auto/GD
/usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux/auto/GD/.packlist
/usr/share
/usr/share/doc
/usr/share/doc/GD-2.560.0
/usr/share/doc/GD-2.560.0/ChangeLog.bz2
/usr/share/doc/GD-2.560.0/README.QUICKDRAW
/usr/share/doc/GD-2.560.0/README.bz2
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/bdf2gdfont.pl.1.bz2

The sources contain both a Build.PL script and a Makefile.PL. When creating a Makefile with Makefile.PL the sections for xs compilation are empty:

# --- MakeMaker c_o section:


# --- MakeMaker xs_c section:


# --- MakeMaker xs_o section:


Due to fact that GD.xs has moved from the top dir to the lib subdir (required for Build.PL).

When linking ./lib/GD.xs to the top dir ./GD.xs prior to creating the Makefile, MakeMaker picks up the xs sources and adds the necessary rules to build the loadable objects.

# --- MakeMaker c_o section:

.c.i:
        x86_64-pc-linux-gnu-gcc  -E -c $(PASTHRU_INC) $(INC) \
        $(CCFLAGS) $(OPTIMIZE) \
        $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
        $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i

.c.s:
        $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c

.c$(OBJ_EXT):
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c

.cpp$(OBJ_EXT):
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp

.cxx$(OBJ_EXT):
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx

.cc$(OBJ_EXT):
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc

.C$(OBJ_EXT):
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C


# --- MakeMaker xs_c section:

.xs.c:
        $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c


# --- MakeMaker xs_o section:

.xs$(OBJ_EXT):
        $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
        $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c


The README details that building should be done by using Build.pl

4.  To compile GD.pm:

        a.  cd GD-2.XX
        b.  perl ./Build.PL
        c.  ./Build
        d.  ./Build test (optional)
        f.  sudo ./Build install

I managed to compile the module using Makefile.PL successfully by following the next steps:

- chmod u+w <workdir>/blib/script/bdf2gdfont.pl (or rm? - permission denied when overwritten)
- ln -s <workdir>/lib/GD.xs <workdir>/GD.xs
- perl Makefile.PL
- make
Comment 1 Tijs Van Buggenhout 2016-01-15 15:53:05 UTC
$ make test
Running Mkbootstrap for GD ()
chmod 644 GD.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ 1/11 # Testing using gd2 support.
t/GD.t ........ ok     
t/Polyline.t .. ok   
All tests successful.
Files=2, Tests=12,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.07 cusr  0.00 csys =  0.08 CPU)
Result: PASS

Tests are successful after all..
Comment 2 Tijs Van Buggenhout 2016-01-15 15:57:55 UTC
See cpan Bug tracking:

* https://rt.cpan.org/Public/Bug/Display.html?id=99901 (file permission problem)
* https://rt.cpan.org/Public/Bug/Display.html?id=106273 (build using Build.PL)
Comment 3 Tijs Van Buggenhout 2016-01-15 16:00:59 UTC
Apart from running make/build test, an additional (simple) acceptance test can be running the following, expecting zero exit status:

$ perl -we 'use GD;'

or

$ perl -we 'use GD; use GD::Group; use GD::Polygon; use GD::Image; use GD::Simple; use GD::Polyline;'
Comment 4 Tomáš Mózes 2016-01-15 16:16:32 UTC
I can confirm:

# perl -we 'use GD;'
Can't locate loadable object for module GD in @INC (@INC contains: /etc/perl /usr/local/lib64/perl5/5.22.1/x86_64-linux /usr/local/lib64/perl5/5.22.1 /usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux /usr/lib64/perl5/vendor_perl/5.22.1 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.0/x86_64-linux /usr/lib64/perl5/vendor_perl/5.22.0 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.22.1/x86_64-linux /usr/lib64/perl5/5.22.1 .) at -e line 1.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2016-01-18 22:51:47 UTC
Thanks. Symlink workaround applied in -r1.