Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 44719
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc: ribasushi [...] leporine.io
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.91
Fixed in: 1.04



Subject: XS build check failure on HP-UX
The standard C compiler doesn't accepts an object file as a target (-o). This make the XS install to be skipped. --------8<--------8<--------8<--------8<--------8<--------8<-------- $ cc -o test.o test.c ld: Cannot specify input file (test.o) that is the same as the output file. Fatal error. --------8<--------8<--------8<--------8<--------8<--------8<-------- --------8<--------8<--------8<--------8<--------8<--------8<-------- CPAN.pm: Going to build D/DR/DROLSKY/Params-Validate-0.91.tar.gz Testing if you have a C compiler ld: Cannot specify input file (test.o) that is the same as the output file. Fatal error. I cannot determine if you have a C compiler so I will install a perl-only implementation You can force installation of the XS version with perl Makefile.PL --xs --------8<--------8<--------8<--------8<--------8<--------8<--------
$ cc --version cc: HP C/aC++ B3910B A.06.15 [May 16 2007]
Subject: [PATCH] XS build check failure on HP-UX
RT-Send-CC: autarch [...] urth.org
Here is a patch: all compiler I known undestand the "-c" command line option which only creates an object file from the C source.
--- Makefile.PL.orig Thu May 1 22:45:16 2008 +++ Makefile.PL Tue Apr 21 11:30:41 2009 @@ -151,18 +151,11 @@ close F or return 0; - my $cc = $Config{cc}; - if ( $cc =~ /cl(\.exe)?$/ ) - { - # stupid stupid MSVC compiler hack tacken from version.pm's - # Makefile.PL - $cc .= ' -c'; # prevent it from calling the linker - } + my $ret = system( "$Config{cc} -c test.c" ); + my $ok = $ret >> 8 == 0 && -f "test$Config{obj_ext}"; - system( "$cc -o test$Config{obj_ext} test.c" ) and return 0; - unlink $_ for grep { -f } 'test.c', "test$Config{obj_ext}"; - return 1; + return $ok; }
Could someone have a look at this patch?
Instead of applying the provided working patch, the no-compiler instalation was made entirely non-automatic, with a physical switch required to install in such environments. Can you please reconsider this decision and use the (rather well functioning) check thath e.g. Package::Stash is using: https://metacpan.org/source/DOY/Package-Stash-0.33/Makefile.PL#L79 If you want a more elaborate check I recommend this (which iirc has been tested on HP-UX): https://metacpan.org/source/ADAMK/List-MoreUtils-0.33/Makefile.PL#L81
RT-Send-CC: autarch [...] urth.org
Sorry to bother you about this issue again - you forgot to add the necessary configure_requires to make can_xs truly work: 'ExtUtils::MakeMaker' => '6.52'; 'ExtUtils::CBuilder' => '0.27'; Cheers!
Subject: Re: [rt.cpan.org #44719] [PATCH] XS build check failure on HP-UX
Date: Wed, 8 Feb 2012 10:26:12 -0600 (CST)
To: Peter Rabbitson via RT <bug-Params-Validate [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 8 Feb 2012, Peter Rabbitson via RT wrote: Show quoted text
> Sorry to bother you about this issue again - you forgot to add the > necessary configure_requires to make can_xs truly work: > > 'ExtUtils::MakeMaker' => '6.52'; > 'ExtUtils::CBuilder' => '0.27';
This code uses Module::Build. What does MakeMaker have to do with it? -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #44719] [PATCH] XS build check failure on HP-UX
Date: Wed, 8 Feb 2012 10:27:18 -0600 (CST)
To: "autarch [...] urth.org via RT" <bug-Params-Validate [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 8 Feb 2012, autarch@urth.org via RT wrote: Show quoted text
> Queue: Params-Validate > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44719 > > > On Wed, 8 Feb 2012, Peter Rabbitson via RT wrote: >
>> Sorry to bother you about this issue again - you forgot to add the >> necessary configure_requires to make can_xs truly work: >> >> 'ExtUtils::MakeMaker' => '6.52'; >> 'ExtUtils::CBuilder' => '0.27';
> > This code uses Module::Build. What does MakeMaker have to do with it?
Ah, crap, it's using MM-> internally. Grr, freaking Perl build systems. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/