Opened 17 years ago

Closed 16 years ago

#2071 closed defect (fixed)

Perl doesn't know its vendor library location

Reported by: alexander@… Owned by: lfs-book@…
Priority: high Milestone: 6.4
Component: Book Version: SVN
Severity: major Keywords:
Cc:

Description

Some packages (e.g., dpkg) run this command in order to know where they should install their perl modules:

perl -MConfig -e 'print $Config{vendorlib}'

However, at least on the LiveCD, this prints an empty string. Please close this ticket as invalid if the bug is LiveCD-specific.

Change History (9)

comment:1 by bdubbs@…, 17 years ago

I found this documentation:

http://www.xav.com/perl/lib/Config.html#v

vendorlib
    From vendorlib.U:

    This variable contains the eventual value of the VENDORLIB symbol, which is the name of the private library for this package. The standard distribution will put nothing in this directory. Vendors who distribute perl may wish to place their own modules in this directory with MakeMaker Makefile.PL INSTALLDIRS=vendor or equivalent. See INSTALL for details.

We don't have any private libraries. Where does dpkg put their perl modules?

Looking at some other distros, it looks like one candidate is /usr/lib/perl5/vendor_perl/<perl version>

Should we do that?

comment:2 by alexander@…, 17 years ago

On Debian, the following command

perl -MConfig -e 'print $Config{vendorlib}'

prints

/usr/share/perl5

and there is a /usr/share/perl5/Dpkg.pm file.

comment:3 by dnicholson@…, 17 years ago

I just happened to be messing around with perl options the other day. Unfortunately, we can't set the vendor prefix from configure.gnu. But the appropriate option for Configure is -Dvendorprefix=/usr. That will give this layout:

$ ls /usr/lib/perl5/
5.8.8  site_perl  vendor_perl
$ perl -V:vendorlib
vendorlib='/usr/lib/perl5/vendor_perl/5.8.8';

I think that if you don't explicitly set vendorprefix, the setup thinks you don't want to support a "vendor" install. Here are the options I'm currently using for perl:

sh ./Configure -des \
        -Dprefix=/usr \
        -Dsiteprefix=/usr \
        -Dvendorprefix=/usr \
        -Doptimize="${CFLAGS}" \
        ${LDFLAGS:+-Dldflags="$LDFLAGS"} \
        -Dscriptdir=/usr/bin \
        -Dman1dir=/usr/share/man/man1 \
        -Dman3dir=/usr/share/man/man3pm \
        -Dhtml1dir=/usr/share/doc/perl5/html1 \
        -Dhtml3dir=/usr/share/doc/perl5/html3 \
        -Dpager="/usr/bin/less -isR" \
        -Dmyhostname=localhost \
        -Dperladmin=root@localhost

comment:4 by bdubbs@…, 16 years ago

Milestone: 7.06.4

comment:5 by randy@…, 16 years ago

Priority: normalhigh

Again, if this is something that's going to go in for the next release it needs to be done sooner than later. Bumping the priority.

These sort of things in my opinion make a release date in 3 weeks much too aggressive.

comment:6 by randy@…, 16 years ago

Owner: changed from lfs-book@… to randy@…
Status: newassigned

comment:7 by randy@…, 16 years ago

Owner: changed from randy@… to lfs-book@…
Status: assignednew

comment:8 by bdubbs@…, 16 years ago

Changed the configuration of perl so it knows where its vendor library location is.

Fixed in revision 8718.

comment:9 by bdubbs@…, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.