Skip to content

Fix installations using Carton or Carmel - #11

Open
doojonio wants to merge 1 commit into
jhannah:masterfrom
doojonio:fix/carton-installation-fails
Open

Fix installations using Carton or Carmel#11
doojonio wants to merge 1 commit into
jhannah:masterfrom
doojonio:fix/carton-installation-fails

Conversation

@doojonio

@doojonio doojonio commented Nov 9, 2021

Copy link
Copy Markdown

Hello. Looks like it's impossible to install this module using Carton.
We're going to start using Carton in our workflows, but we faced the following problem:

! Couldn't find module or a distribution PDF::Builder (3.021)
Successfully installed Class-Accessor-0.51
! Installing the dependencies failed: Module 'PDF::Builder' is not installed
! Bailing out the installation for PDF-TextBlock-0.13.

We're using PDF::API2 inside our application and when PDF::TextBlock is going to be installed earlier PDF::API2 it tries to install PDF::Builder because of behavior defined in Makefile.PL. I think it's better for everyone to remove this code and if someone will forget to install PDF::API2 or PDF::Builder i'm sure he will know about this very soon.

As I can see from code inside PDF::TextBlock module it will not cause any compilation time errors related to PDF::API2 or PDF::Builder modules because there is no explicit use or require statements inside packages.

Do not require modules dynamically inside MakeFile.PL.
It breaks installation inside Carton or Carmel environments.
@jhannah-mm

jhannah-mm commented Nov 16, 2021

Copy link
Copy Markdown

hmm @PhilterPaper can you look at this please? I think you added (#7) the code they're suggesting be removed?

@PhilterPaper

PhilterPaper commented Nov 16, 2021

Copy link
Copy Markdown

I'm not clear on what you're seeing. It is supposed to first check whether PDF::API2 is installed, and if so, use it (don't bother installing PDF::Builder). If it's not, see if PDF::Builder is installed, and if so, use it instead (don't bother installing PDF::API2). If neither is installed, the default choice is PDF::Builder. Do you have neither installed, and you want 1) to default to PDF::API2 instead, and 2) PDF::Builder is unavailable anyway for some reason on this system? Any chance of forcing a PDF::API2 install before trying to install PDF::TextBlock? Otherwise, any way to feed a desired choice to Makefile.PL (i.e., on the command line) to override the default choice, or look for some sort of configuration file or environment variable?

As I recall, the original system was hard coded to install PDF::API2, so I added some flexibility to use one or the other, as found. At installation time, if neither was present, PDF::Builder would be installed by default. I suppose that for systems which won't allow PDF::Builder, that might be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants