Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I figure out why Linenoise is failing to install?

This is on 64-bit Windows 10 Pro with MSVC 2015. This question has a long body because I want to give full information up front, but the actual question is rather straightforward:

How can I get panda to keep the working directory around (like cpanmdoes) after an install failure so I can diagnose what went wrong?

As you can see from the log below, linenoise.dll seems to be created in the right place, but come install time, it is nowhere to be found.

The .panda-work directory in %TEMP% is gone.


I just built Rakudo from source by doing

  1. git clone git://github.com/rakudo/rakudo.git
  2. cd rakudo
  3. set CFLAGS=/O2 /favor:INTEL64 /Qpar
  4. perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix=c:/opt/perl6
  5. nmake test
  6. nmake install
  7. nmake spectestThe number of failures has gone up since the last time I tried this, but that's not related to my question

Then I installed panda by doing:

  1. git clone --recursive git://github.com/tadzik/panda.git
  2. cd panda
  3. perl6 bootstrap.pl

which worked.

Then I did

panda install Task::Star

I got a test failure:

==> Building NativeHelpers::Blob
==> Testing NativeHelpers::Blob

t/00-trivial.t ..
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 1/1 subtests

but I force installed that because I wanted to get to as complete an install as possible as quickly as possible.

So, forging ahead, I hit this:

C:\Users\...\Temp> panda install Linenoise
==> Fetching Linenoise
==> Building Linenoise

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c  /nologo /MT /Ox /GL /DNDEBUG  /DWIN32 /DAO_ASSUME_WINDOWS98  /O2 /favor:INTEL64 /Qpar /Folinenoise.obj linenoise.c
linenoise.c
        perl6 -e "mkdir 'resources'; mkdir 'resources/libraries'"
        link /dll /nologo /LTCG  shell32.lib ws2_32.lib mswsock.lib rpcrt4.lib advapi32.lib psapi.lib iphlpapi.lib userenv.lib /out:resources/libraries/libline
noise.dll linenoise.obj
Generating code
Finished generating code
        cl /Foconstant-helper /nologo /MT /Ox /GL /DNDEBUG  /DWIN32 /DAO_ASSUME_WINDOWS98  /O2 /favor:INTEL64 /Qpar constant-helper.c
constant-helper.c
Generating code
Finished generating code
        perl6 fill-constants.pl  lib/Linenoise.pm
==> Testing Linenoise
==> Installing Linenoise
Failed to open file C:\Users\...\Temp\.panda-work\1483278033_1\resources\libraries\linenoise.dll: no such file or directory
  in any  at C:\opt\perl6/share/perl6/runtime/CORE.setting.moarvm line 1
  in block  at C:\opt\perl6\share\perl6\site\sources\85367160D11E565B2D089507C79BC309215430D6 (Panda::Installer) line 61
  in sub indir at C:\opt\perl6\share\perl6\site\sources\24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 20
  in method install at C:\opt\perl6\share\perl6\site\sources\85367160D11E565B2D089507C79BC309215430D6 (Panda::Installer) line 42
  in method install at C:\opt\perl6\share\perl6\site\sources\582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 190
  in method resolve at C:\opt\perl6\share\perl6\site\sources\582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 263
  in sub MAIN at C:\opt\perl6\share\perl6\site\resources\1C71F7B377C6F2C6C4707E3C25016AA25A2926B1 line 20
  in block  at C:\opt\perl6\share\perl6\site\resources\1C71F7B377C6F2C6C4707E3C25016AA25A2926B1 line 165

Actually thrown at:
  in method throw at C:\opt\perl6/share/perl6/runtime/CORE.setting.moarvm line 1
  in any  at gen/moar/Metamodel.nqp line 3072
  in block  at C:\opt\perl6\share\perl6\site\sources\85367160D11E565B2D089507C79BC309215430D6 (Panda::Installer) line 61
  in sub indir at C:\opt\perl6\share\perl6\site\sources\24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 20
  in method install at C:\opt\perl6\share\perl6\site\sources\85367160D11E565B2D089507C79BC309215430D6 (Panda::Installer) line 42
  in method install at C:\opt\perl6\share\perl6\site\sources\582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 190
  in method resolve at C:\opt\perl6\share\perl6\site\sources\582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 263
  in sub MAIN at C:\opt\perl6\share\perl6\site\resources\1C71F7B377C6F2C6C4707E3C25016AA25A2926B1 line 20
  in block  at C:\opt\perl6\share\perl6\site\resources\1C71F7B377C6F2C6C4707E3C25016AA25A2926B1 line 165
like image 996
Sinan Ünür Avatar asked Jan 01 '17 13:01

Sinan Ünür


1 Answers

The Build.pm file for Linenoise is simply not written correctly. They are hard-coding the 'lib' prefix to the library name while also trying to use the platform library name guessing mechanism in another part. If it wants to use $*VM.platform-library-name then it needs to generate a file named linenoise.dll, not liblinenoise.dll

I'm also not sure that Linenoise works on windows even if it did install.

You should probably be using zef instead of panda. If you were, you could view the working directory used at ~/.zef/store/p6-linenoise.git

like image 99
ugexe Avatar answered Oct 14 '22 15:10

ugexe