distracted-biologist
distracted-biologist

Reputation: 808

Cannot install perl module PerlIO::locale within docker

I am running into problems installing certain perl modules within docker. Is there a recommended stable way of doing this for the default ubuntu image?

Also I'm unlear how to access the install log file in a failed build (ie for cpan minus at /.cpanm/build.log).

The following Dockerfile fails with the message:

Please specify prototyping behavior for locale.xs (see perlxs manual)

When it attempts to resolve the dependency on PerlIO::locale.

# use the ubuntu base image provided by dotCloud
FROM ubuntu

# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update

# install perl and modules
RUN apt-get install -y make
RUN apt-get install -y perl
RUN apt-get install -y cpanminus

RUN cpanm -v Text::Names

Upvotes: 2

Views: 2972

Answers (2)

ikegami
ikegami

Reputation: 385917

According to perlxstut, that's just a warning rather than a fatal error.

There's a clearly documented default (perlxs: "Prototypes are enabled by default"). Furthermore, this particular XS component doesn't actually export any functions to Perl, so the setting is never even used.

The warning can be silenced by adding a PROTOTYPES: ENABLE to locale.xs — you could even ask the author to make that change — but it won't make any difference.

The problem is elsewhere.

Upvotes: 2

amon
amon

Reputation: 57640

Some modules include C code which needs to be compiled on the target systems (“XS modules”). For that, you'll need a complete C toolchain. This implies make, the compiler: gcc, and the C standard library headers: libc-dev. The build-essential metapackage includes these components (and some more), so I'd recommend you install that instead.

Upvotes: 5

Related Questions