Opened 2 years ago

Closed 5 months ago

#6142 closed defect (fixed)

perl man page getting installed into /usr/man although the other man pages land correctly in /usr/share/man

Reported by: bypasser Owned by: Ari Jolma
Priority: normal Milestone:
Component: PerlBindings Version: 2.0.1
Severity: normal Keywords: man page
Cc: Ari Jolma

Description

Hi all. The usual Arch Linux man pages location is set to be in /usr/share/man. While building the gdal 2.0.1 package in clean chroot on up-to-date Arch system with the --with-perl config option, the only perl man page Geo::GDAL.3pm lands in /usr/man/man3 while the rest of the man pages are correctly placed in /usr/share/man/man1 directory.

See the related Arch bug report: https://bugs.archlinux.org/task/46581 and the used PKGBUILD file: https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gdal

Regards, Jaroslav

Change History (5)

comment:1 Changed 2 years ago by Even Rouault

Cc: Ari Jolma added
Component: defaultPerlBindings
Owner: changed from warmerdam to Ari Jolma

comment:2 Changed 2 years ago by Ari Jolma

ExtUtils::MakeMaker? is a pain.

This particular problem seems (again) to relate to our use of INSTALL_BASE parameter. It is (must be) used in the GNUmakefile unlike other ExtUtils::MakeMaker? parameters. INSTALL_BASE causes other oddities too and those are noted in the README. I asked about this in ExtUtils::MakeMaker? email list but did not get any answers (see http://www.nntp.perl.org/group/perl.makemaker/2015/01/msg3391.html )

Man pages get installed into ${INST_PREFIX}/share/man/man[1|3] if perl Makefile.PL is executed with arguments PREFIX=$(INST_PREFIX)) and INSTALLDIRS=vendor (i.e., no INSTALL_BASE argument). Note that using INSTALLDIRS=vendor may cause other files to be installed to other locations than when INSTALLDIRS=site is used (which we are using implicitly). See http://search.cpan.org/~bingos/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm

You can achieve this by changing your build script to skip --with-perl and use something like

cd swig/perl
perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor
make
make install

instead.

I wonder if we should make this the default and stop using INSTALL_BASE, which is however the recommended way to go.

About the man page, I may need to look into it too. We use doxygen and a reference set of manual pages are currently at http://ajolma.net/Geo-GDAL/snapshot/

comment:3 Changed 5 months ago by bypasser

The same trouble still persisting in v2.2.0

comment:4 Changed 5 months ago by Ari Jolma

Analysed this a bit. The problem is that the Perl man page is installed in 'make install', not in 'make install-man'. You set the man install dir by modifying configure, which then sets INST_MAN in GDALmake.opt. In the following commit the Makefile.PL checks for this and sets the man install dir, thus fixing the problem.

BTW, it seems to me that you should not need to fix configure as the mandir is reported there to be DATAROOTDIR/man and DATAROOTDIR is PREFIX/share. That is probably a bug there.

comment:5 Changed 5 months ago by Ari Jolma

Resolution: fixed
Status: newclosed

In 38529:

Perl bindings: Set INSTALLSITEMAN1DIR and INSTALLSITEMAN3DIR according to what is in GDALmake.opt if INSTALL_BASE is set. Fixes #6142. Please see the report as there may be a small bug in configure.

Note: See TracTickets for help on using tickets.