Skip Menu |

This queue is for tickets about the Prima CPAN distribution.

Report information
The Basics
Id: 105153
Status: resolved
Priority: 0/
Queue: Prima

People
Owner: Nobody in particular
Requestors: sisyphus [...] cpan.org
Cc: kmx [...] atlas.cz
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: kmx [...] atlas.cz
Subject: Prima, PDL and MS Windows difficulties
Hi Dmitry, On Windows, with recent Prima (including 1.43) Prima::Config's %Prima::Config::Config is being populated with a lot of entries relating to the build directory - eg, for me: 'inc' => '-IC:/sisyphusion/Prima-1.43\\include -IC:/sisyphusion/Prima-1.43\\include\\generic', 'dlname' => 'C:\\sisyphusion\\Prima-1.43\\blib\\arch\\auto\\Prima\\Prima.dll', 'gencls' => 'C:\\sisyphusion\\Prima-1.43\\blib\\script\\gencls.bat', 'tmlink' => 'C:\\sisyphusion\\Prima-1.43\\blib\\script\\tmlink.bat', 'libname' => 'C:\\sisyphusion\\Prima-1.43\\blib\\arch\\auto\\Prima\\libPrima.a', 'incpaths' => [ 'C:/sisyphusion/Prima-1.43\\include', 'C:/sisyphusion/Prima-1.43\\include\\generic' ], 'libs' => 'C:\\sisyphusion\\Prima-1.43\\blib\\arch\\auto\\Prima\\libPrima.a', The problem is that PDL::Drawing::Prima (which is a prereq for PDL::Graphics::Prima) picks up those locations from Prima::Config and assumes that they still exist and still contain the files they once did. Neither of those assumptions is inevitably correct. We're thinking that Prima::Config should be specifying "instalment" locations rather than "build" locations. But, if our thinking is wrong, then clearly the bug is instead in PDL::Drawing::Prima. See http://sourceforge.net/p/pdl/mailman/pdl-devel/thread/0FF8D75172AD4F9D9373859854236E65%40OwnerPC311012/#msg34193012 for the discussion we had. Cheers, Rob
Hi Rob, It looks like there's something strange going on your installation. The reason is because Prima::Config is a bit special. When Prima is just built, indeed it lies in the blib directory containing all the blib paths. This is needed for CPAN testing of modules depending on Prima incpaths, but Prima not itself being installed. However after 'make install' the installed version of the file is hacked so that it contains the real system-wide paths. One should be able to see the difference at least by that the blib Config has %Config_inst hash, while the system-wide hasn't. This is done in Makefile with --postinstall command. So I'm saying that if your system-wide Config contains c:/sisyphusion that's strange. Do you possibly install Prima by some other means than 'make install'? Looking at kmx's response he's having same problem on strwaberry portable, but I've just run the Prima install on the latest 5.22 portable and I cannot reproduce the problem. Am I missing something here?
CC: <kmx [...] atlas.cz>
Subject: Re: [rt.cpan.org #105153] Prima, PDL and MS Windows difficulties
Date: Thu, 11 Jun 2015 00:34:31 +1000
To: <bug-Prima [...] rt.cpan.org>, <sisyphus [...] cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Show quoted text
-----Original Message----- From: KARASIK via RT Sent: Wednesday, June 10, 2015 11:34 PM To: sisyphus@cpan.org Cc: kmx@atlas.cz Subject: [rt.cpan.org #105153] Prima, PDL and MS Windows difficulties <URL: https://rt.cpan.org/Ticket/Display.html?id=105153 >
> However after 'make install' the installed version of the file is hacked > so that it contains the real system-wide paths.
I'm thinking that hack is not being performed. Attached is the generated Makefile for my perl-5.16 build. Does it look as you expect ?
> So I'm saying that if your system-wide Config contains c:/sisyphusion > that's strange.
C:/sisyphusion/Prima-1.43 is, of course, the top level source directory. Yes, I think it's strange, too :-)
> Do you possibly install Prima by some other means than 'make install'?
No, the only thing I do that's perhaps not anticipated is that I build manually. Well ... it's scripted .... but instead of the script running 'cpan -i Prima' or somesuch, it runs (in C:\sisyphusion\Prima-1.43): perl Makefile.PL LIBS="-LC:\MinGW\msys\1.0\local\lib -lXpm -lgif -lpng -ltiff -ljpeg -lz"; followed by dmake followed by dmake test followed by dmake install
> Looking at kmx's response he's having same problem on strwaberry portable, > but I've just run the Prima install on the latest 5.22 portable and I > cannot reproduce the problem. Am I missing something here?
Hmmm ... maybe there's more to the way it's built than meets the eye. Cheers, Rob
Download Makefile
application/octet-stream 158.8k

Message body not shown because it is not plain text.

At the end of: perl Makefile.PL I see

** Warning: expected format of Makefile generated by ExtUtils::MakeMaker
is changed, so post-installation steps may not be performed correcty.
Prima will run OK, but modules dependent on it may not build.
Please notify the author.

which seems to be directly related to this issue
Relevant part of my Makefile
pure_perl_install :: all
    $(NOECHO) $(MOD_INSTALL) \
        read "$(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist" \
        write "$(DESTINSTALLARCHLIB)\auto\$(FULLEXT)\.packlist" \
        "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \
        "$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \
        "$(INST_BIN)" "$(DESTINSTALLBIN)" \
        "$(INST_SCRIPT)" "$(DESTINSTALLSCRIPT)" \
        "$(INST_MAN1DIR)" "$(DESTINSTALLMAN1DIR)" \
        "$(INST_MAN3DIR)" "$(DESTINSTALLMAN3DIR)"
    $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
        "$(SITEARCHEXP)\auto\$(FULLEXT)"


pure_site_install :: all
    $(NOECHO) $(MOD_INSTALL) \
        read "$(SITEARCHEXP)\auto\$(FULLEXT)\.packlist" \
        write "$(DESTINSTALLSITEARCH)\auto\$(FULLEXT)\.packlist" \
        "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \
        "$(INST_ARCHLIB)" "$(DESTINSTALLSITEARCH)" \
        "$(INST_BIN)" "$(DESTINSTALLSITEBIN)" \
        "$(INST_SCRIPT)" "$(DESTINSTALLSITESCRIPT)" \
        "$(INST_MAN1DIR)" "$(DESTINSTALLSITEMAN1DIR)" \
        "$(INST_MAN3DIR)" "$(DESTINSTALLSITEMAN3DIR)"
    $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
        "$(PERL_ARCHLIB)\auto\$(FULLEXT)"

pure_vendor_install :: all
    $(NOECHO) $(MOD_INSTALL) \
        read "$(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist" \
        write "$(DESTINSTALLVENDORARCH)\auto\$(FULLEXT)\.packlist" \
        "$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \
        "$(INST_ARCHLIB)" "$(DESTINSTALLVENDORARCH)" \
        "$(INST_BIN)" "$(DESTINSTALLVENDORBIN)" \
        "$(INST_SCRIPT)" "$(DESTINSTALLVENDORSCRIPT)" \
        "$(INST_MAN1DIR)" "$(DESTINSTALLVENDORMAN1DIR)" \
        "$(INST_MAN3DIR)" "$(DESTINSTALLVENDORMAN3DIR)"

See attached patch for Makefile.PL (quick hack, probably not completely cross-platform).
Subject: fix.diff
--- Makefile.PL.OLD 2015-04-10 21:17:48.000000000 +0200 +++ Makefile.PL 2015-06-10 17:34:24.740302300 +0200 @@ -2062,8 +2062,8 @@ my $t = $self->SUPER::install(@_); my $n = $t =~ s[ (pure_\w+_install.*?) # 1 - (INST_ARCHLIB\)\s+)\$\(DEST(\w+)\)(.*?) # 2,3,4 - (INST_BIN\)\s+)\$\(DEST(\w+)\)(.*?) # 5,6,7 + (INST_ARCHLIB\)["\s]+)\$\(DEST(\w+)\)(.*?) # 2,3,4 + (INST_BIN\)["\s]+)\$\(DEST(\w+)\)(.*?) # 5,6,7 (.*?) # 8 \n\n ][
With the patch above the installed Config.pm looks like this:

# This file was automatically generated.
package Prima::Config;
use vars qw(%Config);

%Config = (
    ifs                   => '\\',
    quote                 => '\"',
    platform              => 'win32',
    incpaths              => [ 'D:\strawberry32\perl\site\lib\Prima\CORE','D:\strawberry32\perl\site\lib\Prima\CORE\generic' ],
    gencls                => 'D:\strawberry32\perl\site\bin\gencls.bat',
    tmlink                => 'D:\strawberry32\perl\site\bin\tmlink.bat',
    scriptext             => '.bat',
    genclsoptions         => '--tml --h --inc',
    cobjflag              => '-o ',
    coutexecflag          => '-o ',
    clinkprefix           => '',
    clibpathflag          => '-L',
    cdefs                 => [],
    libext                => '.a',
    libprefix             => 'lib',
    libname               => 'D:\strawberry32\perl\site\lib\auto\Prima\libPrima.a',
    dlname                => 'D:\strawberry32\perl\site\lib\auto\Prima\Prima.xs.dll',
    ldoutflag             => '-o ',
    ldlibflag             => '-l',
    ldlibpathflag         => '-L',
    ldpaths               => [],
    ldlibs                => ['Xpm','gif','tiff','png','jpeg','gdi32','mpr','winspool','comdlg32'],
    ldlibext              => '',
    inline                => 'inline',
    dl_load_flags         => 0,

    inc                   => '-ID:\strawberry32\perl\site\lib\Prima\CORE -ID:\strawberry32\perl\site\lib\Prima\CORE\generic',
    define                => '',
    libs                  => 'D:\strawberry32\perl\site\lib\auto\Prima\libPrima.a',
);

1;
... which is unfortunatelly not too friendly to strawberry portability as things break when a user moves the whole portable strawberry dir to another location
Rob, kmx, can you possibly test the latest github or 1.43_1 version? I believe the Makefile bug was addressed there
Subject: Re: [rt.cpan.org #105153] Prima, PDL and MS Windows difficulties
Date: Wed, 10 Jun 2015 21:44:18 +0200
To: bug-Prima [...] rt.cpan.org
From: kmx <kmx [...] atlas.cz>
The latest Prima from github + PDL::Drawing::Prima build fine
That's nice! I guess I close the ticket now. Btw I somehow missed the message where the pdl-devel mailing list was moved to SF, and didn't re-subscribe. Now I did, so if there are problems again we can discuss it there.