unable to complie and install perl module: Audio::Scan - perl

i am using "perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x86-multi-thread-64int" on windows 7 enterprise(SP1).
I am trying to compile and install a perl module Audio::Scan (.71 version). I downloaded the module from cpan.org, extracted it locally in my machine. It contains readme.win32 text file which states the following:
zlib
The included zlib.lib should just work, if not: Download zlib from http://www.zlib.net/zlib123.zip.
Build from projects/visualc6/zlib.dsw.
Build Win32_LIB_Release Copy zlib.lib into the Audio::Scan win32 directory.
Audio::Scan
Install ActivePerl 5.8.8 or 5.10.0. Open command prompt. Run the vcvars file, for example C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat
perl Makefile.PL
nmake
nmake test
END
I followed all the steps till nmake. The step before nmake i executed like this "perl Makefile.PL make=nmake" as it was generating it dmake style by default. This step goes well.
But in nmake step, i get a lot of warnings followed by the following error:
win32/zlib.lib(./Win32_LIB_Release/crc32.obj):(.text$mn+0x22): undefined reference to #__security_check_cookie#4'
win32/zlib.lib(./Win32_LIB_Release/crc32.obj):(.text$mn+0x1be): undefined reference to#__security_check_cookie#4'
c:/perl/site/lib/auto/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: win32/zlib.lib(./Win32_LIB_Release/crc32.obj): bad reloc address 0x1be in section `.text$mn'
c:/perl/site/lib/auto/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status NMAKE : fatal error U1077: 'C:\Perl\site\bin\g++.EXE' : return code '0x1'
Stop.
I read this thread http://www.perlmonks.org/?node_id=496624 checked the compiler used to compile perl as follows:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC>perl -V:cc..
it returned
cc='gcc';
I am stuck at this point. Any help would be highly appreciated. Sorry for typos if any.

Related

LaTeXindent fail in VSCode: Can't locate Log/Log4perl.pm

I'm using LaTeX Workshop on VSCode to build pdf using LaTeX and I'm getting this error in the Output console when I save the .tex file.
Formatting with command latexindent
-c,d:path_to_folder,d:path_to_folder/__latexindent_temp.tex,-y=defaultIndent:
' '
Formatting failed with exit code 2
stderr: Can't locate Log/Log4perl.pm in #INC (you may need to install the Log::Log4perl module) (#INC contains: C:/Program Files/MiKTeX/scripts/latexindent C:/Perl64/site/lib C:/Perl64/lib) at C:/Program Files/MiKTeX/scripts/latexindent/LatexIndent/LogFile.pm line 22.
The problem is only related to the formatting stuff because the build runs successfully generating the pdf as supposed.
What I did:
Opened the CPAN Client of my Windows 10
Run install Log::Log4perl (it installed also other packages like Log::Dispatch::File and
YAML::Tiny)
Rebooted the system
Checked that Log4perl is installed and it is
I also tryied to install Log4perl through VSCode cmd but I'm getting this wierd error:
Running make for E/ET/ETJ/Log-Log4perl-1.53.tar.gz
to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 141.
make: *** [pm_to_blib] Error 255
ETJ/Log-Log4perl-1.53.tar.gz
"C:\Program Files (x86)\GnuWin32\bin\make.exe" -- NOT OK
Failed during this command:
ETJ/Log-Log4perl-1.53.tar.gz : make NO
Any suggestions?
I figured it out in the end! To solve the error do:
Download latexindent.exe
Edit Latex-workshop › Latexindent:
Path in the Latex Workshop VSCode extension settings with the
latexindent.exe path

How to install dmake with perl?

Can someone please tell me how to download dmake with Perl?
I have tried with CPAN, but this is what I get:
cpan> install dmake
Database was generated on Wed, 10 Jul 2019 10:13:05 GMT
Running install for module 'dmake'
'" "' is not recognized as an internal or external command,
operable program or batch file.
Checksum for C:\STRAWB~1\cpan\sources\authors\id\S\SH\SHAY\dmake-4.12.2.2.zip ok
Scanning cache C:\STRAWB~1\cpan\build for sizes
............................................................................DONE
Package contains both files[ChangeLog COPYING dmake.exe META.yml NEWS PATCH.TXT README.TXT] and directories[man readme startup]; not recognized as a perl package, giving up
Configuring S/SH/SHAY/dmake-4.12.2.2.zip with Makefile.PL
Running make for S/SH/SHAY/dmake-4.12.2.2.zip
gmake: *** No targets specified and no makefile found. Stop.
SHAY/dmake-4.12.2.2.zip
C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'dmake'.
Failed during this command:
SHAY/dmake-4.12.2.2.zip : writemakefile NO -- Package contains both files[ChangeLog COPYING dmake.exe META.yml NEWS PATCH.TXT README.TXT] and directories[man readme startup]; not recognized as a perl package, giving up
I have also tried with ppm install dmake, but I got this:
Installing package 'dmake'...
Error installing package 'dmake': Could not locate a PPD file for package dmake
Not answering the question because it's a XY problem, but giving you the info you need.
The most recent mod_perl2 compiled for Strawberry is against Perl 5.12, which is long out of support. Using any other version of Perl is not going to work. You should ask ApTest to update and recompile for a current Strawberry and release a new setup_spmp helper. They are relying on a dead piece of tech (mod_perl2), so they should either support the required dependency properly or move their application onto a modern stack.

CMake fails to generate Makefiles with Sun Studio 12.5

I'm working on Solaris 11.3 with Sun Studio 12.5. When I attempt to configure with Cmake out-of-tree, Cmake finishes with configuration errors and does not produce the makefiles. In-tree may be broken, too. But our procedures say to build out-of-tree, so that;' what I do.
I have nearly no Cmake experience. Others contributed the the CMake files, and I struggle with tasks related to them. I'm not sure if I am doing something wrong, if our Cmake files are broken, or if Cmake is not well tested under Solaris.
What is going on with CMake, and how do I fix it?
Here are the links to the Cmake files. I can copy/paste them, but it just takes up a bunch of space. The files are hosted on GitHub so they should always be available.
CMakefileList.txt
cryptopp-config.cmake
Here is Solaris' Cmake version, prior to me installing 3.6.2:
$ cmake --version
cmake version 2.8.6
Below is from Solaris Cmake version 2.8.6.
cryptopp-build$ export CXX=/opt/developerstudio12.5/bin/CC
cryptopp-build$ export CXXFLAGS="-DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__ -D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i"
cryptopp-build$ cmake ../cryptopp
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
The C++ compiler "/bin/c++" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /export/home/test/cryptopp-build/CMakeFiles/CMakeTmp
Run Build Command:/bin/gmake "cmTryCompileExec/fast"
/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o
/bin/c++ -DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__
-D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__
-D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i -o
CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -c
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++: error: language arch=avx2_i not recognized
c++: error: language arch=avx2_i not recognized
gmake[1]: Leaving directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o] Error
1
gmake: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
And:
$ /opt/developerstudio12.5/bin/CC -V
CC: Studio 12.5 Sun C++ 5.14 SunOS_i386 2016/05/31
I built Cmake 3.6.2 from sources and installed in /usr/local to attack the CXX compiler identification is unknown issue, but it appears to be having some troubles. As I said earlier, I'm not a Cmake expert (and I'm not sure how one can mess up a make && sudo make install).
cryptopp-build$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
Clearing the cache as suggested by #AndrewHenle results in:
# The project GNUmakefile clears all Cmake artifacts because Cmake cannot seem to do it on its own
$ cd cryptopp
$ git status -s
$
$ cd ..
$ rm -rf cryptopp-build
$ mkdir cryptopp-build
$ cd cryptopp-build
# Using 3.6.2 now
$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
So there appeared to be two problems. First was the down level Sun supplied Cmake. There's nothing genius about diagnosing it as "too old".
The second issue was more interesting. It appears the CMake Error: Could not find CMAKE_ROOT !!! was cause by sudo make install Once I switched to sudo gmake install the issue went away.
Here are the bug reports on the issue:
Cmake Issue 16302: Cmake fails to identify Sun Studio 12.5 compiler
Cmake Issue 16303: Cmake fails to produce a working installation on Solaris 11.3

Perl: nmake not found

I've seen two threads similar to my question, neither with an answer that helps me.
I have been given a new laptop running Windows 7 Enterprise SP1 64-bit, on which I've installed Active Perl 5 'version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread' and Microsoft Visual Studio Express 2015.
Both 'C:\perl64' and 'c:\program files (32)\Microsoft Visual Studio 14.0\VC\bin' are in my system path [without the single quotes, of course] and if I run nmake on the command line without any arguments and without a makefile in the pwd I get back the following message, definitely indicating that nmake can be found:
Microsoft (R) Program Maintenance Utility Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.
So far, so good. Now, when I run Makefile.PL to start installing a new package, I get the following message:
It looks like you don't have either nmake.exe or dmake.exe on your
PATH, so you will not be able to execute the commands from a Makefile.
You can install dmake.exe with the Perl Package Manager by running:
ppm install dmake
Checking if your kit is complete... Looks good Generating a
dmake-style Makefile
What I don't understand and would like to resolve is why Perl does not see the nmake in my PATH environment? I've installed this same package previously on a number of different machines in the past - the only real variation in any of these has been in the version number of Perl and MSVS release and the bit-version of Perl [in almost all cases I've been working 32-bit instead of 64], but I don't see why either of these would make a difference to Perl not recognizing the MSVS bin directory in my %PATH%
Installing dmake or minGW is not a solution for me: I've already done both and get a series of errors I've never experienced before with this package, so I'd really like to find a solution that would allow me to use nmake - if I still get errors afterwards, I'll work those out when I get to them.
Thanks
Edit C:\Perl64\lib\ExtUtils\MakeMaker.pm and add "require Module::Build;" before "require Exporter;" line. The top should now look something like this:
# $Id$
package ExtUtils::MakeMaker;
use strict;
BEGIN {require 5.006;}
require Module::Build; # THIS IS ADDED
require Exporter;
use ExtUtils::MakeMaker::Config;
use ExtUtils::MakeMaker::version; # ensure we always have our fake version.pm
use Carp;
use File::Path;
That fixed it for me.

Why can't DynaLoader.pm load SSleay.dll for Net::SSLeay and Crypt::SSLeay?

I have Perl v5.10. I am trying to install Net::SSLeay 1.30 and Crypt::SSLeay 0.57.
I have already installed OpenSSL 0.9.8e.
For Net::SSLeay 1.30 I followed these steps:
perl Makefile.PL -windows C:\openssl
nmake
nmake test -- test fails
nmake install
perl test.pl
but I got an fatal error as:
D:\perl\Net_SSLeay.pm-1.30>perl -w test.pl
1..20
Can't load 'D:/perl/site/lib/auto/Net/SSLeay/SSLeay.dll' for module Net::SSLeay: load_file:The specified module could not be found at D:/perl/lib/DynaLoader.pm line 203.
at test.pl line 25
Compilation failed in require at test.pl line 25.
BEGIN failed--compilation aborted at test.pl line 25.
I got the same results for Crypt::SSLeay 0.57.
Randy Kobes has an answer for this on the Perl Win32 mailing list. Does your PATH environment variable contain the directory that contains libeay32.dll or ssleay32.dll?
There are many other answers that you can find in Google too. In cases like these, I take the whole error message and shove it into the Google search bar. I start cutting out parts of the error message, such as the specific paths, until I get some search results. This almost always works for me since I'm rarely the first person to have a problem.
Shared libs often have external dependencies, and on some operating systems those dependencies need to be immediately fulfilled when the first shared library is loaded, like your SSLeay.dll, which usually needs the two crypto libs. On linux you can check with ldd the run-time behavior, if all libs are found.
To debug this add the env var PERL_DL_DEBUG=5, like set PERL_DL_DEBUG=5 and try again or use the external tool depends.exe to see what dll's exactly are missing.
I had a similar problem with Windows Par::Packer. The resulting myprogram.exe had trouble loading rurban's hint with PERL_DL_DEBUG
Can't load 'temp\7e717f68.xs.dll' for module Crypt::SSLeay: load_file:Das angegebene Modul wurde nicht gefunden at <embedded>/DynaLoader.pm line 193.
at <embedded>/PAR/Heavy.pm line 95.
I was not able to find out which dlls to include with pp. After these hints I was simply looking to the dll-file with a hex editor and found this string: libgcc_s_dw2-1.dll - this was the dll to include into my "compiled" exe-program:
pp -M Crypt::SSLeay ^
-l c:/strawberry/perl/vendor/lib/auto/Crypt/SSLeay/SSLeay.xs.dll ^
-l c:/strawberry/c/bin/libgcc_s_dw2-1.dll ....
I'm having this same problem with a fresh install of Strawberry Perl 5.30. Googling the error just gives a bunch of unanswered, or half answered questions. Rurban is pointing in the right direction with using depends.exe. Opening ssleay.xs.dll and waiting for it to finishing throwing errors shows 5 main dll's that it depends on. 2 of which are windows core dll's, and 3 from openssl and perl. In the strawberry install, the 2 dll's related to crypto are in the [perlinstallpath]\c\bin folder. Add this to your windows %PATH% variable and it will start working.