Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

perl v5.28.1 install GPIB module fail

by jianfeng (Initiate)
on Oct 14, 2021 at 08:51 UTC ( #11137500=perlquestion: print w/replies, xml ) Need Help??

jianfeng has asked for the wisdom of the Perl Monks concerning the following question:

I'm a new guy on perl, trying to install the below module on my windows10 64-bit OS, but fail. ActiveState Perl:v5.28.1 I also have copied the nmake into C:\VC6\Bin;

please help me! thanks.

C:\Users\jixi>cd C:\Perl64\cpan\build\gpib-0.30-0 C:\Perl64\cpan\build\gpib-0.30-0>perl Makefile.PL 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 dmake-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. **to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 141. NMAKE : fatal error U1077: 'C:\"Perl64\bin\perl.exe"' : return code '0 +xff'** Stop.
Discipulus added code tags

Replies are listed 'Best First'.
Re: perl v5.28.1 install GPIB module fail
by choroba (Archbishop) on Oct 14, 2021 at 08:53 UTC
    Crossposted to StackOverflow. It's considered polite to inform about crossposting so people not attending both sites don't waste their efforts solving a problem already solved at the other end of the internets.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Hi choroba, got it, thanks!
Re: perl v5.28.1 install GPIB module fail
by syphilis (Bishop) on Oct 15, 2021 at 00:01 UTC
    Hi jianfeng,

    The first three uninitialized warnings suggest to me that $Config{cc} is unset, which would mean that your perl is not fit for the purpose of building perl extensions, and should be discarded.
    Oops ... it's actually $config->{cc}, not $Config{cc} that's uninitialized, and they could be different things ... I haven't checked.
    What does the following one-liner report for you:
    perl -V:cc
    Also, we see, in the output you've provided:
    Generating a dmake-style Makefile
    Runing nmake on a Makefile that has been generated for dmake is never going to work.
    You should run dmake instead.
    Or, if you really want to use nmake you could try forcing the build to write a Makefile for nmake, which you do by starting with:
    perl Makefie.PL MAKE=nmake
    IMO opinion, the easiest approach for you is to use Strawberry Perl instead of ActivePerl.
    I would recommend the latest available "Portable" edition - and then use the make utility (gmake) and C compiler (gcc) that have shipped with that Strawberry Perl zip and are ready to use.

    DISCLAIMER: I have no idea whether GPIB will install on Strawberry Perl.
    GPIB seems to have not been updated since 2002, and there's an 11-year-old bug report that has not yet received any attention.
    Also, the cpan-testers matrix shows that it fails to build straight out of the box for all of the Windows cpan-testers that tried it out. (But that might simply mean that c:\pgpib.conf was not found)
    Update: A closer look suggests that the immediate problem lies with other missing prerequisite items.

    Cheers,
    Rob

      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';

        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

        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
Re: perl v5.28.1 install GPIB module fail
by LanX (Sage) on Oct 14, 2021 at 09:11 UTC
    Please click [edit] and add code-tags around your code
    <code> your copy&paste ... </code>

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    update

    fixed in the meantime by janitor discipulus++

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11137500]
Approved by Corion
Front-paged by davorg
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-11-28 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?