Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: perl v5.28.1 install GPIB module fail

by jianfeng (Initiate)
on Oct 15, 2021 at 02:54 UTC ( #11137563=note: print w/replies, xml ) Need Help??


in reply to Re: perl v5.28.1 install GPIB module fail
in thread perl v5.28.1 install GPIB module fail

Hi Rob, thanks for your reply. please take a look at the below log. one more piece of information: I have tried the older ActivePerl version, and the installation succeeded. (I just want to update to the new Perl version for other module installation.) I will try strawberry Perl later, maybe I should switch to a Linux environment. also, copy the README of this GPIB module

Windows NT Source Installation ------------------------------ This might work on WIN98 as well, but I haven't tested it. Install your GPIB card if you want to access devices directly from the NT machine. Make sure the GPIB card is working and the Microsoft C libraries are installed. Make sure your Perl is at least 5.005. Get the latest from http://www.activestate.com. Make sure you have the following CPAN modules, the installation proces +s will complain with helpful messages if you don't have these modules. MD5 Storable Edit Makefile.PL to exclude any modules that don't interest you. Modu +les that don't yet function under NT (GPIB::hpserial, GPIB::llp) are automatically excluded. Edit ni/Makefile.PL if you are using a National Instruments GPIB card and make sure the paths to the include files and libraries are correct +. tar zxvf gpib-xxx.tgz -- Edit Makefile.PL, ni/Makefile.PL perl Makefile.PL nmake -- Create C:\PGPIB.CONF <code> <code> C:\Perl64\cpan\build\gpib-0.30-0>perl Makefile.PL make=nmake Use of uninitialized value in pattern match (m//) at C:/Perl64/site/li +b/ExtUtils/MM_Win32.pm line 40. Use of uninitialized value in pattern match (m//) at C:/Perl64/site/li +b/ExtUtils/MM_Win32.pm line 41. Use of uninitialized value in pattern match (m//) at C:/Perl64/site/li +b/ExtUtils/MM_Win32.pm line 42. Using interfaces: ni rmt Using instrument drivers: hp33120a hp3585a hp59306a hpe3631a Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Writing MYMETA.yml and MYMETA.json Use of uninitialized value $m[8] in join or string at C:/Perl64/site/l +ib/ExtUtils/MM_Unix.pm line 365. Generating a nmake-style Makefile Writing Makefile for GPIB Writing MYMETA.yml and MYMETA.json C:\Perl64\cpan\build\gpib-0.30-0>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Skip blib\lib\GPIB.pm (unchanged) nmake -f Makefile all -nologo LIBPERL_A="libperl.a" LINKTYPE=" +dynamic" OPTIMIZE="-s -O2" PREFIX="C:\Perl64\site" PASTHRU_DEFINE=" " + PASTHRU_INC=" " Skip ..\blib\lib\GPIB\ni.pm (unchanged) Running Mkbootstrap for ni () "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 " +ni.bs" "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempt +y -- ni.bs ..\blib\arch\auto\GPIB\ni\ni.bs 644 -c -I"C:\Program Files\National Instruments\NI-488.2\Languag +es\Microsoft C" -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMOD +E_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT +_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION= +\"0.30\" -DXS_VERSION=\"0.30\" "-IC:\Perl64\lib\CORE" ni.c '-c' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: '-c' : return code '0x1' Stop. NMAKE : fatal error U1077: 'C:\VC6\Bin\NMAKE.EXE' : return code '0x2' Stop. C:\Perl64\cpan\build\gpib-0.30-0>perl -V:cc cc='undef';

Replies are listed 'Best First'.
Re^3: perl v5.28.1 install GPIB module fail
by bliako (Monsignor) on Oct 15, 2021 at 08:16 UTC

    The excerpt you posted above confirms syphilis's hunch about checking perl -V:cc. It is empty as you discovered. The make output shows that it is likely trying to execute a $(CC) -c ... but CC, which most likely is set via perl -V:cc, is empty. And tries to execute -c which follows.

    Perlmonks have answered a similar question here: https://stackoverflow.com/questions/65728942/how-to-make-perl-makefile-pl-use-a-given-c-compiler-when-compiling-an-xs-module and offer solutions by either telling perl Makefile.PL what CC to use (perl Makefile.PL CC=...) or how to save your CC choice permanently with Perl's config.

    If all else fails, a quick hack would be to edit the Makefile produced (not the Makefile.PL) and find where CC is set, perhaps a CC= line near the top. And set it to the path of the compiler executable which compiled perl.exe (do you have one?). Having said that, you will likely encounter additional errors with the linker (perl -V:ld). Usually, and in my system, linker executable can be replaced by the compiler, so additionally set LD (in Makefile) to the same CC executable.

    bw, bliako

Re^3: perl v5.28.1 install GPIB module fail
by syphilis (Archbishop) on Oct 15, 2021 at 09:03 UTC
    cc='undef';

    I will bet you all of the money in all of the world (except for that miniscule portion that actually belongs to me) that your "older ActivePerl version" that successfully built the module in the past did not respond to perl -V:cc with output of cc=undef;.
    I would not even consider trying to build a perl extension on a perl that reported cc='undef';

    The fact that it built on an older ActivePerl gives me hope that the same can be achieved with Strawberry Perl.
    And that's where I would recommend starting.

    Recent ActivePerl offerings (and your 5.28.1 might be one of these) provide an opportunity for you to request ActiveState to build the module for you
    You could perhaps try that.
    I don't know how that all works ... if it works at all ... it's just something I've read about ... and I'm not at all interested in it. But it's another option for you to investigate, if you're interested.

    Personally, I'd start with Strawberry Perl.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137563]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2022-01-27 05:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?