1

I cannot seem to install Configure::General via cpan (from Cygwin). The issue seems to be that the makefile cannot be found but it definitely exists. The module has been installed in a non-@INC directory. I have tried following this: [How do I 'use' a Perl module in a directory not in @INC? which made no difference to the output. I also tried this: [I installed a module successfully with CPAN, but perl can't find it. Why? I get an error saying 'use' command not found (so I'm guess my implemtation of that fix is problematic)

The output from perl -V:

Summary of my perl5 (revision 5 version 22 subversion 4) configuration:

  Platform:
    osname=cygwin, osvers=2.8.1(0.31253), archname=cygwin-thread-multi
    uname='cygwin_nt-6.3 cygwin 2.8.1(0.31253) 2017-07-03 14:11 x86_64 cygwin '
    config_args='-des -Dprefix=/usr -Dmksymlinks -Darchname=x86_64-cygwin-threads -Dlibperl=cygperl5_22.dll -Dcc=gcc -Dld=g++ -Accflags=-ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv -fno-strict-aliasing -fstack-protector-strong -D_FORTIFY_SOURCE=2',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv -fno-strict-aliasing -fstack-protector-strong'
    ccversion='', gccversion='5.4.0', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong'
    libpth=/usr/lib
    libs=-lpthread -lgdbm -ldb -ldl -lcrypt -lgdbm_compat
    perllibs=-lpthread -ldl -lcrypt
    libc=/usr/lib/libcygwin.a, so=dll, useshrplib=true, libperl=cygperl5_22.dll
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_NEW_COPY_ON_WRITE
                        PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                        USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
                        USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
  Built under cygwin
  Compiled at Jul 15 2017 20:11:53
  @INC:
    /usr/lib/perl5/site_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/site_perl/5.22
    /usr/lib/perl5/vendor_perl/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/vendor_perl/5.22
    /usr/lib/perl5/5.22/x86_64-cygwin-threads
    /usr/lib/perl5/5.22
    .


  [1]: http://'use'%20a%20perl%20module
  [2]: http://cpan%20can't%20find%20module

The output from the failed install:

CPAN: Storable loaded ok (v2.53_02)
Reading '/home/BobTewilliger/.cpan/Metadata'
  Database was generated on Tue, 12 Sep 2017 03:17:02 GMT
Running install for module 'Config::General'
CPAN: Digest::SHA loaded ok (v5.96)
CPAN: Compress::Zlib loaded ok (v2.068001)
Checksum for /home/BobTewilliger/.cpan/sources/authors/id/T/TL/TLINDEN/Config-General-2.63.tar.gz ok
CPAN: File::Temp loaded ok (v0.2304)
CPAN: YAML loaded ok (v1.23)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20170715_22)
Configuring T/TL/TLINDEN/Config-General-2.63.tar.gz with Makefile.PL
  TLINDEN/Config-General-2.63.tar.gz
  /usr/bin/perl Makefile.PL -- OK
Running make for T/TL/TLINDEN/Config-General-2.63.tar.gz
  TLINDEN/Config-General-2.63.tar.gz
  /cygdrive/c/Rtools/bin/make.EXE -- NOT OK

When I try to run 'makeimage' an error is returned saying config.pm cannot be found. The file exosts. Just not in @INC.

I'm exceptionally new to PERL, and I know similar questions have been asked all over the web but I can't get this running. The original problem was with YAML, which I managed to resolve butt he same solution does not apply here for some reason :/

EDIT: I'm running Strawberry PERL on Windows 7 machine

user3180258
  • 97
  • 13
  • 2
    No, you're not running strawberry perl -- you're running cygwin perl (and cygwin cpan). – mob Sep 12 '17 at 19:34
  • Oh. I had initially installed Strawberry perl and later installed cygwin perl after I was having some problems. The problem didn't change though following the installation of cygwin perl/cpan. Should I just clear out cygwin and perl installations and start from scratch? I need cygwin for 'make image' batch file – user3180258 Sep 12 '17 at 21:54
  • 1
    The make executable that gets called is from Rtools, not from cygwin. That could be a problem and can be resolved by fixing your $PATH (and making sure you have installed `make` for cygwin). – mob Sep 12 '17 at 22:21
  • Rtools is installed as part of my R install and was already part of $PATH before I started on this. I had done a re-base of cygwin with make modules selected and this seemed to make no difference (late last night though so anything is possible there). What is the $PATH value for make? Does it need to go before/after any particular value in $PATH? – user3180258 Sep 12 '17 at 22:34
  • The `make` installed by Cygwin's `make` package (verify that you've installed it) will be in `/usr/bin/make`. – reinierpost Sep 13 '17 at 11:31
  • OK. So I just wiped it all and started fresh. Used console2 instead of windows cmd. Installed Strawberry then ran all the cpan operation from console2 using capping from CPAN::minus. There were a few modules which were reporting that they weren't installed but after some console exits, pc restarts, and various attempts at installing modules, things just magically worked :/ Even though it's working, the solution doesn't really help myself or anyone else for that matter. After re-install the main offending module was Math::Random (Config::General installed fine) – user3180258 Sep 13 '17 at 18:27
  • So it seems I was a little premature one calling the problem resolved. Math-Random cannot install. There is an issue with 'Random.xs.dll'. MakeMaker is installed and up to date. I tried manually installing from the tarball and get the same errors as installing via cpan/cpanm. I have a very long list of undefined references begining with '_imp_Perl_get_context'. I have no problems installing other modules so I'm not sure what the problem is. %PATH% contains a value to point to gmake which is installed as part of Strawberry perl. Any ideas? – user3180258 Sep 16 '17 at 16:28

0 Answers0