2

Environment: Perl: 5.32.1 Strawberry perl OS: Windows 10 Python: 3.7.9 and 3.9.7 but using only 3.7.9 to install inline Python

Output on executing cpan command on cmd line to install Inline::Python,

cpan Inline::Python

Loading internal logger. Log::Log4perl recommended for better logging CPAN: CPAN::SQLite loaded ok (v0.219) Database was generated on Thu, 09 Dec 2021 08:48:50 GMT Running install for module 'Inline::Python' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.1) Checksum for C:\STRAWB~1\cpan\sources\authors\id\N\NI\NINE\Inline-Python-0.56.tar.gz ok CPAN: Archive::Tar loaded ok (v2.38) CPAN: YAML::XS loaded ok (v0.82) 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.20210123) Configuring N/NI/NINE/Inline-Python-0.56.tar.gz with Makefile.PL Using C:\Python379\

This python is so old it doesn't know how to answer my questions.

Instead, you will be asked a series of questions about it. If possible, I will give you a set of reasonable options to choose from. You can always enter the complete answer yourself if none of mine are correct.

        1. LIBS option. I need to know what extra libraries, if any,
           are required by this build of python. I recommend this:
           No extra libraries

Enter extra libraries (e.g. -lfoo -lbar) []

        2. LIBRARY option. The location of the python library.
           Inline::Python needs to link against it to use Python.

        Here are the libraries I know about:
           1) C:/Python379/libs/python3.lib
           2) C:/Python379/libs/python37.lib
           3) C:/python397/libs/python3.lib
           4) C:/python397/libs/python39.lib

Which? Or enter another. [1] 1

        3. INCLUDE option. The location of the python include files.
           Inline::Python needs these to compile.

        Here are the locations I know about:
           1) C:/Python379/include
           2) C:/python397/include

Which? Or enter another. [1] 1 Using These Settings:    Extra Libs:    Python Lib:  -LC:/Python379/libs python3.lib    Includes:   
-IC:/Python379/include    Extra Flags: none (perl Makefile.PL --help for details) Checking if your kit is complete... Looks good Warning: prerequisite Proc::ProcessTable 0.53 not found. Generating a gmake-style Makefile Writing Makefile for Inline::Python Writing MYMETA.yml and MYMETA.json   NINE/Inline-Python-0.56.tar.gz   C:\StrawberryPerl532\perl\bin\perl.exe Makefile.PL -- OK Running make for N/NI/NINE/Inline-Python-0.56.tar.gz
---- Unsatisfied dependencies detected during ----
----      NINE/Inline-Python-0.56.tar.gz      ----
    Proc::ProcessTable [build_requires] Running install for module 'Proc::ProcessTable' Checksum for C:\STRAWB~1\cpan\sources\authors\id\J\JW\JWB\Proc-ProcessTable-0.634.tar.gz ok Configuring J/JW/JWB/Proc-ProcessTable-0.634.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning (mostly harmless): No library found for -lobstack Generating a gmake-style Makefile Writing Makefile for Proc::ProcessTable Writing MYMETA.yml and MYMETA.json   JWB/Proc-ProcessTable-0.634.tar.gz   C:\StrawberryPerl532\perl\bin\perl.exe Makefile.PL -- OK Running make for J/JW/JWB/Proc-ProcessTable-0.634.tar.gz cp lib/Proc/Killfam.pm blib\lib\Proc\Killfam.pm cp lib/Proc/ProcessTable/Process.pm blib\lib\Proc\ProcessTable\Process.pm AutoSplitting blib\lib\Proc\ProcessTable\Process.pm (blib\lib\auto\Proc\ProcessTable\Process) cp lib/Proc/ProcessTable.pm blib\lib\Proc\ProcessTable.pm cp lib/Proc/Killall.pm blib\lib\Proc\Killall.pm Running Mkbootstrap for ProcessTable () "C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Command -e chmod
-- 644 "ProcessTable.bs" "C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- ProcessTable.bs blib\arch\auto\Proc\ProcessTable\ProcessTable.bs 644 "C:\StrawberryPerl532\perl\bin\perl.exe" "C:\StrawberryPerl532\perl\lib\ExtUtils/xsubpp"  -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap  ProcessTable.xs > ProcessTable.xsc "C:\StrawberryPerl532\perl\bin\perl.exe"
-MExtUtils::Command -e mv -- ProcessTable.xsc ProcessTable.c gcc -c   -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"0.634\" -DXS_VERSION=\"0.634\"  "-IC:\STRAWB~1\perl\lib\CORE"   ProcessTable.c gcc -c   -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"0.634\" -DXS_VERSION=\"0.634\"  "-IC:\STRAWB~1\perl\lib\CORE"   OS.c "C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"Proc::ProcessTable\", 'DLBASE' => 'ProcessTable', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);" g++ ProcessTable.def -o blib\arch\auto\Proc\ProcessTable\ProcessTable.xs.dll -mdll -s
-L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" OS.o ProcessTable.o   "C:\STRAWB~1\perl\lib\CORE\libperl532.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a"
-Wl,--enable-auto-image-base C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `0A.idata' has no section C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol ' has no section C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `ltiByte' has no section C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `' has no section collect2.exe: error: ld returned 5 exit status gmake: *** [Makefile:484: blib\arch\auto\Proc\ProcessTable\ProcessTable.xs.dll] Error 1   JWB/Proc-ProcessTable-0.634.tar.gz   C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Proc::ProcessTable'.

Below is the output/logs on executing cpan command to install Proc::ProcessTable, cpan Proc::ProcessTable is run in command line

cpan Proc::ProcessTable
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.219)
CPAN: LWP::UserAgent loaded ok (v6.52)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.82)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Database was generated on Wed, 15 Dec 2021 12:05:27 GMT
Updating database file ... Done!
Running install for module 'Proc::ProcessTable'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.1)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\J\JW\JWB\Proc-ProcessTable-0.634.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
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.20210123)
Configuring J/JW/JWB/Proc-ProcessTable-0.634.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lobstack
Generating a gmake-style Makefile
Writing Makefile for Proc::ProcessTable
Writing MYMETA.yml and MYMETA.json
  JWB/Proc-ProcessTable-0.634.tar.gz
  C:\StrawberryPerl532\perl\bin\perl.exe Makefile.PL -- OK
Running make for J/JW/JWB/Proc-ProcessTable-0.634.tar.gz
cp lib/Proc/ProcessTable.pm blib\lib\Proc\ProcessTable.pm
cp lib/Proc/ProcessTable/Process.pm blib\lib\Proc\ProcessTable\Process.pm
AutoSplitting blib\lib\Proc\ProcessTable\Process.pm (blib\lib\auto\Proc\ProcessTable\Process)
cp lib/Proc/Killfam.pm blib\lib\Proc\Killfam.pm
cp lib/Proc/Killall.pm blib\lib\Proc\Killall.pm
Running Mkbootstrap for ProcessTable ()
"C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "ProcessTable.bs"
"C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- ProcessTable.bs blib\arch\auto\Proc\ProcessTable\ProcessTable.bs 644
"C:\StrawberryPerl532\perl\bin\perl.exe" "C:\StrawberryPerl532\perl\lib\ExtUtils/xsubpp"  -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap  ProcessTable.xs > ProcessTable.xsc
"C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Command -e mv -- ProcessTable.xsc ProcessTable.c
gcc -c   -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"0.634\" -DXS_VERSION=\"0.634\"  "-IC:\STRAWB~1\perl\lib\CORE"   ProcessTable.c
gcc -c   -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"0.634\" -DXS_VERSION=\"0.634\"  "-IC:\STRAWB~1\perl\lib\CORE"   OS.c
"C:\StrawberryPerl532\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"Proc::ProcessTable\", 'DLBASE' => 'ProcessTable', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
g++ ProcessTable.def -o blib\arch\auto\Proc\ProcessTable\ProcessTable.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" OS.o ProcessTable.o   "C:\STRAWB~1\perl\lib\CORE\libperl532.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `0A.idata' has no section
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol ' has no section
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `ltiByte' has no section
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: warning: C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a(libkernel32s01546.o): local symbol `' has no section
collect2.exe: error: ld returned 5 exit status
gmake: *** [Makefile:484: blib\arch\auto\Proc\ProcessTable\ProcessTable.xs.dll] Error 1
  JWB/Proc-ProcessTable-0.634.tar.gz
  C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'Proc::ProcessTable'.
ItsPrinceAk
  • 102
  • 7
  • `Proc::ProcessTable` installs fine here on Windows 11 with Strawberry Perl 5.32.1, [here](https://pastebin.com/12GTcZgw) is my install log – Håkon Hægland Dec 09 '21 at 12:42
  • Tried on another machine where only one python is installed, Proc::ProcessTable got installed while Inline::Python failed again. – ItsPrinceAk Dec 10 '21 at 06:37
  • Windows 10 with Python 3.7.9 alone, Logs: collect2.exe: error: ld returned 1 exit status gmake: *** [Makefile:491: blib\arch\auto\Inline\Python\Python.xs.dll] Error 1 NINE/Inline-Python-0.56.tar.gz C:\STRAWB~1\c\bin\gmake.exe -- NOT OK Stopping: 'install' failed for 'Inline::Python'. – ItsPrinceAk Dec 10 '21 at 06:38
  • Yes on Windows 11 `Inline::Python` is not installing either. But it is not the same error as you get on Windows 10. It seems it cannot find the Python binary and libraries (I have installed Python 3.10.1). I am looking into this and will come back when I have more information. – Håkon Hægland Dec 10 '21 at 07:29
  • @HåkonHægland, Try this: add an evnironment variable as INLINE_PYTHON_EXECUTABLE with value as path for your python, i think it could be reason of that error. – ItsPrinceAk Dec 10 '21 at 08:25
  • What is your output of running `python -c "import sysconfig, pprint; pprint.pprint(sysconfig.get_config_vars())"` ? [Here](https://pastebin.com/7hYjtbSF) is what I get – Håkon Hægland Dec 10 '21 at 22:41
  • My Output [here](https://pastebin.com/p1Bw7YH0), but can you tell me what this is for and also were you able to install Inline::Python in your setup? – ItsPrinceAk Dec 11 '21 at 08:40
  • Thanks, I am still working on this and discovered some more issues that should be addressed. I plan to submit some patches and then come back here. The information you provided will be useful to determine different behavior between different platforms and Python versions. – Håkon Hægland Dec 11 '21 at 21:28
  • Added a patch [here](https://github.com/niner/inline-python-pm/pull/35). Can you test it? – Håkon Hægland Dec 13 '21 at 14:36
  • [here](https://pastebin.com/V9nrC4ZW) had downloaded zip file and ran make command in windows, got above error. – ItsPrinceAk Dec 14 '21 at 06:08
  • @HåkonHægland, also if you could provide a fix for this, [Inline::Python](https://stackoverflow.com/a/70315799/10730446) – ItsPrinceAk Dec 14 '21 at 06:12
  • *"had downloaded zip file and ran make"* : You need to run `gmake` (not `make`) on windows can you please try again. Also share the output you get from running `perl Makefile.PL` – Håkon Hægland Dec 14 '21 at 09:40
  • *" if you could provide a fix for this"* Ok, I will have look at it.. – Håkon Hægland Dec 14 '21 at 09:42
  • @HåkonHægland i had installed make using chocolatey package manager. Logs from [perl Makefile.pl](https://pastebin.com/Pkbd7zAb) and from [gmake](https://pastebin.com/cUjxRapM) – ItsPrinceAk Dec 15 '21 at 06:19
  • 1
    Thanks for the update. I see from your first log that you probably have set the environment variable `INLINE_PYTHON_EXECUTABLE` to ```C:\Python379\```. Is that correct? You need to give the full path including the file name, so it should be set to something like `C:\Python379\python.exe`. Can you try that? – Håkon Hægland Dec 15 '21 at 07:32
  • Yep, evnironment variable was set as you have mentioned it, have modified it. Logs after changing it [perl makefile](https://pastebin.com/FD2WfG1M) [gmake](https://pastebin.com/tSr8zGWU) [gmake Test](https://pastebin.com/4Y6YBYen). Gmake test has 2 failed test cases – ItsPrinceAk Dec 15 '21 at 10:06
  • 1
    Ok great it seems to work now and I have already fixed that failed test, see [this](https://github.com/niner/inline-python-pm/pull/37) PR. Can you try it? – Håkon Hægland Dec 15 '21 at 10:19
  • It is working now, Thanks..! But in my local, Proc::Processtable faled to install with above error as mentioned in this question, without that Inline::python fails to install. – ItsPrinceAk Dec 16 '21 at 04:42
  • You are welcome. *"... failed to install with above error as mentioned in this question"* : Can you clean up the quoted text in your question? As it is now, it is difficult to see where the line breaks are in the log output. Indent with 4 spaces instead of using simple block quotes ">", see [editing-help](https://stackoverflow.com/editing-help) for more information. – Håkon Hægland Dec 16 '21 at 13:24
  • @HåkonHægland, Code is formatted now, please post your new version of packages as an answer to this question and also same once Proc::Processtable is fixed. – ItsPrinceAk Dec 17 '21 at 05:02
  • 1
    Thanks for the update. I see from the output you have from running `cpan Proc::ProcessTable` that the wrong `ld.exe` is found when compiling the module (when running `gmake`). It seems like you have MSYS2 installed and it finds the `ld.exe` for MSYS2 instead of the `ld.exe` supplied by Strawberry Perl. Maybe you can try to modify the order you arrange the directories in your PATH environment variable such that the correct `ld.exe` is found? – Håkon Hægland Dec 17 '21 at 13:46
  • Superb, it worked,.!! learnt to read some logs from these package installations too :), Please share here once your branch is merged into main branch, if its not going to happen then please let know here – ItsPrinceAk Dec 19 '21 at 04:36
  • 1
    Great to hear! The branch was merged into master some days ago. – Håkon Hægland Dec 19 '21 at 17:21

0 Answers0